File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -140,13 +140,15 @@ const formSubmit = async (e: React.FormEvent) => {
140140
141141// chat-message.tsx, maybe?
142142import { useStream } from " @convex-dev/persistent-text-streaming/react" ;
143+
143144// ...
145+
144146// In our component:
145147const { text, status } = useStream (
146148 api .chat .getChatBody , // The query to call for the full stream body
147149 new URL (` ${convexSiteUrl }/chat-stream ` ), // The HTTP endpoint for streaming
148- driven , // Set to true if this browser session created this chat and so should generate the stream
149- message .streamId as StreamId // The streamId of the chat to subscribe to!
150+ driven , // True if this browser session created this chat and should generate the stream
151+ chat .streamId as StreamId // The streamId from the chat database record
150152);
151153```
152154
You can’t perform that action at this time.
0 commit comments