-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Databricks Bad Request Error #4761
Comments
@tj-cycyota Could you take a look at this? |
Tracking this down - this notebook was developed in April 2024 on Autogen v0.2.25, which is no longer available on pypi. Something changed in the message handling logic (either in the OpenAI lib or Autogen) between 0.2.25 and 0.2.40 (which is what installs now). @ekzhu the error is being thrown from the OpenAI SDK as there is an extra field "name" being submitted with the chat.completions request. The only place I can see this "name" field being populated is with some of the tool-calling functionality changes in Autogen.
Here's the exact message being sent to OAI that throws the error, notice invalid schema for the message array. I'll also note this is exactly the quickstart example in the docs
|
This appears to the root issue: a key "name" is appended to every message before the LLM call, which may be invalid for non-OpenAI clients: https://github.com/microsoft/autogen/blob/0.2/autogen/agentchat/conversable_agent.py#L670 |
@sonichi @marklysze I see Commit 77ae3c0 added a check to make sure every message dict includes the "name" key. Why was this needed? It breaks integrations with LLM providers that use the OpenAI SDK (in this case, Mosaic Model Serving) |
@tj-cycyota the v0.2 code requires the |
Hello @tj-cycyota and @ekzhu - thank you very much for tracking this. Indeed, this issue is unfortunate since, for me and our organization, Autogen is not usable in Databricks, which is the basis for our data science platform. Is there any workaround, or will there be a fix? Thank you again for your attention on this item |
@tj-cycyota , the |
Thanks @ekzhu that makes sense. @Aljgutier I'm in touch with the relevant Databricks engineers and this is going to be fixed ASAP. I don't have an exact date for you at this time. |
What happened?
trying to run AutoGen Databricks Hello World example
Running on - Databricks LTS 14.3 ML
the rest of the configurations are as specified in the example
What did you expect to happen?
I expected a response like in the referenced article. Something like
How can we reproduce it (as minimally and precisely as possible)?
Try to run the code (as in the blog post) on a Databricks cluster. Does it still work. Note, in addition to the code above, I had to add to get around the error" "OpenAI Client.init() got an unexpected keyword argument proxies"
AutoGen version
0.2.40
Which package was this bug in
Core
Model used
No response
Python version
3.10
Operating system
Databricks LTS 14.3 ML
Any additional info you think would be helpful for fixing this bug
No response
The text was updated successfully, but these errors were encountered: