This commit is contained in:
hailin 2025-05-27 18:14:27 +08:00
parent e8f542ef63
commit b81cd6e3d0
1 changed files with 7 additions and 1 deletions

View File

@ -171,10 +171,16 @@ export default function WorkspaceLayout({ children }: WorkspaceLayoutProps) {
const modelData = await getModelWorkspacesByWorkspaceId(workspaceId)
setModels(modelData.models)
// setChatSettings({
// model: (searchParams.get("model") ||
// workspace?.default_model ||
// "gpt-4-1106-preview") as LLMID,
const firstModel = modelData.models[0]?.model_id || "gpt"; // 默认兜底
setChatSettings({
model: (searchParams.get("model") ||
workspace?.default_model ||
"gpt-4-1106-preview") as LLMID,
firstModel) as LLMID,
prompt:
workspace?.default_prompt ||
t("chat.promptPlaceholder"),