From 77228e77b0897859274612fe32602800a1f9fa4a Mon Sep 17 00:00:00 2001 From: Haiping Chen Date: Fri, 3 Nov 2023 09:18:48 -0500 Subject: [PATCH] Use router settings for model. --- src/Infrastructure/BotSharp.Core/Planning/NaivePlanner.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Infrastructure/BotSharp.Core/Planning/NaivePlanner.cs b/src/Infrastructure/BotSharp.Core/Planning/NaivePlanner.cs index 249f9ec1..f69d31ae 100644 --- a/src/Infrastructure/BotSharp.Core/Planning/NaivePlanner.cs +++ b/src/Infrastructure/BotSharp.Core/Planning/NaivePlanner.cs @@ -2,6 +2,7 @@ using BotSharp.Abstraction.Agents.Models; using BotSharp.Abstraction.Functions.Models; using BotSharp.Abstraction.Planning; using BotSharp.Abstraction.Routing.Models; +using BotSharp.Abstraction.Routing.Settings; using BotSharp.Abstraction.Templating; namespace BotSharp.Core.Planning; @@ -31,7 +32,10 @@ public class NaivePlanner : IPlaner var completion = CompletionProvider.GetTextCompletion(_services);*/ // chat completion - var completion = CompletionProvider.GetChatCompletion(_services); + var routerSetting = _services.GetRequiredService(); + var completion = CompletionProvider.GetChatCompletion(_services, + provider: routerSetting.Provider, + model: routerSetting.Model); int retryCount = 0; while (retryCount < 3)