Skip to content

Commit

Permalink
docs: fix two instances of { instead of [ (vercel#1041)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxLeiter authored Mar 2, 2024
1 parent cf5854a commit 6aead4f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions docs/pages/docs/api-reference/generative-ui/render.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ You can also customize the React component streamed for text responses by using
// text can be streamed from the LLM, but we only want to close the stream with .done() when its completed.
// done() marks the state as available for the client to access
if (done) {
aiState.done({
aiState.done([
...aiState.get(),
{
role: "assistant",
content
}
})
])
}

return <div>{content}</div>
Expand Down Expand Up @@ -169,13 +169,13 @@ If you use a generator signature, you can `yield` React Nodes and they will be s
// text can be streamed from the LLM, but we only want to close the stream with .done() when its completed.
// done() marks the state as available for the client to access
if (done) {
aiState.done({
aiState.done([
...aiState.get(),
{
role: "assistant",
content
}
})
])
}

return <div>{content}</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/docs/concepts/ai-rsc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,13 @@ Replace `xxxxxxxxx` with your actual OpenAI API key.
// text can be streamed from the LLM, but we only want to close the stream with .done() when its completed.
// done() marks the state as available for the client to access
if (done) {
aiState.done({
aiState.done([
...aiState.get(),
{
role: "assistant",
content
}
})
]);
}

return <div>{content}</div>
Expand Down

0 comments on commit 6aead4f

Please sign in to comment.