Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix: the Image-1X tool (#8787)
非法操作d1173a69f8ec
diff --git a/api/core/tools/provider/builtin/stepfun/stepfun.py b/api/core/tools/provider/builtin/stepfun/stepfun.pyindex b24f730c95a..239db85b111 100644--- a/api/core/tools/provider/builtin/stepfun/stepfun.py+++ b/api/core/tools/provider/builtin/stepfun/stepfun.py@@ -16,7 +16,7 @@ class StepfunProvider(BuiltinToolProviderController):user_id="",tool_parameters={"prompt": "cute girl, blue eyes, white hair, anime style",- "size": "1024x1024",+ "size": "256x256","n": 1,},)diff --git a/api/core/tools/provider/builtin/stepfun/stepfun.yaml b/api/core/tools/provider/builtin/stepfun/stepfun.yamlindex 1f841ec369b..e8139a4d7d6 100644--- a/api/core/tools/provider/builtin/stepfun/stepfun.yaml+++ b/api/core/tools/provider/builtin/stepfun/stepfun.yaml@@ -4,11 +4,9 @@ identity:label:en_US: Image-1Xzh_Hans: 阶跃星辰绘画- pt_BR: Image-1Xdescription:en_US: Image-1Xzh_Hans: 阶跃星辰绘画- pt_BR: Image-1Xicon: icon.pngtags:- image@@ -20,27 +18,16 @@ credentials_for_provider:label:en_US: Stepfun API keyzh_Hans: 阶跃星辰API key- pt_BR: Stepfun API key- help:- en_US: Please input your stepfun API key- zh_Hans: 请输入你的阶跃星辰 API key- pt_BR: Please input your stepfun API keyplaceholder:- en_US: Please input your stepfun API key+ en_US: Please input your Stepfun API keyzh_Hans: 请输入你的阶跃星辰 API key- pt_BR: Please input your stepfun API key+ url: https://platform.stepfun.com/interface-keystepfun_base_url:type: text-inputrequired: falselabel:en_US: Stepfun base URLzh_Hans: 阶跃星辰 base URL- pt_BR: Stepfun base URL- help:- en_US: Please input your Stepfun base URL- zh_Hans: 请输入你的阶跃星辰 base URL- pt_BR: Please input your Stepfun base URLplaceholder:en_US: Please input your Stepfun base URLzh_Hans: 请输入你的阶跃星辰 base URL- pt_BR: Please input your Stepfun base URLdiff --git a/api/core/tools/provider/builtin/stepfun/tools/image.py b/api/core/tools/provider/builtin/stepfun/tools/image.pyindex 0b92b122bf5..eb55dae5183 100644--- a/api/core/tools/provider/builtin/stepfun/tools/image.py+++ b/api/core/tools/provider/builtin/stepfun/tools/image.py@@ -1,4 +1,3 @@-import randomfrom typing import Any, Unionfrom openai import OpenAI@@ -19,7 +18,7 @@ class StepfunTool(BuiltinTool):"""invoke tools"""- base_url = self.runtime.credentials.get("stepfun_base_url", "https://api.stepfun.com")+ base_url = self.runtime.credentials.get("stepfun_base_url") or "https://api.stepfun.com"base_url = str(URL(base_url) / "v1")client = OpenAI(@@ -28,9 +27,7 @@ class StepfunTool(BuiltinTool):)extra_body = {}- model = tool_parameters.get("model", "step-1x-medium")- if not model:- return self.create_text_message("Please input model name")+ model = "step-1x-medium"# promptprompt = tool_parameters.get("prompt", "")if not prompt:@@ -67,9 +64,3 @@ class StepfunTool(BuiltinTool):))return result-- @staticmethod- def _generate_random_id(length=8):- characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"- random_id = "".join(random.choices(characters, k=length))- return random_iddiff --git a/api/core/tools/provider/builtin/stepfun/tools/image.yaml b/api/core/tools/provider/builtin/stepfun/tools/image.yamlindex dcc5bd2db2f..8d7c9b6586b 100644--- a/api/core/tools/provider/builtin/stepfun/tools/image.yaml+++ b/api/core/tools/provider/builtin/stepfun/tools/image.yaml@@ -29,35 +29,6 @@ parameters:pt_BR: Image prompt, you can check the official documentation of step-1xllm_description: Image prompt of step-1x you should describe the image you want to generate as a list of words as possible as detailedform: llm- - name: model- type: select- required: false- human_description:- en_US: used for selecting the model name- zh_Hans: 用于选择模型的名字- pt_BR: used for selecting the model name- label:- en_US: Model Name- zh_Hans: 模型名字- pt_BR: Model Name- form: form- options:- - value: step-1x-turbo- label:- en_US: turbo- zh_Hans: turbo- pt_BR: turbo- - value: step-1x-medium- label:- en_US: medium- zh_Hans: medium- pt_BR: medium- - value: step-1x-large- label:- en_US: large- zh_Hans: large- pt_BR: large- default: step-1x-medium- name: sizetype: selectrequired: false