mirror of
https://github.com/stackblitz/bolt.new
synced 2025-02-05 20:46:43 +00:00
Fixing up codebase after merging pull requests
This commit is contained in:
parent
c31c37fae4
commit
d7bda6f0e9
@ -18,7 +18,7 @@ ANTHROPIC_API_KEY=
|
|||||||
# Get your OpenRouter API Key in your account settings -
|
# Get your OpenRouter API Key in your account settings -
|
||||||
# https://openrouter.ai/settings/keys
|
# https://openrouter.ai/settings/keys
|
||||||
# You only need this environment variable set if you want to use OpenRouter models
|
# You only need this environment variable set if you want to use OpenRouter models
|
||||||
OPEN_ROUTER_API_KEY=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
|
OPEN_ROUTER_API_KEY=
|
||||||
|
|
||||||
# Get your Google Generative AI API Key by following these instructions -
|
# Get your Google Generative AI API Key by following these instructions -
|
||||||
# https://console.cloud.google.com/apis/credentials
|
# https://console.cloud.google.com/apis/credentials
|
||||||
|
@ -30,7 +30,11 @@ const ModelSelector = ({ model, setModel, modelList, providerList }) => {
|
|||||||
<div className="mb-2">
|
<div className="mb-2">
|
||||||
<select
|
<select
|
||||||
value={provider}
|
value={provider}
|
||||||
onChange={(e) => setProvider(e.target.value)}
|
onChange={(e) => {
|
||||||
|
setProvider(e.target.value);
|
||||||
|
const firstModel = [...modelList].find(m => m.provider == e.target.value);
|
||||||
|
setModel(firstModel ? firstModel.name : '');
|
||||||
|
}}
|
||||||
className="w-full p-2 rounded-lg border border-bolt-elements-borderColor bg-bolt-elements-prompt-background text-bolt-elements-textPrimary focus:outline-none"
|
className="w-full p-2 rounded-lg border border-bolt-elements-borderColor bg-bolt-elements-prompt-background text-bolt-elements-textPrimary focus:outline-none"
|
||||||
>
|
>
|
||||||
{providerList.map((provider) => (
|
{providerList.map((provider) => (
|
||||||
@ -38,23 +42,24 @@ const ModelSelector = ({ model, setModel, modelList, providerList }) => {
|
|||||||
{provider}
|
{provider}
|
||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
|
<option key="Ollama" value="Ollama">
|
||||||
|
Ollama
|
||||||
|
</option>
|
||||||
</select>
|
</select>
|
||||||
<select
|
<select
|
||||||
value={model}
|
value={model}
|
||||||
provider={provider}
|
|
||||||
onChange={(e) => setModel(e.target.value)}
|
onChange={(e) => setModel(e.target.value)}
|
||||||
className="w-full p-2 rounded-lg border border-bolt-elements-borderColor bg-bolt-elements-prompt-background text-bolt-elements-textPrimary focus:outline-none"
|
className="w-full p-2 rounded-lg border border-bolt-elements-borderColor bg-bolt-elements-prompt-background text-bolt-elements-textPrimary focus:outline-none"
|
||||||
>
|
>
|
||||||
{[...modelList].filter( e => e.provider == provider ).map((modelOption) => (
|
{[...modelList].filter(e => e.provider == provider && e.name).map((modelOption) => (
|
||||||
<option key={modelOption.name} value={modelOption.name}>
|
<option key={modelOption.name} value={modelOption.name}>
|
||||||
{modelOption.label}
|
{modelOption.label}
|
||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
};
|
||||||
|
|
||||||
const TEXTAREA_MIN_HEIGHT = 76;
|
const TEXTAREA_MIN_HEIGHT = 76;
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ai-sdk/anthropic": "^0.0.39",
|
"@ai-sdk/anthropic": "^0.0.39",
|
||||||
|
"@ai-sdk/google": "^0.0.52",
|
||||||
"@ai-sdk/openai": "^0.0.66",
|
"@ai-sdk/openai": "^0.0.66",
|
||||||
"@codemirror/autocomplete": "^6.17.0",
|
"@codemirror/autocomplete": "^6.17.0",
|
||||||
"@codemirror/commands": "^6.6.0",
|
"@codemirror/commands": "^6.6.0",
|
||||||
|
@ -14,6 +14,9 @@ importers:
|
|||||||
'@ai-sdk/anthropic':
|
'@ai-sdk/anthropic':
|
||||||
specifier: ^0.0.39
|
specifier: ^0.0.39
|
||||||
version: 0.0.39(zod@3.23.8)
|
version: 0.0.39(zod@3.23.8)
|
||||||
|
'@ai-sdk/google':
|
||||||
|
specifier: ^0.0.52
|
||||||
|
version: 0.0.52(zod@3.23.8)
|
||||||
'@ai-sdk/openai':
|
'@ai-sdk/openai':
|
||||||
specifier: ^0.0.66
|
specifier: ^0.0.66
|
||||||
version: 0.0.66(zod@3.23.8)
|
version: 0.0.66(zod@3.23.8)
|
||||||
@ -255,6 +258,12 @@ packages:
|
|||||||
peerDependencies:
|
peerDependencies:
|
||||||
zod: ^3.0.0
|
zod: ^3.0.0
|
||||||
|
|
||||||
|
'@ai-sdk/google@0.0.52':
|
||||||
|
resolution: {integrity: sha512-bfsA/1Ae0SQ6NfLwWKs5SU4MBwlzJjVhK6bTVBicYFjUxg9liK/W76P1Tq/qK9OlrODACz3i1STOIWsFPpIOuQ==}
|
||||||
|
engines: {node: '>=18'}
|
||||||
|
peerDependencies:
|
||||||
|
zod: ^3.0.0
|
||||||
|
|
||||||
'@ai-sdk/openai@0.0.66':
|
'@ai-sdk/openai@0.0.66':
|
||||||
resolution: {integrity: sha512-V4XeDnlNl5/AY3GB3ozJUjqnBLU5pK3DacKTbCNH3zH8/MggJoH6B8wRGdLUPVFMcsMz60mtvh4DC9JsIVFrKw==}
|
resolution: {integrity: sha512-V4XeDnlNl5/AY3GB3ozJUjqnBLU5pK3DacKTbCNH3zH8/MggJoH6B8wRGdLUPVFMcsMz60mtvh4DC9JsIVFrKw==}
|
||||||
engines: {node: '>=18'}
|
engines: {node: '>=18'}
|
||||||
@ -5371,6 +5380,13 @@ snapshots:
|
|||||||
'@ai-sdk/provider-utils': 1.0.9(zod@3.23.8)
|
'@ai-sdk/provider-utils': 1.0.9(zod@3.23.8)
|
||||||
zod: 3.23.8
|
zod: 3.23.8
|
||||||
|
|
||||||
|
'@ai-sdk/google@0.0.52(zod@3.23.8)':
|
||||||
|
dependencies:
|
||||||
|
'@ai-sdk/provider': 0.0.24
|
||||||
|
'@ai-sdk/provider-utils': 1.0.20(zod@3.23.8)
|
||||||
|
json-schema: 0.4.0
|
||||||
|
zod: 3.23.8
|
||||||
|
|
||||||
'@ai-sdk/openai@0.0.66(zod@3.23.8)':
|
'@ai-sdk/openai@0.0.66(zod@3.23.8)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@ai-sdk/provider': 0.0.24
|
'@ai-sdk/provider': 0.0.24
|
||||||
|
Loading…
Reference in New Issue
Block a user