This commit is contained in:
Ricky
2024-01-31 11:58:07 +08:00
committed by GitHub
parent 9e37702d24
commit 2660fbaa20
58 changed files with 312 additions and 312 deletions

View File

@@ -7,14 +7,14 @@ from typing import Any, Dict, List, Union
class WebscraperTool(BuiltinTool):
def _invoke(self,
user_id: str,
tool_paramters: Dict[str, Any],
tool_parameters: Dict[str, Any],
) -> Union[ToolInvokeMessage, List[ToolInvokeMessage]]:
"""
invoke tools
"""
try:
url = tool_paramters.get('url', '')
user_agent = tool_paramters.get('user_agent', '')
url = tool_parameters.get('url', '')
user_agent = tool_parameters.get('user_agent', '')
if not url:
return self.create_text_message('Please input url')

View File

@@ -14,7 +14,7 @@ class WebscraperProvider(BuiltinToolProviderController):
}
).invoke(
user_id='',
tool_paramters={
tool_parameters={
'url': 'https://www.google.com',
'user_agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 '
},