mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 16:18:30 +00:00
Fix bool and null handling (#1771)
This commit is contained in:
@@ -419,9 +419,10 @@ class ToolUsage:
|
|||||||
elif value.lower() in [
|
elif value.lower() in [
|
||||||
"true",
|
"true",
|
||||||
"false",
|
"false",
|
||||||
"null",
|
|
||||||
]: # Check for boolean and null values
|
]: # Check for boolean and null values
|
||||||
value = value.lower()
|
value = value.lower().capitalize()
|
||||||
|
elif value.lower() == "null":
|
||||||
|
value = "None"
|
||||||
else:
|
else:
|
||||||
# Assume the value is a string and needs quotes
|
# Assume the value is a string and needs quotes
|
||||||
value = '"' + value.replace('"', '\\"') + '"'
|
value = '"' + value.replace('"', '\\"') + '"'
|
||||||
|
|||||||
Reference in New Issue
Block a user