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
By the looks of it, all the AI messages with tool use have proper corresponding tool messages. Most probably I am missing something, but I am failing to understand, what exactly. Please advise.
Stack trace
ValueError: Found AIMessages with tool_calls that do not have a corresponding ToolMessage. Here are the first few of those tool calls: [{'name': 'get_task', 'args': {'task_id': 'b55a35af-b676-4501-ab02-08396e00bf4a'}, 'id': 'toolu_01GExmK6qCiDQLv5HrHwFQ8x', 'type': 'tool_call'}, {'name': 'get_project_structure', 'args': {}, 'id': 'toolu_011hpY4uMDjFUTgRBYFMnFV6', 'type': 'tool_call'}, ....
Messages
Here are two messages in a row:
{
"content": [
{
"text": "I'll help you implement the task as requested. First, let's retrieve the task details to understand what needs to be done.",
"type": "text",
"index": 0
},
{
"id": "toolu_01GExmK6qCiDQLv5HrHwFQ8x",
"input": {
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello.
Apologies in advance, if such a question was already asked.
I encountered a weird error today related to INVALID_CHAT_HISTORY error: https://langchain-ai.github.io/langgraph/troubleshooting/errors/INVALID_CHAT_HISTORY/
By the looks of it, all the AI messages with tool use have proper corresponding tool messages. Most probably I am missing something, but I am failing to understand, what exactly. Please advise.
Stack trace
ValueError: Found AIMessages with tool_calls that do not have a corresponding ToolMessage. Here are the first few of those tool calls: [{'name': 'get_task', 'args': {'task_id': 'b55a35af-b676-4501-ab02-08396e00bf4a'}, 'id': 'toolu_01GExmK6qCiDQLv5HrHwFQ8x', 'type': 'tool_call'}, {'name': 'get_project_structure', 'args': {}, 'id': 'toolu_011hpY4uMDjFUTgRBYFMnFV6', 'type': 'tool_call'}, ....
Messages
Here are two messages in a row:
{
"content": [
{
"text": "I'll help you implement the task as requested. First, let's retrieve the task details to understand what needs to be done.",
"type": "text",
"index": 0
},
{
"id": "toolu_01GExmK6qCiDQLv5HrHwFQ8x",
"input": {
},
{
"content": "{"id": "b55a35af-b676-4501-ab02-08396e00bf4a", .... CONTENT TRUNCATED, JSON IS VALID ....}",
"additional_kwargs": {
}
The tool invocation ids seem to match, however, I am still getting the invalid history error.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions