mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-13 20:53:45 +08:00
feat: 支持session级别插件开关
This commit is contained in:
@@ -61,7 +61,7 @@ export interface ChatSession {
|
||||
clearContextIndex?: number;
|
||||
|
||||
mask: Mask;
|
||||
useTools: boolean;
|
||||
usePlugins: boolean;
|
||||
}
|
||||
|
||||
export const DEFAULT_TOPIC = Locale.Store.DefaultTopic;
|
||||
@@ -85,7 +85,7 @@ function createEmptySession(): ChatSession {
|
||||
lastSummarizeIndex: 0,
|
||||
|
||||
mask: createEmptyMask(),
|
||||
useTools: true,
|
||||
usePlugins: true,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@ export const useChatStore = create<ChatStore>()(
|
||||
session.messages.push(botMessage);
|
||||
});
|
||||
|
||||
if (session.useTools && modelConfig.model.endsWith("0613")) {
|
||||
if (session.usePlugins) {
|
||||
console.log("[ToolAgent] start");
|
||||
api.llm.toolAgentChat({
|
||||
messages: sendMessages,
|
||||
|
||||
Reference in New Issue
Block a user