From 5400cf24ded3bde5ba319bb9ab50602ce0fb9927 Mon Sep 17 00:00:00 2001 From: "A.J. Shulman" Date: Thu, 3 Apr 2025 12:15:09 -0400 Subject: fix: handles dependent fields and boolean values --- src/client/views/nodes/chatbot/agentsystem/Agent.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/client/views/nodes/chatbot/agentsystem') 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) { -- cgit v1.2.3-70-g09d2