Skip to content

[Bug]: Group chat does not work with Anthropic model #2884

@nguoithichkhampha

Description

@nguoithichkhampha

Describe the bug

I have a group chat with multiple agent. one agent uses Anthropic model, other agents use openai model.
I have followed this instruction to implement Anthropic model
https://microsoft.github.io/autogen/docs/topics/non-openai-models/cloud-anthropic

Steps to reproduce

No response

Model Used

claude-3-sonnet-20240229

Expected Behavior

no error when run group chat

Screenshots and logs

anthropic.BadRequestError: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'messages: roles must alternate between "user" and "assistant", but found multiple "user" roles in a row'}}

Additional Information

End point: anthropic

### Tasks

Metadata

Metadata

Assignees

No one assigned

    Labels

    modelsPertains to using alternate, non-GPT, models (e.g., local models, llama, etc.)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions