mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-29 01:01:11 +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>/
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
"@google-ai/generativelanguage": "^2.5.0",
|
||||
"@google/generative-ai": "^0.15.0",
|
||||
"@huggingface/inference": "^2.6.1",
|
||||
"@langchain/aws": "^0.0.6",
|
||||
"@langchain/anthropic": "^0.2.1",
|
||||
"@langchain/aws": "^0.0.9",
|
||||
"@langchain/cohere": "^0.0.7",
|
||||
"@langchain/community": "^0.2.17",
|
||||
"@langchain/core": "0.2.18",
|
||||
|
||||
Reference in New Issue
Block a user