Update custom_tools.py
Browse files- custom_tools.py +11 -1
custom_tools.py
CHANGED
@@ -22,7 +22,17 @@ class WebpageStructureAnalyzerTool(Tool):
|
|
22 |
"to extract detailed information."
|
23 |
)
|
24 |
# Use Pydantic V2's .model_json_schema() to get the dict
|
25 |
-
inputs: dict = WebpageStructureInputs.model_json_schema()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
output_type: str = "string"
|
27 |
|
28 |
def run(self, url) -> str:
|
|
|
22 |
"to extract detailed information."
|
23 |
)
|
24 |
# Use Pydantic V2's .model_json_schema() to get the dict
|
25 |
+
## inputs: dict = WebpageStructureInputs.model_json_schema()
|
26 |
+
inputs: dict = {
|
27 |
+
"type": "object", # Standard JSON Schema root
|
28 |
+
"properties": {
|
29 |
+
"url": { # The name of your argument
|
30 |
+
"type": "string", # <--- The data type (as a string)
|
31 |
+
"description": "The URL of the webpage to analyze." # <--- The description
|
32 |
+
}
|
33 |
+
},
|
34 |
+
"required": ["url"] # List required arguments
|
35 |
+
}
|
36 |
output_type: str = "string"
|
37 |
|
38 |
def run(self, url) -> str:
|