From b81cd6e3d0dc5bf08c866c6e950cb041a9015bbf Mon Sep 17 00:00:00 2001 From: hailin Date: Tue, 27 May 2025 18:14:27 +0800 Subject: [PATCH] . --- chatdesk-ui/app/[locale]/[workspaceid]/layout.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/chatdesk-ui/app/[locale]/[workspaceid]/layout.tsx b/chatdesk-ui/app/[locale]/[workspaceid]/layout.tsx index 7cf47f7..8bad98e 100644 --- a/chatdesk-ui/app/[locale]/[workspaceid]/layout.tsx +++ b/chatdesk-ui/app/[locale]/[workspaceid]/layout.tsx @@ -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"),