You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python: Agents - Chat throwing "A conversation must alternate between user and assistant roles. Make sure the conversation alternates between user and assistant roles and try again."
#10277
Originally posted by yarns123 January 23, 2025
Hi,
im trying to use this example https://github.com/microsoft/semantic-kernel/blob/main/python/samples/getting_started_with_agents/step3_chat.py with AWS Bedrock Claude Sonnet 3.5. Unfortunately I get this error: botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the Converse operation: A conversation must alternate between user and assistant roles. Make sure the conversation alternates between user and assistant roles and try again.
It seems that ChatHistory for this model cannot have two consecutive responses from the assistant. I would be grateful for any ideas on how to solve this problem
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Agents - Chat throwing "A conversation must alternate between user and assistant roles. Make sure the conversation alternates between user and assistant roles and try again."
.Net: Agents - Chat throwing "A conversation must alternate between user and assistant roles. Make sure the conversation alternates between user and assistant roles and try again."
Jan 23, 2025
github-actionsbot
changed the title
.Net: Agents - Chat throwing "A conversation must alternate between user and assistant roles. Make sure the conversation alternates between user and assistant roles and try again."
Python: Agents - Chat throwing "A conversation must alternate between user and assistant roles. Make sure the conversation alternates between user and assistant roles and try again."
Jan 23, 2025
Discussed in #10271
Originally posted by yarns123 January 23, 2025
Hi,
im trying to use this example https://github.com/microsoft/semantic-kernel/blob/main/python/samples/getting_started_with_agents/step3_chat.py with AWS Bedrock Claude Sonnet 3.5. Unfortunately I get this error:
botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the Converse operation: A conversation must alternate between user and assistant roles. Make sure the conversation alternates between user and assistant roles and try again.
It seems that ChatHistory for this model cannot have two consecutive responses from the assistant. I would be grateful for any ideas on how to solve this problem
The text was updated successfully, but these errors were encountered: