Skip to content

Commit 3b0e958

Browse files
committed
Fix typos
Signed-off-by: jinhai <haijin.chn@gmail.com>
1 parent d039d1e commit 3b0e958

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

agent/component/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def _validate_param(self, param_obj, validation_json):
244244

245245
if not value_legal:
246246
raise ValueError(
247-
"Plase check runtime conf, {} = {} does not match user-parameter restriction".format(
247+
"Please check runtime conf, {} = {} does not match user-parameter restriction".format(
248248
variable, value
249249
)
250250
)

agent/component/categorize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
class CategorizeParam(LLMParam):
2929

3030
"""
31-
Define the Categorize component parameters.
31+
Define the categorize component parameters.
3232
"""
3333
def __init__(self):
3434
super().__init__()

agent/component/llm.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ def get_attr(nm):
8282

8383
class LLM(ComponentBase):
8484
component_name = "LLM"
85-
86-
def __init__(self, canvas, id, param: ComponentParamBase):
87-
super().__init__(canvas, id, param)
85+
86+
def __init__(self, canvas, component_id, param: ComponentParamBase):
87+
super().__init__(canvas, component_id, param)
8888
self.chat_mdl = LLMBundle(self._canvas.get_tenant_id(), TenantLLMService.llm_id2llm_type(self._param.llm_id),
8989
self._param.llm_id, max_retries=self._param.max_retries,
9090
retry_interval=self._param.delay_after_error
@@ -210,7 +210,7 @@ def clean_formated_answer(ans: str) -> str:
210210
return re.sub(r"```\n*$", "", ans, flags=re.DOTALL)
211211

212212
prompt, msg, _ = self._prepare_prompt_variables()
213-
error = ""
213+
error: str = ""
214214

215215
if self._param.output_structure:
216216
prompt += "\nThe output MUST follow this JSON format:\n"+json.dumps(self._param.output_structure, ensure_ascii=False, indent=2)

agent/component/message.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def check(self):
4949
class Message(ComponentBase):
5050
component_name = "Message"
5151

52-
def get_kwargs(self, script:str, kwargs:dict = {}, delimeter:str=None) -> tuple[str, dict[str, str | list | Any]]:
52+
def get_kwargs(self, script:str, kwargs:dict = {}, delimiter:str=None) -> tuple[str, dict[str, str | list | Any]]:
5353
for k,v in self.get_input_elements_from_text(script).items():
5454
if k in kwargs:
5555
continue
@@ -60,8 +60,8 @@ def get_kwargs(self, script:str, kwargs:dict = {}, delimeter:str=None) -> tuple[
6060
if isinstance(v, partial):
6161
for t in v():
6262
ans += t
63-
elif isinstance(v, list) and delimeter:
64-
ans = delimeter.join([str(vv) for vv in v])
63+
elif isinstance(v, list) and delimiter:
64+
ans = delimiter.join([str(vv) for vv in v])
6565
elif not isinstance(v, str):
6666
try:
6767
ans = json.dumps(v, ensure_ascii=False)

api/db/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class CanvasCategory(StrEnum):
111111
Agent = "agent_canvas"
112112
DataFlow = "dataflow_canvas"
113113

114-
VALID_CAVAS_CATEGORIES = {CanvasCategory.Agent, CanvasCategory.DataFlow}
114+
VALID_CANVAS_CATEGORIES = {CanvasCategory.Agent, CanvasCategory.DataFlow}
115115

116116

117117
class MCPServerType(StrEnum):

0 commit comments

Comments
 (0)