[Issue]: Error code: 400 - {'error': {'message': "You submitted a length-0 POST body, but must submit a JSON object.
Describe the issue
hello, I'm running the demo of plot the stock price of APPL and TESLA. When I interact with useragent, this error occurs. Why the post body is length-0? How to deal this? Wait for reply~ thx!
Steps to reproduce
No response
Screenshots and logs
No response
Additional Information
No response
Can you post the complete code you use and print the llm_config (remove the secretes like OPENAI_API_KEY).
the OAI_CONFIG_LIST👇
[ { "model": "gpt-4", "api_key": "06xxxxxxx", "base_url": "https://canadaeast4ai.openai.azure.com/", "api_type": "azure", "api_version": "2023-07-01-preview" }, { "model": "GPT-35-Turbo-G", # the name in azure deploy model name "api_key": "06xxxx", "base_url": "https://switzerlandnorthinstance4ai.openai.azure.com/", "api_type": "azure", "api_version": "2023-07-01-preview" } ]
I have a question that the value of "model" is from the deployment model name in azure or something match what?
I have a question that the value of "model" is from the deployment model name in azure or something match what?
Should be deployment name I believe.
"api_version": "2023-07-01-preview"
Can you use "2023-12-01-preview"?
I have try with 2023-12-01-preview, but it error again after "Successfully installed contourpy-1.2.0 cycler-0.12.1 fonttools-4.47.2 kiwisolver-1.4.5 matplotlib-3.8.2 packaging-23.2 pillow-10.2.0 pyparsing-3.1.1" with the error message below "raise self._make_status_error_from_response(err.response) from None openai.BadRequestError: Error code: 400 - {'error': {'message': "You submitted a length-0 POST body, but must submit a JSON object. (HINT: Try submitting an empty object instead, i.e. {}. If you're using curl, you can pass -d '{}' -H 'Content-Type: application/json')", 'type': 'invalid_request_error', 'param': None, 'code': None}}"
Could you also post your pyautogen version, and your Python version?
I get the code by git clone last week. How to find the version? But I just pull the newest, the python script can run longer than before until the stock price chart was plotted. However, when I continue send the new request, such as, "add the BABA to this chart" the same error occurs again. I guess it should be something null get this, but I can't locate it. Can u help me?~
use pip list | grep 'pyautogen' to check autogen version, can you also check openai version?
I'm sorry for the late reply. The pyautogen version is 0.2.7 and openai version is 1.10.0. I have meet the same error in other agent such as crewAI. However, I have not debugged it out yet.
the same question
Hi @congliu19, is the issue addressed?