This commit is contained in:
Leon van Zyl
2025-08-11 12:38:39 +02:00
parent 2af182a3a8
commit c412e6e76d
21 changed files with 7522 additions and 120 deletions

13
src/app/api/chat/route.ts Normal file
View File

@@ -0,0 +1,13 @@
import { openai } from "@ai-sdk/openai"
import { streamText } from "ai"
export async function POST(req: Request) {
const { messages } = await req.json()
const result = streamText({
model: openai("gpt-3.5-turbo"),
messages,
})
return result.toDataStreamResponse()
}