useChat with generateText (maxRoundTrips)? #2093
Unanswered
benjaminalgreen
asked this question in
Help
Replies: 2 comments 3 replies
-
Here is a guide for using |
Beta Was this translation helpful? Give feedback.
3 replies
-
Hi @lgrammel, I'm also interested in using Quick preliminary escape hatch I've come up with: <div>
{messages.map((m) => (
<div key={m.id}>
{m.role === "user" && "You: " + m.content}
{m.role === "assistant" && "AI: " + JSON.parse(m.content).messages[0].content[0].text}
</div>
))}
</div> What do you think? What would you recommend todo? P.S. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to useChat with generateText instead of streamText? Is there a best practice for appending generated text to the message stream and sending it back to the frontend?
Main reason for this is that I'm using the new maxroundtrips with generateText, but still want to have a chat UI. Alternatively, is there a good way to feed tool results into the message stream for streamText?
Beta Was this translation helpful? Give feedback.
All reactions