|
4 | 4 | using BotSharp.Abstraction.Agents.Models; |
5 | 5 | using BotSharp.Abstraction.Conversations; |
6 | 6 | using BotSharp.Abstraction.Conversations.Models; |
7 | | -using BotSharp.Abstraction.Conversations.Settings; |
8 | 7 | using BotSharp.Abstraction.Loggers; |
9 | 8 | using BotSharp.Abstraction.MLTasks; |
10 | 9 | using BotSharp.Plugin.AzureOpenAI.Settings; |
@@ -39,7 +38,6 @@ public ChatCompletionProvider(AzureOpenAiSettings settings, |
39 | 38 | public RoleDialogModel GetChatCompletions(Agent agent, List<RoleDialogModel> conversations) |
40 | 39 | { |
41 | 40 | var contentHooks = _services.GetServices<IContentGeneratingHook>().ToList(); |
42 | | - var logHook = _services.GetService<IVerboseLogHook>(); |
43 | 41 |
|
44 | 42 | // Before chat completion hook |
45 | 43 | Task.WaitAll(contentHooks.Select(hook => |
@@ -75,11 +73,6 @@ public RoleDialogModel GetChatCompletions(Agent agent, List<RoleDialogModel> con |
75 | 73 | } |
76 | 74 | } |
77 | 75 |
|
78 | | - var log = responseMessage.Role == AgentRole.Function ? |
79 | | - $"[{agent.Name}]: {responseMessage.FunctionName}({responseMessage.FunctionArgs})" : |
80 | | - $"[{agent.Name}]: {responseMessage.Content}"; |
81 | | - logHook?.GenerateLog(log); |
82 | | - |
83 | 76 | // After chat completion hook |
84 | 77 | Task.WaitAll(contentHooks.Select(hook => |
85 | 78 | hook.AfterGenerated(responseMessage, new TokenStatsModel |
@@ -192,7 +185,6 @@ public async Task<bool> GetChatCompletionsStreamingAsync(Agent agent, List<RoleD |
192 | 185 | protected (string, ChatCompletionsOptions) PrepareOptions(Agent agent, List<RoleDialogModel> conversations) |
193 | 186 | { |
194 | 187 | var agentService = _services.GetRequiredService<IAgentService>(); |
195 | | - var logHook = _services.GetService<IVerboseLogHook>(); |
196 | 188 |
|
197 | 189 | var chatCompletionsOptions = new ChatCompletionsOptions(); |
198 | 190 |
|
@@ -248,7 +240,6 @@ public async Task<bool> GetChatCompletionsStreamingAsync(Agent agent, List<RoleD |
248 | 240 | // chatCompletionsOptions.PresencePenalty = 0; |
249 | 241 |
|
250 | 242 | var prompt = GetPrompt(chatCompletionsOptions); |
251 | | - logHook?.GenerateLog(prompt); |
252 | 243 |
|
253 | 244 | return (prompt, chatCompletionsOptions); |
254 | 245 | } |
|
0 commit comments