fix: vercel 504

This commit is contained in:
Hk-Gosuto 2024-08-28 11:40:41 +08:00
parent a2a398302b
commit ab54303e7b

View File

@ -347,6 +347,7 @@ export class AgentApi {
customTools: any[],
) {
try {
process.env.LANGCHAIN_CALLBACKS_BACKGROUND = 'true';
let useTools = reqBody.useTools ?? [];
const serverConfig = getServerSideConfig();
@ -481,7 +482,6 @@ export class AgentApi {
tools,
maxIterations: reqBody.maxIterations,
});
process.env.LANGCHAIN_CALLBACKS_BACKGROUND = 'true';
await agentExecutor
.invoke(
{