diff options
Diffstat (limited to 'Software/Visual_Studio_22/Tango.Portal.Chat.Web/Services')
| -rw-r--r-- | Software/Visual_Studio_22/Tango.Portal.Chat.Web/Services/LlmClient.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Software/Visual_Studio_22/Tango.Portal.Chat.Web/Services/LlmClient.cs b/Software/Visual_Studio_22/Tango.Portal.Chat.Web/Services/LlmClient.cs index 7b2d8c3ef..fb34c183b 100644 --- a/Software/Visual_Studio_22/Tango.Portal.Chat.Web/Services/LlmClient.cs +++ b/Software/Visual_Studio_22/Tango.Portal.Chat.Web/Services/LlmClient.cs @@ -34,12 +34,15 @@ namespace Tango.Portal.Chat.Web.Services public async Task<ProposeKqlResult> ProposeKqlAsync(String plannerPrompt, String plotySample, string question, string schemaJson, IEnumerable<ChatMessage>? history, CancellationToken ct = default) { - return _opt.Provider switch + var plan = _opt.Provider switch { LlmProvider.Claude => await ProposeKqlWithClaudeAsync(plannerPrompt, plotySample, question, schemaJson, history, ct), LlmProvider.OpenAI => await ProposeKqlWithOpenAIAsync(plannerPrompt, plotySample, question, schemaJson, history, ct), _ => await ProposeKqlWithOpenAIAsync(plannerPrompt, plotySample, question, schemaJson, history, ct) // Default to OpenAI }; + + plan.Provider = _opt.Provider; + return plan; } private async Task<ProposeKqlResult> ProposeKqlWithOpenAIAsync(String plannerPrompt, String plotySample, @@ -84,7 +87,7 @@ namespace Tango.Portal.Chat.Web.Services return result; } - private async Task<ProposeKqlResult> ProposeKqlWithClaudeAsync(String plannerPrompt, String plotySample, + public async Task<ProposeKqlResult> ProposeKqlWithClaudeAsync(String plannerPrompt, String plotySample, string question, string schemaJson, IEnumerable<ChatMessage>? history, CancellationToken ct) { var messages = new List<object>(); |
