diff --git a/src/Infrastructure/BotSharp.OpenAPI/Controllers/ConversationController.cs b/src/Infrastructure/BotSharp.OpenAPI/Controllers/ConversationController.cs index a3cedc1e..0552b19f 100644 --- a/src/Infrastructure/BotSharp.OpenAPI/Controllers/ConversationController.cs +++ b/src/Infrastructure/BotSharp.OpenAPI/Controllers/ConversationController.cs @@ -379,7 +379,7 @@ public class ConversationController : ControllerBase [HttpPost("/conversation/{agentId}/{conversationId}/stream")] - public async Task StreamMessage( + public async Task SendMessageStream( [FromRoute] string agentId, [FromRoute] string conversationId, [FromBody] NewMessageModel input) diff --git a/src/Plugins/BotSharp.Plugin.OpenAI/Providers/Chat/ChatCompletionProvider.cs b/src/Plugins/BotSharp.Plugin.OpenAI/Providers/Chat/ChatCompletionProvider.cs index af207e12..38d1455e 100644 --- a/src/Plugins/BotSharp.Plugin.OpenAI/Providers/Chat/ChatCompletionProvider.cs +++ b/src/Plugins/BotSharp.Plugin.OpenAI/Providers/Chat/ChatCompletionProvider.cs @@ -242,7 +242,7 @@ public class ChatCompletionProvider : IChatCompletion }); } - if (choice.FinishReason == ChatFinishReason.FunctionCall || choice.FinishReason == ChatFinishReason.ToolCalls) + if (choice.FinishReason == ChatFinishReason.ToolCalls || choice.FinishReason == ChatFinishReason.FunctionCall) { var meta = toolCalls.FirstOrDefault(x => !string.IsNullOrEmpty(x.FunctionName)); var functionName = meta?.FunctionName;