[Bug]: openai.BadRequestError: Error code: 400 - {'error': {'message': 'Invalid request: user message content is empty', 'type': 'invalid_request_error'}}
Describe the bug
import autogen
config_list = autogen.config_list_from_json( "OAI_CONFIG_LIST.json", filter_dict={ "model": ["moonshot-v1-8k"], }, )
llm_config = {"config_list": config_list, "cache_seed": 42}
user_proxy = autogen.UserProxyAgent( name="User_proxy", system_message="A human admin.", code_execution_config={ "last_n_messages": 2, "work_dir": "groupchat", "use_docker": False, }, # Please set use_docker=True if docker is available to run the generated code. Using docker is safer than running the generated code directly. human_input_mode="TERMINATE", )
coder = autogen.AssistantAgent( name="Coder", llm_config=llm_config, )
pm = autogen.AssistantAgent( name="Product_manager", system_message="Creative in software product ideas.", llm_config=llm_config, )
groupchat = autogen.GroupChat(agents=[user_proxy, coder, pm], messages=[], max_round=12) manager = autogen.GroupChatManager(groupchat=groupchat, llm_config=llm_config)
user_proxy.initiate_chat( manager, message="Find a latest paper about gpt-4 on arxiv and find its potential applications in software." )
Steps to reproduce
No response
Model Used
No response
Expected Behavior
No response
Screenshots and logs
No response
Additional Information
No response
We faced the same issue when employing the step-1-32k model.
BadRequestError: Error code: 400 - {'error': {'message': 'role or content cannot be empty.', 'type': 'request_params_invalid'}}
I meet the same error when use the groupchat example (https://microsoft.github.io/autogen/docs/notebooks/agentchat_groupchat) openai.BadRequestError: Error code: 400
After the first speaker replied, the second request has the error above.
Have you resovled this problem?
Closing as stale