Replies: 2 comments
-
i'm facing the same issue as you. i have opened a new discussion here #1374. inside, there are a few approaches i found online. u might find them useful. in event, you found a solution, appreciate if you can let me know how you solved this too because i am also looking around for a solution |
Beta Was this translation helpful? Give feedback.
-
It looks like Vercel is suggesting the new LangChainAdapter for this with the recent updates (~3.2 I believe). I removed LangChain in the meantime but may try reimplementing with this, sharing for anyone else concerned: https://sdk.vercel.ai/docs/reference/stream-helpers/langchain-adapter |
Beta Was this translation helpful? Give feedback.
-
I've been trying for days to get a simple callback running after my LangChain stream is complete with no luck. I've tried a couple of methods but the one that seems to be recommended is https://sdk.vercel.ai/docs/api-reference/providers/langchain-stream
Here is my simplified code right now:
Ultimately I'm trying to save the history of messages as a chat object once the stream is complete. But I can't even seem to get a console.log to run after the stream is complete. I tried
onCompletion
as well asonFinal
and with and withoutasync
. Please help.Beta Was this translation helpful? Give feedback.
All reactions