Fix/typos (#2308)
This commit is contained in:
@@ -16,7 +16,7 @@ class ChartProvider(BuiltinToolProviderController):
|
||||
}
|
||||
).invoke(
|
||||
user_id='',
|
||||
tool_paramters={
|
||||
tool_parameters={
|
||||
"data": "1,3,5,7,9,2,4,6,8,10",
|
||||
},
|
||||
)
|
||||
|
@@ -6,9 +6,9 @@ import io
|
||||
from typing import Any, Dict, List, Union
|
||||
|
||||
class BarChartTool(BuiltinTool):
|
||||
def _invoke(self, user_id: str, tool_paramters: Dict[str, Any]) \
|
||||
def _invoke(self, user_id: str, tool_parameters: Dict[str, Any]) \
|
||||
-> Union[ToolInvokeMessage, List[ToolInvokeMessage]]:
|
||||
data = tool_paramters.get('data', '')
|
||||
data = tool_parameters.get('data', '')
|
||||
if not data:
|
||||
return self.create_text_message('Please input data')
|
||||
data = data.split(';')
|
||||
@@ -19,7 +19,7 @@ class BarChartTool(BuiltinTool):
|
||||
else:
|
||||
data = [float(i) for i in data]
|
||||
|
||||
axis = tool_paramters.get('x_axis', None) or None
|
||||
axis = tool_parameters.get('x_axis', None) or None
|
||||
if axis:
|
||||
axis = axis.split(';')
|
||||
if len(axis) != len(data):
|
||||
|
@@ -8,14 +8,14 @@ from typing import Any, Dict, List, Union
|
||||
class LinearChartTool(BuiltinTool):
|
||||
def _invoke(self,
|
||||
user_id: str,
|
||||
tool_paramters: Dict[str, Any],
|
||||
tool_parameters: Dict[str, Any],
|
||||
) -> Union[ToolInvokeMessage, List[ToolInvokeMessage]]:
|
||||
data = tool_paramters.get('data', '')
|
||||
data = tool_parameters.get('data', '')
|
||||
if not data:
|
||||
return self.create_text_message('Please input data')
|
||||
data = data.split(';')
|
||||
|
||||
axis = tool_paramters.get('x_axis', None) or None
|
||||
axis = tool_parameters.get('x_axis', None) or None
|
||||
if axis:
|
||||
axis = axis.split(';')
|
||||
if len(axis) != len(data):
|
||||
|
@@ -8,13 +8,13 @@ from typing import Any, Dict, List, Union
|
||||
class PieChartTool(BuiltinTool):
|
||||
def _invoke(self,
|
||||
user_id: str,
|
||||
tool_paramters: Dict[str, Any],
|
||||
tool_parameters: Dict[str, Any],
|
||||
) -> Union[ToolInvokeMessage, List[ToolInvokeMessage]]:
|
||||
data = tool_paramters.get('data', '')
|
||||
data = tool_parameters.get('data', '')
|
||||
if not data:
|
||||
return self.create_text_message('Please input data')
|
||||
data = data.split(';')
|
||||
categories = tool_paramters.get('categories', None) or None
|
||||
categories = tool_parameters.get('categories', None) or None
|
||||
|
||||
# if all data is int, convert to int
|
||||
if all([i.isdigit() for i in data]):
|
||||
|
Reference in New Issue
Block a user