Skip to content

Commit bec8f6e

Browse files
author
Jicheng Lu
committed
2 parents 1713e90 + d9d87a2 commit bec8f6e

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/Plugins/BotSharp.Plugin.AzureOpenAI/Providers/Chat/ChatCompletionProvider.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ public async Task<bool> GetChatCompletionsAsync(Agent agent,
161161
{
162162
CurrentAgentId = agent.Id,
163163
MessageId = conversations.LastOrDefault()?.MessageId ?? string.Empty,
164+
ToolCallId = toolCall?.Id,
164165
FunctionName = toolCall?.FunctionName,
165166
FunctionArgs = toolCall?.FunctionArguments?.ToString()
166167
};

src/Plugins/BotSharp.Plugin.DeepSeekAI/Providers/Chat/ChatCompletionProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,10 @@ public void SetModelName(string model)
245245
{
246246
messages.Add(new AssistantChatMessage(new List<ChatToolCall>
247247
{
248-
ChatToolCall.CreateFunctionToolCall(message.ToolCallId, message.FunctionName, BinaryData.FromString(message.FunctionArgs ?? string.Empty))
248+
ChatToolCall.CreateFunctionToolCall(message.FunctionName, message.FunctionName, BinaryData.FromString(message.FunctionArgs ?? string.Empty))
249249
}));
250250

251-
messages.Add(new ToolChatMessage(message.ToolCallId, message.Content));
251+
messages.Add(new ToolChatMessage(message.FunctionName, message.Content));
252252
}
253253
else if (message.Role == AgentRole.User)
254254
{

src/Plugins/BotSharp.Plugin.OpenAI/Providers/Chat/ChatCompletionProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,10 @@ public async Task<bool> GetChatCompletionsStreamingAsync(Agent agent, List<RoleD
252252
{
253253
messages.Add(new AssistantChatMessage(new List<ChatToolCall>
254254
{
255-
ChatToolCall.CreateFunctionToolCall(message.ToolCallId, message.FunctionName, BinaryData.FromString(message.FunctionArgs ?? string.Empty))
255+
ChatToolCall.CreateFunctionToolCall(message.FunctionName, message.FunctionName, BinaryData.FromString(message.FunctionArgs ?? string.Empty))
256256
}));
257257

258-
messages.Add(new ToolChatMessage(message.ToolCallId, message.Content));
258+
messages.Add(new ToolChatMessage(message.FunctionName, message.Content));
259259
}
260260
else if (message.Role == AgentRole.User)
261261
{

0 commit comments

Comments
 (0)