mirror of
https://github.com/stackblitz/bolt.new
synced 2025-06-26 18:17:50 +00:00
fix api enhancer
This commit is contained in:
parent
a93e91c433
commit
808d751f2f
@ -27,7 +27,7 @@ export function ProviderSelector() {
|
|||||||
'meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo',
|
'meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo',
|
||||||
'meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo',
|
'meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo',
|
||||||
'mistralai/Mixtral-8x7B-Instruct-v0.1',
|
'mistralai/Mixtral-8x7B-Instruct-v0.1',
|
||||||
// Add more Together AI models here
|
// You can add more Together AI models here
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -41,4 +41,4 @@ export function streamText(messages: Messages, env: Env, provider: Provider, opt
|
|||||||
}))),
|
}))),
|
||||||
...options,
|
...options,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -1,5 +1,5 @@
|
|||||||
import { atom } from 'nanostores';
|
import { atom } from 'nanostores';
|
||||||
|
// TODO: Add more providers
|
||||||
export type Provider = 'anthropic' | { type: 'together', model: string };
|
export type Provider = 'anthropic' | { type: 'together', model: string };
|
||||||
|
|
||||||
export const providerStore = atom<Provider>('anthropic');
|
export const providerStore = atom<Provider>('anthropic');
|
||||||
|
|||||||
@ -43,7 +43,6 @@ async function enhancerAction({ context, request }: ActionFunctionArgs) {
|
|||||||
.map(parseStreamPart)
|
.map(parseStreamPart)
|
||||||
.map((part) => part.value)
|
.map((part) => part.value)
|
||||||
.join('');
|
.join('');
|
||||||
|
|
||||||
controller.enqueue(encoder.encode(processedChunk));
|
controller.enqueue(encoder.encode(processedChunk));
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user