-
I have a rag chatbot, currently using usechat and streamtext, configured with openai. I know there's streamObject and useObject, but streamObject doesn't let you use tools, and useObject doesn't manage the conversations the same way that useChat does. How might I go about achieving this? Or am I missing something obvious? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
Streaming data might be a better fit for your use case: https://sdk.vercel.ai/docs/ai-sdk-ui/streaming-data |
Beta Was this translation helpful? Give feedback.
-
Hello I have fixed it on client side with an util who can parse and repair the partial json so you don't have to do anything on backend side |
Beta Was this translation helpful? Give feedback.
Appreciate the responses. Ended up using streaming data and nesting a generateobject in the onfinish of the streamtext to generate the citation object. Feels a bit clunky, but gets the job done.