bedrock
autogen.oai.bedrock.oai_messages_to_bedrock_messages
oai_messages_to_bedrock_messages
Convert messages from OAI format to Bedrock format.
We correct for any specific role orders and types, etc.
AWS Bedrock requires messages to alternate between user and assistant roles. This function ensures that the messages
are in the correct order and format for Bedrock by inserting “Please continue” messages as needed.
This is the same method as the one in the Autogen Anthropic client
Name | Description |
---|---|
messages | Type: list[dict[str, Any]] |
has_tools | Type: bool |
supports_system_prompts | Type: bool |