When i run this piece of code
from autogen import initiate_chats
chat_results = initiate_chats(chats)
Im getting the following error
BadRequestError: Error code: 400 - {‘error’: {‘message’: “‘Onboarding Personal Information Agent’ does not match ‘{1,64}$’ - ‘messages.1.name’”, ‘type’: ‘invalid_request_error’, ‘param’: None, ‘code’: None}}
This happens after I give the name input. My input was a simple name.
Hi @arunnambiar
Based on the error message, it seems your code is passing None value in both param and code arguments. One suggestion is print the values before calling the function to see which one is invalid.
Im passing this variable as it is given in the code.
chats = [
{
“sender”: onboarding_personal_information_agent,
“recipient”: customer_proxy_agent,
“message”:
“Hello, I’m here to help you get started with our product.”
“Could you tell me your name and location?”,
“summary_method”: “reflection_with_llm”,
“summary_args”: {
“summary_prompt” : "Return the customer information "
"into as JSON object only: "
“{‘name’: ‘’, ‘location’: ‘’}”,
},
“max_turns”: 2,
“clear_history” : True
},
{
“sender”: onboarding_topic_preference_agent,
“recipient”: customer_proxy_agent,
“message”:
"Great! Could you tell me what topics you are "
“interested in reading about?”,
“summary_method”: “reflection_with_llm”,
“max_turns”: 1,
“clear_history” : False
},
{
“sender”: customer_proxy_agent,
“recipient”: customer_engagement_agent,
“message”: “Let’s find something fun to read.”,
“max_turns”: 1,
“summary_method”: “reflection_with_llm”,
},
]
Theres no code or param arguments