mirror of
https://github.com/stackblitz/bolt.new
synced 2025-06-26 18:17:50 +00:00
Update stream-text.ts
This commit is contained in:
@@ -44,25 +44,21 @@ export function streamText(messages: Messages, env: Env, options?: StreamingOpti
|
||||
apiKey: getAPIKey(env),
|
||||
});
|
||||
|
||||
// const azure = createAzure({
|
||||
// apiKey: '',
|
||||
// resourceName: '',
|
||||
// });
|
||||
const azure = createAzure({
|
||||
apiKey: '',
|
||||
resourceName: '',
|
||||
});
|
||||
|
||||
return _streamText({
|
||||
model: anthropic('claude-3-5-sonnet-20240620'),
|
||||
// model: azure('gpt-4o'),
|
||||
model: azure('gpt-4o'),
|
||||
system: getSystemPrompt(),
|
||||
messages: convertToCoreMessages(messages),
|
||||
headers: {
|
||||
'anthropic-beta': 'max-tokens-3-5-sonnet-2024-07-15',
|
||||
},
|
||||
maxTokens: MAX_TOKENS,
|
||||
maxTokens: 4096,
|
||||
...options,
|
||||
});
|
||||
|
||||
// return _streamText({
|
||||
// model: getAnthropicModel(getAPIKey(env)),
|
||||
// model: anthropic('claude-3-5-sonnet-20240620'),
|
||||
// system: getSystemPrompt(),
|
||||
// maxTokens: MAX_TOKENS,
|
||||
// headers: {
|
||||
|
||||
Reference in New Issue
Block a user