ChatToolCall.FunctionName always returns keyword ‘python’, is that a bug?
I used the sample code ChatWithTools in azure-sdk-for-
ChatCompletionOptions options = new()
{
Tools = { getCurrentLocationTool, getCurrentWeatherTool },
};
List<ChatMessage> conversationMessages =
[
new UserChatMessage(“What’s the weather like in Boston?”),
];
ChatCompletion completion = chatClient.CompleteChat(conversationMessages)
The only change I made is that the ‘options’ is passed to chatClient.CompleteChat function to make it work.
ChatCompletionOptions options = new()
{
Tools = { getCurrentLocationTool, getCurrentWeatherTool },
};
List<ChatMessage> conversationMessages =
[
new UserChatMessage(“What’s the weather like in Boston?”),
];
ChatCompletion completion = chatClient.CompleteChat(conversationMessages, options)
However, it fails because toolCall.FunctionName is always ‘python’. Any suggestions would be appreciated.
My environment
===
Azure.AI.OpenAI 2.0.0-beta.2 dll is used.
I used Azure.AI.OpenAI service.
The deployment mode is gpt-35-turbo
I used the sample code ChatWithTools in azure-sdk-for-
ChatCompletionOptions options = new()
{
Tools = { getCurrentLocationTool, getCurrentWeatherTool },
};
List<ChatMessage> conversationMessages =
[
new UserChatMessage(“What’s the weather like in Boston?”),
];
ChatCompletion completion = chatClient.CompleteChat(conversationMessages)
net/sdk/openai/Azure.AI.OpenAI/tests/Samples/01_Chat.cs at main · Azure/azure-sdk-for-net (github.com).
The only change I made is that the ‘options’ is passed to chatClient.CompleteChat function to make it work.
ChatCompletionOptions options = new()
{
Tools = { getCurrentLocationTool, getCurrentWeatherTool },
};
List<ChatMessage> conversationMessages =
[
new UserChatMessage(“What’s the weather like in Boston?”),
];
ChatCompletion completion = chatClient.CompleteChat(conversationMessages, options)
However, it fails because toolCall.FunctionName is always ‘python’. Any suggestions would be appreciated.
My environment
===
Azure.AI.OpenAI 2.0.0-beta.2 dll is used.
I used Azure.AI.OpenAI service.
The deployment mode is gpt-35-turbo
Read More