Skip to content

[Bug]: OpenAI GPT-4 tool error #2882

Open
@abhijitpal1247

Description

Describe the bug

In a group chat setting, where some agents have tools associated with them. I frequently face this error:
openai.InternalServerError: Error code: 500 - {'error': {'message': 'The model produced invalid content. Consider modifying your prompt if you are seeing this error persistently.', 'type': 'model_error', 'param': None, 'code': None}}
I am facing this error repeatedly whenever within a group chat, many agents have different tools attached to them.

Steps to reproduce

  1. Create a group chat with multiple agents
  2. Bind tools with some of the agents.
  3. Initiate the group-chat
  4. It takes a long time to get the response back and then the received response is: openai.InternalServerError: Error code: 500 - {'error': {'message': 'The model produced invalid content. Consider modifying your prompt if you are seeing this error persistently.', 'type': 'model_error', 'param': None, 'code': None}}

Model Used

gpt-4

Expected Behavior

The tool should have executed without any issues

Screenshots and logs

image

Additional Information

pyautogen 0.2.28
openai 1.16.2
Python 3.10.7
OS Windows 11

Metadata

Assignees

No one assigned

    Labels

    0.2Issues which are related to the pre 0.4 codebaseneeds-triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions