Replies: 1 comment 1 reply
-
Could you share a minimal reproducible example? It's basically saying that the chat history is not valid because an AI message that requested a tool call was not followed by a tool result message. These conceptual guides have more information -- hope it will be helpful: https://python.langchain.com/docs/concepts/chat_history/ |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I get this error around 1 every 10 time when using langgraph. I am wondering if anyone encountered a similar issue and how to fix it.
BadRequestError("Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'messages.6: Did not find 1
tool_result
block(s) at the beginning of this message. Messages followingtool_use
blocks must begin with a matching number oftool_result
blocks.'}}")Traceback (most recent call last):Beta Was this translation helpful? Give feedback.
All reactions