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"),