langchain-ai / langgraphjs

Build resilient language agents as graphs.
https://langchain-ai.github.io/langgraphjs/
MIT License
674 stars 107 forks source link

Data stream protocol support #504

Open kdawgwilk opened 2 months ago

kdawgwilk commented 2 months ago

It would be fantastic if langgraph supported vercels new data stream protocol so that langgraph could basically be drop in for react apps already using the vercel ai SDK client side https://vercel.com/blog/ai-sdk-3-4#data-stream-protocol

jacoblee93 commented 2 months ago

Hey @kdawgwilk, yes would be great - for now you can use useChat with streamMode: "text":

https://github.com/langchain-ai/langchain-nextjs-template/blob/main/components/ChatWindow.tsx#L51

Will look into better support in general! I owe you a few things...

yamz8 commented 1 month ago

if you can make the Vercel adapter to support the graph state with useObject would be awesome