fix(web): expose gemini api key and model settings
This commit is contained in:
parent
800b47ea49
commit
a5fd7a41a6
1 changed files with 24 additions and 0 deletions
|
|
@ -30,10 +30,13 @@ const apiKeyProviders = new Set([
|
||||||
"brave",
|
"brave",
|
||||||
"tavily",
|
"tavily",
|
||||||
"perplexity",
|
"perplexity",
|
||||||
|
"gemini",
|
||||||
"glm_search",
|
"glm_search",
|
||||||
"baidu_search",
|
"baidu_search",
|
||||||
])
|
])
|
||||||
|
|
||||||
|
const modelProviders = new Set(["gemini"])
|
||||||
|
|
||||||
export function WebSearchProviderSettings({
|
export function WebSearchProviderSettings({
|
||||||
providerLabelMap,
|
providerLabelMap,
|
||||||
settings,
|
settings,
|
||||||
|
|
@ -226,6 +229,27 @@ function ProviderCard({
|
||||||
/>
|
/>
|
||||||
</ProviderField>
|
</ProviderField>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{modelProviders.has(providerId) && (
|
||||||
|
<ProviderField
|
||||||
|
label={t("pages.agent.tools.web_search.model", "Model")}
|
||||||
|
>
|
||||||
|
<Input
|
||||||
|
value={settings.model ?? ""}
|
||||||
|
onChange={(event) =>
|
||||||
|
updateSettings((current) => ({
|
||||||
|
...current,
|
||||||
|
model: event.target.value,
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
placeholder={t(
|
||||||
|
"pages.agent.tools.web_search.model_placeholder",
|
||||||
|
"Optional model override",
|
||||||
|
)}
|
||||||
|
className="bg-muted/40 hover:bg-muted/60 focus:bg-background focus:ring-primary/20 h-10 rounded-xl border-transparent shadow-none transition-colors"
|
||||||
|
/>
|
||||||
|
</ProviderField>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue