Skip to content

Commit

Permalink
Update: fix typo in 02-nextjs-app-router.mdx (#1547)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMaina100 committed May 10, 2024
1 parent 68fd43d commit 1b9e2fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/docs/02-getting-started/02-nextjs-app-router.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Let's take a look at what is happening in this code:
3. The `streamText` function will return a [`StreamTextResult`](/docs/reference/ai-sdk-core/stream-text#result-object). This result object contains the [ `toAIStream` ](/docs/reference/ai-sdk-core/stream-text#to-ai-stream) function which will be used in the next step to convert the stream into a format compatible with `StreamingTextResponse`.
4. Finally, you send the result to the client by returning a new [`StreamingTextResponse`](/docs/reference/stream-helpers/streaming-text-response), passing the AI Stream from the `result` object described in the previous step. This will set the required headers and response details to allow the client to stream the response.

This Route Handler creates a POST request endpint at `/api/chat`.
This Route Handler creates a POST request endpoint at `/api/chat`.

## Wire up the UI

Expand Down

0 comments on commit 1b9e2fb

Please sign in to comment.