mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 15:00:57 +03:00
Bugfix/Tool Agent output message (#2990)
* add fix for tool agent output message * pin langchain core dependency
This commit is contained in:
@@ -135,7 +135,12 @@ class ToolAgent_Agents implements INode {
|
||||
}
|
||||
}
|
||||
|
||||
let output = res?.output as string
|
||||
let output = res?.output
|
||||
if (Array.isArray(output)) {
|
||||
output = output[0]?.text || ''
|
||||
} else if (typeof output === 'object') {
|
||||
output = output?.text || ''
|
||||
}
|
||||
|
||||
// Claude 3 Opus tends to spit out <thinking>..</thinking> as well, discard that in final output
|
||||
const regexPattern: RegExp = /<thinking>[\s\S]*?<\/thinking>/
|
||||
|
||||
Reference in New Issue
Block a user