mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-10 04:00:24 +00:00
change model (#420)
This commit is contained in:
commit
dfe8379f75
2 changed files with 26 additions and 16 deletions
|
|
@ -213,8 +213,9 @@ export default function SettingModels() {
|
|||
if (res.is_tool_calls && res.is_valid) {
|
||||
console.log("success");
|
||||
toast(t("setting.validate-success"), {
|
||||
description:
|
||||
t("setting.the-model-has-been-verified-to-support-function-calling-which-is-required-to-use-eigent"),
|
||||
description: t(
|
||||
"setting.the-model-has-been-verified-to-support-function-calling-which-is-required-to-use-eigent"
|
||||
),
|
||||
closeButton: true,
|
||||
});
|
||||
} else {
|
||||
|
|
@ -370,8 +371,9 @@ export default function SettingModels() {
|
|||
if (res.is_tool_calls && res.is_valid) {
|
||||
console.log("success");
|
||||
toast(t("setting.validate-success"), {
|
||||
description:
|
||||
t("setting.the-model-has-been-verified-to-support-function-calling-which-is-required-to-use-eigent"),
|
||||
description: t(
|
||||
"setting.the-model-has-been-verified-to-support-function-calling-which-is-required-to-use-eigent"
|
||||
),
|
||||
closeButton: true,
|
||||
});
|
||||
} else {
|
||||
|
|
@ -474,7 +476,9 @@ export default function SettingModels() {
|
|||
if (!hasSearchKey) {
|
||||
// Show warning toast instead of blocking
|
||||
toast(t("setting.warning-google-search-not-configured"), {
|
||||
description: t("setting.search-functionality-may-be-limited-without-google-api"),
|
||||
description: t(
|
||||
"setting.search-functionality-may-be-limited-without-google-api"
|
||||
),
|
||||
closeButton: true,
|
||||
});
|
||||
}
|
||||
|
|
@ -501,7 +505,9 @@ export default function SettingModels() {
|
|||
if (!hasSearchKey) {
|
||||
// Show warning toast instead of blocking
|
||||
toast(t("setting.warning-google-search-not-configured"), {
|
||||
description: t("setting.search-functionality-may-be-limited-without-google-api"),
|
||||
description: t(
|
||||
"setting.search-functionality-may-be-limited-without-google-api"
|
||||
),
|
||||
closeButton: true,
|
||||
});
|
||||
}
|
||||
|
|
@ -646,10 +652,8 @@ export default function SettingModels() {
|
|||
? t("setting.gpt-4.1-mini")
|
||||
: cloud_model_type === "gpt-4.1"
|
||||
? t("setting.gpt-4.1")
|
||||
: cloud_model_type === "claude-opus-4-1-20250805"
|
||||
? t("setting.claude-opus-4.1")
|
||||
: cloud_model_type === "claude-sonnet-4-20250514"
|
||||
? t("setting.claude-sonnet-4")
|
||||
: cloud_model_type === "claude-sonnet-4-5"
|
||||
? t("setting.claude-sonnet-4-5")
|
||||
: cloud_model_type === "claude-3-5-haiku-20241022"
|
||||
? t("setting.claude-3.5-haiku")
|
||||
: cloud_model_type === "gpt-5"
|
||||
|
|
@ -683,8 +687,8 @@ export default function SettingModels() {
|
|||
<SelectItem value="gpt-5">GPT-5</SelectItem>
|
||||
<SelectItem value="gpt-5-mini">GPT-5 mini</SelectItem>
|
||||
<SelectItem value="gpt-5-nano">GPT-5 nano</SelectItem>
|
||||
<SelectItem value="claude-sonnet-4-20250514">
|
||||
Claude Sonnet 4
|
||||
<SelectItem value="claude-sonnet-4-5">
|
||||
Claude Sonnet 4-5
|
||||
</SelectItem>
|
||||
<SelectItem value="claude-3-5-haiku-20241022">
|
||||
Claude 3.5 Haiku
|
||||
|
|
@ -760,7 +764,9 @@ export default function SettingModels() {
|
|||
<Input
|
||||
id={`apiKey-${item.id}`}
|
||||
type={showApiKey[idx] ? "text" : "password"}
|
||||
placeholder={` ${t("setting.enter-your-api-key")} ${item.name} ${t("setting.key")}`}
|
||||
placeholder={` ${t("setting.enter-your-api-key")} ${
|
||||
item.name
|
||||
} ${t("setting.key")}`}
|
||||
className="w-full pr-10"
|
||||
value={form[idx].apiKey}
|
||||
onChange={(e) => {
|
||||
|
|
@ -805,7 +811,9 @@ export default function SettingModels() {
|
|||
<div>
|
||||
<Input
|
||||
id={`apiHost-${item.id}`}
|
||||
placeholder={`${t("setting.enter-your-api-host")} ${item.name} ${t("setting.url")}`}
|
||||
placeholder={`${t("setting.enter-your-api-host")} ${
|
||||
item.name
|
||||
} ${t("setting.url")}`}
|
||||
className="w-full"
|
||||
value={form[idx].apiHost}
|
||||
onChange={(e) => {
|
||||
|
|
@ -833,7 +841,9 @@ export default function SettingModels() {
|
|||
<div>
|
||||
<Input
|
||||
id={`modelType-${item.id}`}
|
||||
placeholder={`${t("setting.enter-your-model-type")} ${item.name} ${t("setting.model-type")}`}
|
||||
placeholder={`${t("setting.enter-your-model-type")} ${
|
||||
item.name
|
||||
} ${t("setting.model-type")}`}
|
||||
className="w-full"
|
||||
value={form[idx].model_type}
|
||||
onChange={(e) => {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { persist } from 'zustand/middleware';
|
|||
// type definition
|
||||
type InitState = 'permissions' | 'carousel' | 'done';
|
||||
type ModelType = 'cloud' | 'local' | 'custom';
|
||||
type CloudModelType = 'gemini/gemini-2.5-pro' | 'gemini-2.5-flash' | 'gpt-4.1-mini' | 'gpt-4.1' | 'claude-opus-4-1-20250805' | 'claude-sonnet-4-20250514' | 'claude-3-5-haiku-20241022' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano';
|
||||
type CloudModelType = 'gemini/gemini-2.5-pro' | 'gemini-2.5-flash' | 'gpt-4.1-mini' | 'gpt-4.1' | 'claude-sonnet-4-5' | 'claude-3-5-haiku-20241022' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano';
|
||||
|
||||
// auth info interface
|
||||
interface AuthInfo {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue