Update stream-text.ts

This commit is contained in:
Yaqub Mahmoud 2025-01-23 17:18:03 +09:00
parent 4fb31a4fc4
commit 09682b5528

View File

@ -44,19 +44,19 @@ export function streamText(messages: Messages, env: Env, options?: StreamingOpti
apiKey: getAPIKey(env), apiKey: getAPIKey(env),
}); });
const azure = createAzure({ // const azure = createAzure({
apiKey: '', // apiKey: '',
resourceName: '', // resourceName: '',
}); // });
return _streamText({ return _streamText({
model: anthropic('claude-3-5-sonnet-20240620'), model: anthropic('claude-3-5-sonnet-20240620'),
// model: azure('gpt-4o'), // model: azure('gpt-4o'),
system: getSystemPrompt(), system: getSystemPrompt(),
messages: convertToCoreMessages(messages), messages: convertToCoreMessages(messages),
// headers: { headers: {
// 'anthropic-beta': 'max-tokens-3-5-sonnet-2024-07-15', 'anthropic-beta': 'max-tokens-3-5-sonnet-2024-07-15',
// }, },
maxTokens: MAX_TOKENS, maxTokens: MAX_TOKENS,
...options, ...options,
}); });