diff --git a/app/client/platforms/anthropic.ts b/app/client/platforms/anthropic.ts index fce675a1671..7dd39c9cddc 100644 --- a/app/client/platforms/anthropic.ts +++ b/app/client/platforms/anthropic.ts @@ -203,7 +203,7 @@ export class ClaudeApi implements LLMApi { const [tools, funcs] = usePluginStore .getState() .getAsTools( - useChatStore.getState().currentSession().mask?.plugin as string[], + useChatStore.getState().currentSession().mask?.plugin || [], ); return stream( path, diff --git a/app/client/platforms/moonshot.ts b/app/client/platforms/moonshot.ts index c38d3317bd0..cd10d2f6c15 100644 --- a/app/client/platforms/moonshot.ts +++ b/app/client/platforms/moonshot.ts @@ -125,7 +125,7 @@ export class MoonshotApi implements LLMApi { const [tools, funcs] = usePluginStore .getState() .getAsTools( - useChatStore.getState().currentSession().mask?.plugin as string[], + useChatStore.getState().currentSession().mask?.plugin || [], ); return stream( chatPath, diff --git a/app/client/platforms/openai.ts b/app/client/platforms/openai.ts index b3b306d1d11..780ef0676dd 100644 --- a/app/client/platforms/openai.ts +++ b/app/client/platforms/openai.ts @@ -244,7 +244,7 @@ export class ChatGPTApi implements LLMApi { const [tools, funcs] = usePluginStore .getState() .getAsTools( - useChatStore.getState().currentSession().mask?.plugin as string[], + useChatStore.getState().currentSession().mask?.plugin || [], ); // console.log("getAsTools", tools, funcs); stream(