-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python: Bug: Kernel Function plugin not working with AzureAssistantAgent #10141
Comments
Hi @vslepakov, it looks like one of the tool calls may be failing and we're not sending back a result for that particular tool call? Are you able to enable logging so we can get some more information about the number of tool calls being made, and what else could be going on? |
Hi @moonbox3, sure here you go. Let me know if you need anything else: https://gist.github.com/vslepakov/715e7eb0a85688564da987d1633ccbf6 |
Thanks for sending, @vslepakov. I'm not able to reproduce the tool calling issue with an AzureAssistantAgent. Are you able to share some code that I'd be able to use to reproduce it? As a baseline, could you run this sample, please? https://github.com/microsoft/semantic-kernel/blob/main/python/samples/getting_started_with_agents/step7_assistant.py. It makes several tool calls. I'd like to know if you can run that sample, as well, or if you experience failures. Thanks. As a note, I have the |
Thanks @moonbox3. Just add you to my private repo playground. Using the same Not sure if it makes a difference but I am using |
Thanks, @vslepakov. I will take a look at your repo soon. I just adjusted the I see in your logs, though, that right when you send a message to the AzureChatCompletion agent, after first running the AzureAssistantAgent it is failing with the 400. This is puzzling. |
Describe the bug
Testing the setup described here with a bugfix released in 1.18.0
To Reproduce
See the setup here.
Expected behavior
AzureAssistantAgent
with a kernel function plugin works as part ofAgentGroupChat
Platform
Additional context
ERROR:
semantic_kernel.exceptions.service_exceptions.ServiceResponseException: ("<class 'semantic_kernel.connectors.ai.open_ai.services.azure_chat_completion.AzureChatCompletion'> service failed to complete the prompt", BadRequestError('Error code: 400 - {\'error\': {\'message\': "An assistant message with \'tool_calls\' must be followed by tool messages responding to each \'tool_call_id\'. The following tool_call_ids did not have response messages: call_74vVFw3smVjsnsoCwcbrUNaN", \'type\': \'invalid_request_error\', \'param\': \'messages.[3].role\', \'code\': None}}'))
According to this, the tool_call_id should be included in messages with
AuthorRole.TOOL
. I believe this should be handled in semantic kernelPart of the stack trace:
The text was updated successfully, but these errors were encountered: