Closed franklinlindemberg closed 3 days ago
@franklinlindemberg Thanks for reporting this issue!
Could you please try to use automatic function calling instead of FunctionCallingStepwisePlanner
and see if you can reproduce the problem? We recommend automatic function calling for planning capabilities since it's more efficient approach in terms of performance and cost.
Here is more information:
@dmytrostruk Thanks for the reply!
I'm gonna try using the automatic function calling and will let you know!
Also just wanted to clarify that this is not really a blocker for us (the try catch on each tool implementation kinda fixed it) but I decided to open the issue anyway since I had already debugged this and had all the details (it might be helpful in case other folks face the same issue)
@franklinlindemberg thanks for identifying the cause!
@dmytrostruk i can confirm it for ToolCallBehavior = ToolCallBehavior.AutoInvokeKernelFunctions
@franklinlindemberg It would be great to learn about your experience using automatic function calling and if you can reproduce this issue with it. As for now, I'm going to close the issue, since we no longer recommend using FunctionCallingStepwisePlanner
and suggest using automatic function calling instead. But in case you can still reproduce it with automatic function calling - feel free to re-open this issue or create a new one. Thanks a lot!
Describe the bug Semantic Kernel is adding a user message between tool response messages, which causes the LLM to fail the request with 400 since its expecting to receive response from all tools first.
To Reproduce Steps to reproduce the behavior:
Content: { "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_iE1vjQZ6NXoB3qJC0q2wtgAE, call_JZ7RjkHTMVjXrGw0hz5MjAHM", "type": "invalid_request_error", "param": "messages.[7].role", "code": null } }