From f53f156cc04a68779acb331b65f33bebbdd90d66 Mon Sep 17 00:00:00 2001 From: Jicheng Lu <103353@smsassist.com> Date: Thu, 3 Oct 2024 15:00:10 -0500 Subject: [PATCH] clean comments --- .../Providers/Chat/ChatCompletionProvider.cs | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/Plugins/BotSharp.Plugin.AzureOpenAI/Providers/Chat/ChatCompletionProvider.cs b/src/Plugins/BotSharp.Plugin.AzureOpenAI/Providers/Chat/ChatCompletionProvider.cs index afb76a96..3384e3b7 100644 --- a/src/Plugins/BotSharp.Plugin.AzureOpenAI/Providers/Chat/ChatCompletionProvider.cs +++ b/src/Plugins/BotSharp.Plugin.AzureOpenAI/Providers/Chat/ChatCompletionProvider.cs @@ -67,17 +67,6 @@ public class ChatCompletionProvider : IChatCompletion responseMessage.FunctionName = responseMessage.FunctionName.Split('.').Last(); } } - //else if (reason == ChatFinishReason.ToolCalls) - //{ - // var toolCall = value.ToolCalls.FirstOrDefault(); - // responseMessage = new RoleDialogModel(AgentRole.Function, text) - // { - // CurrentAgentId = agent.Id, - // MessageId = conversations.LastOrDefault()?.MessageId ?? string.Empty, - // FunctionName = toolCall?.FunctionName, - // FunctionArgs = toolCall?.FunctionArguments - // }; - //} else { responseMessage = new RoleDialogModel(AgentRole.Assistant, text) @@ -281,13 +270,6 @@ public class ChatCompletionProvider : IChatCompletion { if (message.Role == AgentRole.Function) { - //messages.Add(new AssistantChatMessage(string.Empty) - //{ - // FunctionCall = new ChatFunctionCall(message.FunctionName, message.FunctionArgs ?? string.Empty) - //}); - - //messages.Add(new FunctionChatMessage(message.FunctionName, message.Content)); - messages.Add(new AssistantChatMessage(new List { ChatToolCall.CreateFunctionToolCall(message.FunctionName, message.FunctionName, BinaryData.FromString(message.FunctionArgs ?? string.Empty))