aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/chatbot/agentsystem
diff options
context:
space:
mode:
authorA.J. Shulman <Shulman.aj@gmail.com>2025-04-03 12:15:09 -0400
committerA.J. Shulman <Shulman.aj@gmail.com>2025-04-03 12:15:09 -0400
commit5400cf24ded3bde5ba319bb9ab50602ce0fb9927 (patch)
tree7170f47b4cd8f3d435c48184df912bb72ade52df /src/client/views/nodes/chatbot/agentsystem
parenta99d8df26d331d87bae4f27cd52ce5ec4d97fa7a (diff)
fix: handles dependent fields and boolean values
Diffstat (limited to 'src/client/views/nodes/chatbot/agentsystem')
-rw-r--r--src/client/views/nodes/chatbot/agentsystem/Agent.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/client/views/nodes/chatbot/agentsystem/Agent.ts b/src/client/views/nodes/chatbot/agentsystem/Agent.ts
index b5cdb8cf1..0610dc198 100644
--- a/src/client/views/nodes/chatbot/agentsystem/Agent.ts
+++ b/src/client/views/nodes/chatbot/agentsystem/Agent.ts
@@ -461,12 +461,12 @@ export class Agent {
}
console.log(actionInput);
- // Special handling for documentMetadata tool with numeric fieldValue
- if (action === 'documentMetadata' &&
- 'fieldValue' in actionInput &&
- typeof actionInput.fieldValue === 'number') {
- // Convert number to string to pass validation
- actionInput.fieldValue = String(actionInput.fieldValue);
+ // Special handling for documentMetadata tool with numeric or boolean fieldValue
+ if (action === 'documentMetadata' && 'fieldValue' in actionInput) {
+ if (typeof actionInput.fieldValue === 'number' || typeof actionInput.fieldValue === 'boolean') {
+ // Convert number or boolean to string to pass validation
+ actionInput.fieldValue = String(actionInput.fieldValue);
+ }
}
for (const param of this.tools[action].parameterRules) {