diff --git a/python/.ruff.toml b/python/.ruff.toml index 58ecefb1..1888d9b5 100644 --- a/python/.ruff.toml +++ b/python/.ruff.toml @@ -50,6 +50,10 @@ select = [ # # https://docs.astral.sh/ruff/rules/boolean-positional-value-in-call/ "FBT003", + + # Pycodestyle's warning + # https://docs.astral.sh/ruff/rules/#warning-w + "W", ] ignore = [ diff --git a/python/dify_plugin/entities/model/__init__.py b/python/dify_plugin/entities/model/__init__.py index 0e677a89..bd75bc49 100644 --- a/python/dify_plugin/entities/model/__init__.py +++ b/python/dify_plugin/entities/model/__init__.py @@ -291,7 +291,7 @@ class ParameterRule(BaseModel): data = copy_default_parameter_rule except ValueError: pass - + if not data.get("label"): data["label"] = I18nObject(en_US=data["name"]) diff --git a/python/examples/agent/prompt/template.py b/python/examples/agent/prompt/template.py index ef64fd29..f5ba2119 100644 --- a/python/examples/agent/prompt/template.py +++ b/python/examples/agent/prompt/template.py @@ -1,4 +1,4 @@ -ENGLISH_REACT_COMPLETION_PROMPT_TEMPLATES = """Respond to the human as helpfully and accurately as possible. +ENGLISH_REACT_COMPLETION_PROMPT_TEMPLATES = """Respond to the human as helpfully and accurately as possible. {{instruction}} @@ -47,7 +47,7 @@ Thought:""" # noqa: E501 ENGLISH_REACT_COMPLETION_AGENT_SCRATCHPAD_TEMPLATES = """Observation: {{observation}} Thought:""" -ENGLISH_REACT_CHAT_PROMPT_TEMPLATES = """Respond to the human as helpfully and accurately as possible. +ENGLISH_REACT_CHAT_PROMPT_TEMPLATES = """Respond to the human as helpfully and accurately as possible. {{instruction}}