Fix `observation?.includes is not a function` (#2696)
This commit is contained in:
parent
0fc5e3d0c5
commit
18b83333d3
|
|
@ -96,6 +96,9 @@ export class DynamicStructuredTool<
|
||||||
await runManager?.handleToolError(e)
|
await runManager?.handleToolError(e)
|
||||||
throw e
|
throw e
|
||||||
}
|
}
|
||||||
|
if (result && typeof result !== 'string') {
|
||||||
|
result = JSON.stringify(result)
|
||||||
|
}
|
||||||
await runManager?.handleToolEnd(result)
|
await runManager?.handleToolEnd(result)
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue