Unverified Commit df82c460 authored by Hugh's avatar Hugh Committed by GitHub

docs: Fix code example syntax error (#69033)

parent b4c880dc
...@@ -324,7 +324,7 @@ Streaming is commonly used in combination with Large Language Models (LLMs), suc ...@@ -324,7 +324,7 @@ Streaming is commonly used in combination with Large Language Models (LLMs), suc
import { openai } from '@ai-sdk/openai' import { openai } from '@ai-sdk/openai'
import { StreamingTextResponse, streamText } from 'ai' import { StreamingTextResponse, streamText } from 'ai'
export async function POST(req) { export async function POST(req: Request) {
const { messages } = await req.json() const { messages } = await req.json()
const result = await streamText({ const result = await streamText({
model: openai('gpt-4-turbo'), model: openai('gpt-4-turbo'),
...@@ -339,7 +339,7 @@ export async function POST(req) { ...@@ -339,7 +339,7 @@ export async function POST(req) {
import { openai } from '@ai-sdk/openai' import { openai } from '@ai-sdk/openai'
import { StreamingTextResponse, streamText } from 'ai' import { StreamingTextResponse, streamText } from 'ai'
export async function POST(req: Request) { export async function POST(req) {
const { messages } = await req.json() const { messages } = await req.json()
const result = await streamText({ const result = await streamText({
model: openai('gpt-4-turbo'), model: openai('gpt-4-turbo'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment