From ece20384bd02a79a03ef962fe228dcdc80db192b Mon Sep 17 00:00:00 2001 From: Yaqub Mahmoud Date: Wed, 29 Jan 2025 11:03:23 +0900 Subject: [PATCH] Update stream-text.ts --- app/lib/.server/llm/stream-text.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/lib/.server/llm/stream-text.ts b/app/lib/.server/llm/stream-text.ts index 760347f..800d23f 100644 --- a/app/lib/.server/llm/stream-text.ts +++ b/app/lib/.server/llm/stream-text.ts @@ -30,14 +30,17 @@ export function streamText(messages: Messages, env: Env, options?: StreamingOpti const azure = createAzure({ resourceName: azureResourceName, apiKey: azureResourceNameApiKey, + headers: { + 'api_version': '2024-11-20', + }, }); return _streamText({ - model: azure('gpt-4o'), - // model: azure('gpt-4o-2024-08-06'), + // model: azure('gpt-4o'), + model: azure('gpt-4o-2'), system: getSystemPrompt(), messages: convertToCoreMessages(messages), - maxTokens: 4096, + maxTokens: MAX_TOKENS, ...options, });