From 78ea2d143af964496f42beb181bfdb00ba752695 Mon Sep 17 00:00:00 2001 From: chenlinfeng Date: Thu, 8 Aug 2024 19:38:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7model?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stepfun/llm/_position.yaml | 2 ++ .../stepfun/llm/step-1-flash.yaml | 25 ++++++++++++++ .../stepfun/llm/step-1v-32k.yaml | 3 ++ .../stepfun/llm/step-1v-8k.yaml | 3 ++ .../stepfun/llm/step-2-16k.yaml | 28 +++++++++++++++ .../provider/builtin/stepfun/tools/image.py | 2 +- .../provider/builtin/stepfun/tools/image.yaml | 34 +++++++++---------- 7 files changed, 79 insertions(+), 18 deletions(-) create mode 100644 api/core/model_runtime/model_providers/stepfun/llm/step-1-flash.yaml create mode 100644 api/core/model_runtime/model_providers/stepfun/llm/step-2-16k.yaml diff --git a/api/core/model_runtime/model_providers/stepfun/llm/_position.yaml b/api/core/model_runtime/model_providers/stepfun/llm/_position.yaml index b34433e1d4d150..2bb0c703f4aa39 100644 --- a/api/core/model_runtime/model_providers/stepfun/llm/_position.yaml +++ b/api/core/model_runtime/model_providers/stepfun/llm/_position.yaml @@ -2,5 +2,7 @@ - step-1-32k - step-1-128k - step-1-256k +- step-1-flash +- step-2-16k - step-1v-8k - step-1v-32k diff --git a/api/core/model_runtime/model_providers/stepfun/llm/step-1-flash.yaml b/api/core/model_runtime/model_providers/stepfun/llm/step-1-flash.yaml new file mode 100644 index 00000000000000..afb880f2a40bbc --- /dev/null +++ b/api/core/model_runtime/model_providers/stepfun/llm/step-1-flash.yaml @@ -0,0 +1,25 @@ +model: step-1-flash +label: + zh_Hans: step-1-flash + en_US: step-1-flash +model_type: llm +features: + - agent-thought +model_properties: + mode: chat + context_size: 8000 +parameter_rules: + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: max_tokens + use_template: max_tokens + default: 512 + min: 1 + max: 8000 +pricing: + input: '0.001' + output: '0.004' + unit: '0.001' + currency: RMB diff --git a/api/core/model_runtime/model_providers/stepfun/llm/step-1v-32k.yaml b/api/core/model_runtime/model_providers/stepfun/llm/step-1v-32k.yaml index f878ee3e56e1f9..08d6ad245d2dd6 100644 --- a/api/core/model_runtime/model_providers/stepfun/llm/step-1v-32k.yaml +++ b/api/core/model_runtime/model_providers/stepfun/llm/step-1v-32k.yaml @@ -5,6 +5,9 @@ label: model_type: llm features: - vision + - tool-call + - multi-tool-call + - stream-tool-call model_properties: mode: chat context_size: 32000 diff --git a/api/core/model_runtime/model_providers/stepfun/llm/step-1v-8k.yaml b/api/core/model_runtime/model_providers/stepfun/llm/step-1v-8k.yaml index 6c3cb61d2c6621..843d14d9c67e80 100644 --- a/api/core/model_runtime/model_providers/stepfun/llm/step-1v-8k.yaml +++ b/api/core/model_runtime/model_providers/stepfun/llm/step-1v-8k.yaml @@ -5,6 +5,9 @@ label: model_type: llm features: - vision + - tool-call + - multi-tool-call + - stream-tool-call model_properties: mode: chat context_size: 8192 diff --git a/api/core/model_runtime/model_providers/stepfun/llm/step-2-16k.yaml b/api/core/model_runtime/model_providers/stepfun/llm/step-2-16k.yaml new file mode 100644 index 00000000000000..6f2dabbfb0e308 --- /dev/null +++ b/api/core/model_runtime/model_providers/stepfun/llm/step-2-16k.yaml @@ -0,0 +1,28 @@ +model: step-2-16k +label: + zh_Hans: step-2-16k + en_US: step-2-16k +model_type: llm +features: + - agent-thought + - tool-call + - multi-tool-call + - stream-tool-call +model_properties: + mode: chat + context_size: 16000 +parameter_rules: + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: max_tokens + use_template: max_tokens + default: 1024 + min: 1 + max: 16000 +pricing: + input: '0.038' + output: '0.120' + unit: '0.001' + currency: RMB diff --git a/api/core/tools/provider/builtin/stepfun/tools/image.py b/api/core/tools/provider/builtin/stepfun/tools/image.py index afe8b32f2be20c..5e544aada63b40 100644 --- a/api/core/tools/provider/builtin/stepfun/tools/image.py +++ b/api/core/tools/provider/builtin/stepfun/tools/image.py @@ -29,7 +29,7 @@ def _invoke(self, ) extra_body = {} - model = tool_parameters.get('model', 'step-1X-medium') + model = tool_parameters.get('model', 'step-1x-medium') if not model: return self.create_text_message('Please input model name') # prompt diff --git a/api/core/tools/provider/builtin/stepfun/tools/image.yaml b/api/core/tools/provider/builtin/stepfun/tools/image.yaml index 0865e50d70a78f..9399875536a731 100644 --- a/api/core/tools/provider/builtin/stepfun/tools/image.yaml +++ b/api/core/tools/provider/builtin/stepfun/tools/image.yaml @@ -2,19 +2,19 @@ identity: name: stepfun author: Stepfun label: - en_US: step-1X + en_US: step-1x zh_Hans: 阶跃星辰绘画 - pt_BR: step-1X + pt_BR: step-1x description: - en_US: step-1X is a powerful drawing tool by stepfun, you can draw the image based on your prompt - zh_Hans: step-1X 系列是阶跃星辰提供的强大的绘画工具,它可以根据您的提示词绘制出您想要的图像。 - pt_BR: step-1X is a powerful drawing tool by stepfun, you can draw the image based on your prompt + en_US: step-1x is a powerful drawing tool by stepfun, you can draw the image based on your prompt + zh_Hans: step-1x 系列是阶跃星辰提供的强大的绘画工具,它可以根据您的提示词绘制出您想要的图像。 + pt_BR: step-1x is a powerful drawing tool by stepfun, you can draw the image based on your prompt description: human: - en_US: step-1X is a text to image tool - zh_Hans: step-1X 是一个文本/图像到图像的工具 - pt_BR: step-1X is a text to image tool - llm: step-1X is a tool used to generate images from text or image + en_US: step-1x is a text to image tool + zh_Hans: step-1x 是一个文本/图像到图像的工具 + pt_BR: step-1x is a text to image tool + llm: step-1x is a tool used to generate images from text or image parameters: - name: prompt type: string @@ -24,10 +24,10 @@ parameters: zh_Hans: 提示词 pt_BR: Prompt human_description: - en_US: Image prompt, you can check the official documentation of step-1X - zh_Hans: 图像提示词,您可以查看step-1X 的官方文档 - pt_BR: Image prompt, you can check the official documentation of step-1X - llm_description: Image prompt of step-1X you should describe the image you want to generate as a list of words as possible as detailed + en_US: Image prompt, you can check the official documentation of step-1x + zh_Hans: 图像提示词,您可以查看step-1x 的官方文档 + pt_BR: Image prompt, you can check the official documentation of step-1x + llm_description: Image prompt of step-1x you should describe the image you want to generate as a list of words as possible as detailed form: llm - name: model type: select @@ -42,22 +42,22 @@ parameters: pt_BR: Model Name form: form options: - - value: step-1X-turbo + - value: step-1x-turbo label: en_US: turbo zh_Hans: turbo pt_BR: turbo - - value: step-1X-medium + - value: step-1x-medium label: en_US: medium zh_Hans: medium pt_BR: medium - - value: step-1X-large + - value: step-1x-large label: en_US: large zh_Hans: large pt_BR: large - default: step-1X-medium + default: step-1x-medium - name: size type: select required: false