Skip to content

Commit 7b116ce

Browse files
fix: allow subsequent tool calls
1 parent d1232fb commit 7b116ce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

templates/components/engines/typescript/agent/tools/interpreter.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,13 @@ export class InterpreterTool implements BaseTool<InterpreterParameter> {
107107

108108
async call(input: InterpreterParameter): Promise<InterpreterToolOutput> {
109109
const result = await this.codeInterpret(input.code);
110-
await this.codeInterpreter?.close();
111110
return result;
112111
}
113112

113+
async close() {
114+
await this.codeInterpreter?.close();
115+
}
116+
114117
private async getExtraResult(
115118
res?: Result,
116119
): Promise<InterpreterExtraResult[]> {

0 commit comments

Comments
 (0)