Describe the bug
Query: what is the weather of NY?
Error: Error code: 400 - {'message': 'messages: roles must alternate between "user" and "assistant", but found multiple "user" roles in a row'}
To Reproduce
Steps to reproduce the behavior:
- Clone this repo in linux
- run the client.py
- fix some import error like
ModuleNotFoundError: No module named 'mcp.server.fastmcp' by import these module in client.py
- enter the query
what is the weather of NY?
Expected behavior
The client should tell me the weather of NY
Logs
(mcp-client-python) root@1panel:~/plspace/mcp-client-python# uv run client.py /root/plspace/weather-server-python/weather.py
Connected to server with tools: ['get_alerts', 'get_forecast']
MCP Client Started!
Type your queries or 'quit' to exit.
Query: what is the weather of NY?
Error: Error code: 400 - {'message': 'messages: roles must alternate between "user" and "assistant", but found multiple "user" roles in a row'}
Additional context
I use bedrock sdk with socks5 proxy
Describe the bug
To Reproduce
Steps to reproduce the behavior:
ModuleNotFoundError: No module named 'mcp.server.fastmcp'by import these module in client.pywhat is the weather of NY?Expected behavior
The client should tell me the weather of NY
Logs
Additional context
I use bedrock sdk with socks5 proxy