fix: stream output

This commit is contained in:
Hk-Gosuto 2024-08-28 14:48:35 +08:00
parent ab54303e7b
commit cf243c990f

View File

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