Skip to content

Commit

Permalink
Fix #602
Browse files Browse the repository at this point in the history
  • Loading branch information
italovieira committed May 15, 2024
1 parent 38fc551 commit a670ccd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crewai/tools/tool_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def _validate_tool_input(self, tool_input: str) -> str:
formatted_value = value.lower()
else:
# Assume the value is a string and needs quotes
formatted_value = '"' + value.replace('"', '\\"') + '"'
formatted_value = '"' + value.strip('"').replace('"', '\\"') + '"'

# Rebuild the entry with proper quoting
formatted_entry = f'"{key}": {formatted_value}'
Expand Down

0 comments on commit a670ccd

Please sign in to comment.