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:
parent
48bf8973fd
commit
cd4d27e998
@ -43,12 +43,28 @@ export function streamText(messages: Messages, env: Env, options?: StreamingOpti
|
|||||||
// Use stock photos from unsplash where appropriate, only valid URLs you know exist. Do not download the images, only link to them in image tags.
|
// Use stock photos from unsplash where appropriate, only valid URLs you know exist. Do not download the images, only link to them in image tags.
|
||||||
// `;
|
// `;
|
||||||
|
|
||||||
|
// return _streamText({
|
||||||
|
// // model: azure('gpt-4o'),
|
||||||
|
// model: azure('gpt-4o-2'),
|
||||||
|
// system: getSystemPrompt(),
|
||||||
|
// messages: convertToCoreMessages(messages),
|
||||||
|
// maxTokens: 8192,
|
||||||
|
// ...options,
|
||||||
|
// });
|
||||||
|
|
||||||
|
const anthropic = createAnthropic({
|
||||||
|
baseURL: process.env.RAKUTEN_AI_ANTHROPIC_URL,
|
||||||
|
apiKey: 'test',
|
||||||
|
});
|
||||||
|
|
||||||
return _streamText({
|
return _streamText({
|
||||||
// model: azure('gpt-4o'),
|
model: anthropic('claude-3-7-sonnet-20250219'),
|
||||||
model: azure('gpt-4o-2'),
|
|
||||||
system: getSystemPrompt(),
|
system: getSystemPrompt(),
|
||||||
|
maxTokens: 16384,
|
||||||
|
headers: {
|
||||||
|
Authorization: `Bearer ${process.env.RAKUTEN_AI_GATEWAY_KEY}`,
|
||||||
|
},
|
||||||
messages: convertToCoreMessages(messages),
|
messages: convertToCoreMessages(messages),
|
||||||
maxTokens: 8192,
|
|
||||||
...options,
|
...options,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user