Skip to content

MESSAGE_COERCION_FAILURE #85

@Mr-Yoje

Description

@Mr-Yoje

version: langgraph-checkpoint-redis 0.1.0

I run the graph using the following method.

async for node, , event_data in graph.astream(
input=input
,
config=config,
stream_mode=["messages", "updates"],
subgraphs=True,
)

The first time I send a message {"role": "user", "content": "hello"} it works fine, but when I send a second message with the same thread_id, it throws this error.

Message dict must contain 'role' and 'content' keys, got {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'messages', 'HumanMessage'], 'kwargs': {'content': 'nihao1111', 'type': 'human', 'id': '85e627b6-aba8-468d-9b8a-0552a66f2e68'}}
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/MESSAGE_COERCION_FAILURE

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions