Fix bool and null handling (#1771)

This commit is contained in:
Karan Vaidya
2024-12-17 02:53:53 +05:30
committed by GitHub
parent 6d7c1b0743
commit 94eaa6740e

View File

@@ -419,9 +419,10 @@ class ToolUsage:
elif value.lower() in [
"true",
"false",
"null",
]: # Check for boolean and null values
value = value.lower()
value = value.lower().capitalize()
elif value.lower() == "null":
value = "None"
else:
# Assume the value is a string and needs quotes
value = '"' + value.replace('"', '\\"') + '"'