langchain-ai / langchain

🦜🔗 Build context-aware reasoning applications
https://python.langchain.com
MIT License
92.25k stars 14.72k forks source link

TypeError: Got unknown type 'ToolMessage'. #25490

Open Liberation-happy opened 4 weeks ago

Liberation-happy commented 4 weeks ago

Issue with current documentation:

when use the ChatZhipuAi in langchain_community with langgraph to build a agent, the class ChatZhipuAi unkown the ToolMessage, this make the zhipuai can not use in langgraph.

Idea or request for content:

to add the ToolMessage in ChatZhipuAI, I think this can solve this problem.

gbaian10 commented 4 weeks ago

This sounds like an issue with the ChatZhipuAI model itself. Maybe the model doesn't accept ToolMessage, or the implementation in langchain_community hasn't been updated. I think this issue is unrelated to LangGraph because ToolMessage is an object of LangChain. Raising an issue in the LangChain repo should make it easier to find someone to help you.

maang-h commented 3 weeks ago

@Liberation-happy Can you paste your running code?