You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Invalid 'messages[2].tool_calls': array too long. Expected an array with maximum length 128, but got an array with length 200 instead.'
Steps to reproduce
Set AllowParallelToolCalls to true in the ChatCompletionOptions object.
Prompt the AI such that it's going to call your ChatTool more than 128 times.
This call will then generate the exception: chatClient.CompleteChat(messages, options);
Code snippets
No response
OS
Windows 11
.NET version
9.0
Library version
2.1.0
The text was updated successfully, but these errors were encountered:
Service
OpenAI
Describe the bug
When AllowParallelToolCalls is true and more than 128 ToolChatMessages are sent back to the AI, this exception is thrown:
System.ClientModel.ClientResultException: 'HTTP 400 (invalid_request_error: array_above_max_length)
Parameter: messages[2].tool_calls
Invalid 'messages[2].tool_calls': array too long. Expected an array with maximum length 128, but got an array with length 200 instead.'
Steps to reproduce
Set AllowParallelToolCalls to true in the ChatCompletionOptions object.
Prompt the AI such that it's going to call your ChatTool more than 128 times.
This call will then generate the exception: chatClient.CompleteChat(messages, options);
Code snippets
No response
OS
Windows 11
.NET version
9.0
Library version
2.1.0
The text was updated successfully, but these errors were encountered: