-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
400 'function' is not allowed role. The allowed roles are ['developer', 'system', 'user', 'assistant', 'tool'] #493
Comments
Hi @jonwi-semler, are you getting this error when trying a general chat, or are you using the Extensions feature? Can you also let us know if you see this error just in the console output, or are you getting a UI error message? |
In later API versions (i.e. 2024-10-21) and for the newer o-series reasoning models, the body payload is slightly different. This is why Azure Chat doesn't yet officially or fully support reasoning models. More specifically, the You can try to search for await CreateChatMessage({
name: functionCall.name,
content: functionCall.arguments,
role: "function", // <== try replacing this with "tool" when using supported o-series models
chatThreadId: chatThread.id,
}); I haven't tested it but perhaps that gets you started. |
Hi David, Its when using an Extension feature and it shows as a UI notification. |
Hi Olaf, I have actually already tried that and did'nt do a difference. Thanks. |
Started to receive this error every now and then, when I have been using the chat a bit. Cant seem to find a consistent trigger for it, so it just happens every now and then.
400 'function' is not allowed role. The allowed roles are ['developer', 'system', 'user', 'assistant', 'tool']
Cant seem to find a proper solution for it. Can anybody point me in the right direction?
Best Regards,
Jonathan
The text was updated successfully, but these errors were encountered: