fix(tools): revert CustomTool __init__ to upstream, remove redundant schema parsing
The _parse_openapi_schema() method already handles string-to-dict conversion internally, so the duplicate json.loads in __init__ was unnecessary.
This commit is contained in:
@@ -32,13 +32,6 @@ class CustomTool(BaseTool):
|
||||
self.timeout = config.get("timeout", 30)
|
||||
|
||||
# 解析schema
|
||||
schema = self.schema_content
|
||||
if isinstance(schema, str):
|
||||
try:
|
||||
schema = json.loads(schema)
|
||||
self.schema_content = schema
|
||||
except json.JSONDecodeError:
|
||||
schema = {}
|
||||
self._parsed_operations = self._parse_openapi_schema()
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user