Why does ToolMessage in langgraph-sdk not include artifact like @langchain/core? #4980
vikram-typeset
started this conversation in
Discussions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi LangGraph team,
I'm working on a project where I'm using the
useStream
hook from the LangGraph Cloud guide ([link](https://langchain-ai.github.io/langgraph/cloud/how-tos/use_stream_react/)) to connect a React frontend with a backend that streams LangGraph events.From the backend, I'm setting an
artifact
inToolMessage
objects, which works fine when using@langchain/core
. Here's a simplified example:However, the
ToolMessage
type from@langchain/langgraph-sdk
doesn’t appear to supportartifact
:This causes issues on the frontend because the
useStream
hook expects LangGraph's message format, and so I can't access theartifact
that I know was generated by the tool.Questions:
artifact
in@langchain/langgraph-sdk
'sToolMessage
intentional?@langchain/core
?useStream
with LangGraph Cloud?Thanks for your great work!
Beta Was this translation helpful? Give feedback.
All reactions