From 43f9342b48542088c45e778a86e4f6e6d2dfa7a9 Mon Sep 17 00:00:00 2001 From: akkadaska Date: Fri, 3 May 2024 22:46:49 +0900 Subject: [PATCH] Remove deprecated createAndStream method, use stream instead --- app/api/assistants/threads/[threadId]/messages/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/assistants/threads/[threadId]/messages/route.ts b/app/api/assistants/threads/[threadId]/messages/route.ts index d6fd2dd0..fc6a0a28 100644 --- a/app/api/assistants/threads/[threadId]/messages/route.ts +++ b/app/api/assistants/threads/[threadId]/messages/route.ts @@ -12,7 +12,7 @@ export async function POST(request, { params: { threadId } }) { content: content, }); - const stream = openai.beta.threads.runs.createAndStream(threadId, { + const stream = openai.beta.threads.runs.stream(threadId, { assistant_id: assistantId, });