diff --git a/Controllers/QuoteController.cs b/Controllers/QuoteController.cs index 9137ee6..d5697a1 100644 --- a/Controllers/QuoteController.cs +++ b/Controllers/QuoteController.cs @@ -20,11 +20,13 @@ public class QuotesController : ControllerBase private readonly ApplicationDbContext _db; private readonly GeneralUseHelpers guhf; + private readonly IConfiguration _appsettings; - public QuotesController(ApplicationDbContext db, GeneralUseHelpers GUHF) + public QuotesController(ApplicationDbContext db, GeneralUseHelpers GUHF, IConfiguration appsettings) { _db = db; guhf = GUHF; + _appsettings = appsettings; } // GET /api/v1/quotes @@ -535,6 +537,8 @@ public class QuotesController : ControllerBase request.CustomPrompt, request.Model, request.Temperature, request.CategoryId, request.UseSampleQuote ); + string llmUsed = request.Model ?? _appsettings.GetSection("LlmIntegration")["DefaultModel"] ?? "deepclaude"; + // Check if any errors occurred if (generatedResponse == null) { @@ -549,7 +553,7 @@ public class QuotesController : ControllerBase return StatusCode(500, new ErrorDTO { Status = "error", Error_msg = "Unexpected API response" }); // Otherwise, return the response - return Ok(new { Status = "ok", BotResponse = llmResponse }); + return Ok(new { Status = "ok", BotResponse = llmResponse, Model = llmUsed }); } }