Skip to content
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

Autogen package should be autogen-agentchat #5

Open
ekzhu opened this issue Dec 20, 2024 · 3 comments
Open

Autogen package should be autogen-agentchat #5

ekzhu opened this issue Dec 20, 2024 · 3 comments

Comments

@ekzhu
Copy link

ekzhu commented Dec 20, 2024

Please update the autogen package to autogen-agentchat~=0.2, see our clarification regarding to a recent fork: microsoft/autogen#4217

@arno756
Copy link
Collaborator

arno756 commented Dec 20, 2024

I have updated the repo with library. However, I still get an issue I cannot solve. I get that error after a couple round between the agents (I didn't have that issue before):

BadRequestError: Error code: 400 - {'error': {'message': "'$.messages[5].content' is invalid. Please check the API reference: https://platform.openai.com/docs/api-reference.", 'type': 'invalid_request_error', 'param': None, 'code': None}}

This error happens towards the Message 7 using this command:

# See messages in the groupchat
print("Current messages in the groupchat:")
for idx, msg in enumerate(manager.groupchat.messages):
    print(f"Message {idx}: {msg}")

@ekzhu
Copy link
Author

ekzhu commented Dec 21, 2024

Can you print out the messages from the group chat? I believe this is likely due to an empty or None message, or a message that contains a Python object.

@arno756
Copy link
Collaborator

arno756 commented Dec 25, 2024

Here are the messages (I truncated Message 2 as it was too long):

Current messages in the groupchat:
Message 0: {'content': 'Is Alice Johnson a Customer?', 'role': 'user', 'name': 'User_proxy'}
Message 1: {'function_call': {'arguments': '{}', 'name': 'get_schema_info'}, 'content': 'None', 'role': 'assistant', 'name': 'SchemaAgent'}
Message 2: {'content': '[\n {\n "table_schema": "public",\n "table_name": "customers",\n "column_name": "customer_id",\n "data_type": "integer",\n "is_nullable": "NO",\n "constraint_type": "PRIMARY KEY",\n "referenced_column": "customer_id"\n }\n]', 'name': 'get_schema_info', 'role': 'function'}
Message 3: {'function_call': {'arguments': '{"query":"SELECT * FROM customers WHERE name = 'Alice Johnson'"}', 'name': 'query_crm'}, 'content': 'None', 'role': 'assistant', 'name': 'ShipmentAgent'}
Message 4: {'content': '{'query': "SELECT * FROM customers WHERE name = 'Alice Johnson'", 'result': 'Alice Johnson is a customer with customer_id 1, email [email protected], phone number 555-1234, and resides at 123 Maple St, New York, NY.'}', 'name': 'query_crm', 'role': 'function'}
Message 5: {'content': '', 'role': 'user', 'name': 'User_proxy'}
Message 6: {'content': 'Yes, Alice Johnson is a customer. Here are her details:\n- Customer ID: 1\n- Email: [email protected]\n- Phone Number: 555-1234\n- Address: 123 Maple St, New York, NY.', 'role': 'user', 'name': 'SchemaAgent'}
Message 7: {'content': 'Yes, Alice Johnson is a customer. Here are her details:\n- Customer ID: 1\n- Email: [email protected]\n- Phone Number: 555-1234\n- Address: 123 Maple St, New York, NY.', 'role': 'user', 'name': 'ShipmentAgent'}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants