Skip to content

Commit

Permalink
Remove the processing of single quote when testing API tools. (langge…
Browse files Browse the repository at this point in the history
  • Loading branch information
weimzh authored Dec 10, 2024
1 parent 9e23c3d commit 28231d3
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions api/core/tools/tool/api_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,6 @@ def _convert_body_property_type(self, property: dict[str, Any], value: Any) -> A
elif property["type"] == "object" or property["type"] == "array":
if isinstance(value, str):
try:
# an array str like '[1,2]' also can convert to list [1,2] through json.loads
# json not support single quote, but we can support it
value = value.replace("'", '"')
return json.loads(value)
except ValueError:
return value
Expand Down

0 comments on commit 28231d3

Please sign in to comment.