mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-13 04:33:42 +08:00
feat: 支持 ChatSession 级别插件功能开关
This commit is contained in:
@@ -200,20 +200,12 @@ async function handle(req: NextRequest) {
|
||||
presencePenalty: reqBody.presence_penalty,
|
||||
frequencyPenalty: reqBody.frequency_penalty,
|
||||
});
|
||||
|
||||
let executor = await initializeAgentExecutorWithOptions(tools, llm, {
|
||||
agentType: "chat-conversational-react-description",
|
||||
const executor = await initializeAgentExecutorWithOptions(tools, llm, {
|
||||
agentType: "openai-functions",
|
||||
returnIntermediateSteps: true,
|
||||
maxIterations: 3,
|
||||
memory: memory,
|
||||
});
|
||||
if (reqBody.model.endsWith("0613"))
|
||||
executor = await initializeAgentExecutorWithOptions(tools, llm, {
|
||||
agentType: "openai-functions",
|
||||
returnIntermediateSteps: true,
|
||||
maxIterations: 3,
|
||||
memory: memory,
|
||||
});
|
||||
|
||||
executor.call(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user