aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/chatbot/agentsystem
diff options
context:
space:
mode:
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) {