From fbf59b16c24e5b095e0a88f57ea5043f0835c28c Mon Sep 17 00:00:00 2001 From: Weaxs <459312872@qq.com> Date: Thu, 21 Mar 2024 20:18:05 +0800 Subject: [PATCH 1/7] update wenxin ernie --- .../wenxin/llm/ernie-3.5-4k-0205.yaml | 37 +++++++++++++++++++ ...nie-bot-8k.yaml => ernie-3.5-8k-0205.yaml} | 15 ++++---- .../wenxin/llm/ernie-3.5-8k-1222.yaml | 37 +++++++++++++++++++ .../{ernie-bot-4.yaml => ernie-3.5-8k.yaml} | 19 +++++----- .../llm/{ernie-bot.yaml => ernie-4.0-8k.yaml} | 19 +++++----- .../wenxin/llm/ernie-bot-turbo.yaml | 29 --------------- .../wenxin/llm/ernie-lite-8k-0308.yaml | 27 ++++++++++++++ .../wenxin/llm/ernie-lite-8k-0922.yaml | 27 ++++++++++++++ .../wenxin/llm/ernie-speed-128k.yaml | 27 ++++++++++++++ .../wenxin/llm/ernie-speed-8k.yaml | 27 ++++++++++++++ .../wenxin/llm/ernie-speed-appbuilder.yaml | 27 ++++++++++++++ .../model_providers/wenxin/llm/ernie_bot.py | 20 +++++++--- 12 files changed, 248 insertions(+), 63 deletions(-) create mode 100644 api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-4k-0205.yaml rename api/core/model_runtime/model_providers/wenxin/llm/{ernie-bot-8k.yaml => ernie-3.5-8k-0205.yaml} (77%) create mode 100644 api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-1222.yaml rename api/core/model_runtime/model_providers/wenxin/llm/{ernie-bot-4.yaml => ernie-3.5-8k.yaml} (73%) rename api/core/model_runtime/model_providers/wenxin/llm/{ernie-bot.yaml => ernie-4.0-8k.yaml} (77%) delete mode 100644 api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-turbo.yaml create mode 100644 api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0308.yaml create mode 100644 api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0922.yaml create mode 100644 api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-128k.yaml create mode 100644 api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-8k.yaml create mode 100644 api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-appbuilder.yaml diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-4k-0205.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-4k-0205.yaml new file mode 100644 index 0000000000000..23c55bfd5445a --- /dev/null +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-4k-0205.yaml @@ -0,0 +1,37 @@ +model: ernie-3.5-8k +label: + en_US: Ernie-3.5-8K +model_type: llm +features: + - agent-thought +model_properties: + mode: chat + context_size: 4096 +parameter_rules: + - name: temperature + use_template: temperature + min: 0.1 + max: 1.0 + default: 0.8 + - name: top_p + use_template: top_p + - name: max_output_tokens + use_template: max_output_tokens + default: 1024 + min: 2 + max: 2048 + - name: penalty_score + use_template: penalty_score + - name: frequency_penalty + use_template: frequency_penalty + - name: response_format + use_template: response_format + - name: disable_search + label: + zh_Hans: 禁用搜索 + en_US: Disable Search + type: boolean + help: + zh_Hans: 禁用模型自行进行外部搜索。 + en_US: Disable the model to perform external search. + required: false diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-8k.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-0205.yaml similarity index 77% rename from api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-8k.yaml rename to api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-0205.yaml index b709644628cc4..bfc297c1fd2e8 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-8k.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-0205.yaml @@ -1,12 +1,12 @@ -model: ernie-bot-8k +model: ernie-3.5-8k-0205 label: - en_US: Ernie Bot 8k + en_US: Ernie-3.5-8K-0205 model_type: llm features: - agent-thought model_properties: mode: chat - context_size: 8000 + context_size: 8192 parameter_rules: - name: temperature use_template: temperature @@ -15,14 +15,13 @@ parameter_rules: default: 0.8 - name: top_p use_template: top_p - - name: max_tokens - use_template: max_tokens - required: true + - name: max_output_tokens + use_template: max_output_tokens default: 1024 min: 1 max: 8000 - - name: presence_penalty - use_template: presence_penalty + - name: penalty_score + use_template: penalty_score - name: frequency_penalty use_template: frequency_penalty - name: response_format diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-1222.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-1222.yaml new file mode 100644 index 0000000000000..97fe460446247 --- /dev/null +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-1222.yaml @@ -0,0 +1,37 @@ +model: ernie-3.5-8k-1222 +label: + en_US: Ernie-3.5-8K-1222 +model_type: llm +features: + - agent-thought +model_properties: + mode: chat + context_size: 8192 +parameter_rules: + - name: temperature + use_template: temperature + min: 0.1 + max: 1.0 + default: 0.8 + - name: top_p + use_template: top_p + - name: max_output_tokens + use_template: max_output_tokens + default: 1024 + min: 1 + max: 8000 + - name: penalty_score + use_template: penalty_score + - name: frequency_penalty + use_template: frequency_penalty + - name: response_format + use_template: response_format + - name: disable_search + label: + zh_Hans: 禁用搜索 + en_US: Disable Search + type: boolean + help: + zh_Hans: 禁用模型自行进行外部搜索。 + en_US: Disable the model to perform external search. + required: false diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-4.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k.yaml similarity index 73% rename from api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-4.yaml rename to api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k.yaml index de9249ea344c1..854c3e96d7aaf 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-4.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k.yaml @@ -1,12 +1,12 @@ -model: ernie-bot-4 +model: ernie-3.5-8k label: - en_US: Ernie Bot 4 + en_US: Ernie-3.5-8K model_type: llm features: - agent-thought model_properties: mode: chat - context_size: 4800 + context_size: 8192 parameter_rules: - name: temperature use_template: temperature @@ -15,14 +15,13 @@ parameter_rules: default: 0.8 - name: top_p use_template: top_p - - name: max_tokens - use_template: max_tokens - required: true - default: 256 + - name: max_output_tokens + use_template: max_output_tokens + default: 1024 min: 1 - max: 4800 - - name: presence_penalty - use_template: presence_penalty + max: 8000 + - name: penalty_score + use_template: penalty_score - name: frequency_penalty use_template: frequency_penalty - name: response_format diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-4.0-8k.yaml similarity index 77% rename from api/core/model_runtime/model_providers/wenxin/llm/ernie-bot.yaml rename to api/core/model_runtime/model_providers/wenxin/llm/ernie-4.0-8k.yaml index 5b1237b243c95..a37416ab368b2 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-4.0-8k.yaml @@ -1,12 +1,12 @@ -model: ernie-bot +model: ernie-4.0-8k label: - en_US: Ernie Bot + en_US: Ernie-4.0-8K model_type: llm features: - agent-thought model_properties: mode: chat - context_size: 4800 + context_size: 8192 parameter_rules: - name: temperature use_template: temperature @@ -15,16 +15,17 @@ parameter_rules: default: 0.8 - name: top_p use_template: top_p - - name: max_tokens - use_template: max_tokens - required: true + - name: max_output_tokens + use_template: max_output_tokens default: 256 min: 1 max: 4800 - - name: presence_penalty - use_template: presence_penalty + - name: penalty_score + use_template: penalty_score - name: frequency_penalty use_template: frequency_penalty + - name: response_format + use_template: response_format - name: disable_search label: zh_Hans: 禁用搜索 @@ -34,5 +35,3 @@ parameter_rules: zh_Hans: 禁用模型自行进行外部搜索。 en_US: Disable the model to perform external search. required: false - - name: response_format - use_template: response_format diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-turbo.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-turbo.yaml deleted file mode 100644 index 2769c214e0b86..0000000000000 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-turbo.yaml +++ /dev/null @@ -1,29 +0,0 @@ -model: ernie-bot-turbo -label: - en_US: Ernie Bot Turbo -model_type: llm -features: - - agent-thought -model_properties: - mode: chat - context_size: 11200 -parameter_rules: - - name: temperature - use_template: temperature - min: 0.1 - max: 1.0 - default: 0.8 - - name: top_p - use_template: top_p - - name: max_tokens - use_template: max_tokens - required: true - default: 1024 - min: 1 - max: 11200 - - name: presence_penalty - use_template: presence_penalty - - name: frequency_penalty - use_template: frequency_penalty - - name: response_format - use_template: response_format diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0308.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0308.yaml new file mode 100644 index 0000000000000..ac0f0721ac2c8 --- /dev/null +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0308.yaml @@ -0,0 +1,27 @@ +model: ernie-lite-8k-0308 +label: + en_US: ERNIE-Lite-8K-0308 +model_type: llm +features: + - agent-thought +model_properties: + mode: chat + context_size: 8192 +parameter_rules: + - name: temperature + use_template: temperature + min: 0.1 + max: 1.0 + default: 0.95 + - name: top_p + use_template: top_p + min: 0 + max: 1.0 + default: 0.7 + - name: max_output_tokens + use_template: max_output_tokens + - name: penalty_score + use_template: penalty_score + default: 1.0 + min: 1.0 + max: 2.0 diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0922.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0922.yaml new file mode 100644 index 0000000000000..c6beb4b1f7f92 --- /dev/null +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0922.yaml @@ -0,0 +1,27 @@ +model: ernie-lite-8k-0922 +label: + en_US: ERNIE-Lite-8K-0922 +model_type: llm +features: + - agent-thought +model_properties: + mode: chat + context_size: 8192 +parameter_rules: + - name: temperature + use_template: temperature + min: 0.1 + max: 1.0 + default: 0.95 + - name: top_p + use_template: top_p + min: 0 + max: 1.0 + default: 0.7 + - name: max_output_tokens + - name: penalty_score + use_template: penalty_score + default: 1.0 + min: 1.0 + max: 2.0 + diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-128k.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-128k.yaml new file mode 100644 index 0000000000000..60e0a3dd9b5cc --- /dev/null +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-128k.yaml @@ -0,0 +1,27 @@ +model: ernie-speed-128k +label: + en_US: ERNIE-Speed-128K +model_type: llm +features: + - agent-thought +model_properties: + mode: chat + context_size: 11200 +parameter_rules: + - name: temperature + use_template: temperature + min: 0.1 + max: 1.0 + default: 0.95 + - name: top_p + use_template: top_p + min: 0 + max: 1.0 + default: 0.7 + - name: max_output_tokens + use_template: max_output_tokens + - name: penalty_score + use_template: penalty_score + default: 1.0 + min: 1.0 + max: 2.0 diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-8k.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-8k.yaml new file mode 100644 index 0000000000000..708100ed27983 --- /dev/null +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-8k.yaml @@ -0,0 +1,27 @@ +model: ernie-speed-8k +label: + en_US: ERNIE-Speed-8K +model_type: llm +features: + - agent-thought +model_properties: + mode: chat + context_size: 8192 +parameter_rules: + - name: temperature + use_template: temperature + min: 0.1 + max: 1.0 + default: 0.95 + - name: top_p + use_template: top_p + min: 0 + max: 1.0 + default: 0.7 + - name: max_output_tokens + use_template: max_output_tokens + - name: penalty_score + use_template: penalty_score + default: 1.0 + min: 1.0 + max: 2.0 diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-appbuilder.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-appbuilder.yaml new file mode 100644 index 0000000000000..fab805de406ea --- /dev/null +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-appbuilder.yaml @@ -0,0 +1,27 @@ +model: ernie-speed-appbuilder +label: + en_US: ERNIE-Speed-AppBuilder +model_type: llm +features: + - agent-thought +model_properties: + mode: chat + context_size: 8192 +parameter_rules: + - name: temperature + use_template: temperature + min: 0.1 + max: 1.0 + default: 0.95 + - name: top_p + use_template: top_p + min: 0 + max: 1.0 + default: 0.7 + - name: max_output_tokens + use_template: max_output_tokens + - name: penalty_score + use_template: penalty_score + default: 1.0 + min: 1.0 + max: 2.0 diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie_bot.py b/api/core/model_runtime/model_providers/wenxin/llm/ernie_bot.py index 81868aeed1af0..330dcbd018cf3 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie_bot.py +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie_bot.py @@ -121,15 +121,23 @@ def __init__(self, content: str, role: str = 'user') -> None: class ErnieBotModel: api_bases = { - 'ernie-bot': 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions', - 'ernie-bot-4': 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions_pro', - 'ernie-bot-8k': 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie_bot_8k', - 'ernie-bot-turbo': 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/eb-instant', + 'ernie-3.5-8k': 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions', + 'ernie-3.5-8k-0205': 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie-3.5-8k-0205', + 'ernie-3.5-8k-1222': 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie-3.5-8k-1222', + 'ernie-3.5-4k-0205': 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie-3.5-4k-0205', + 'ernie-4.0-8k': 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions_pro', + 'ernie-speed-8k': 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie_speed', + 'ernie-speed-128k': 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie-speed-128k', + 'ernie-speed-appbuilder': 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ai_apaas', + 'ernie-lite-8k-0922': 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/eb-instant', + 'ernie-lite-8k-0308': 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie-lite-8k', } function_calling_supports = [ - 'ernie-bot', - 'ernie-bot-8k', + 'ernie-3.5-8k', + 'ernie-3.5-8k-0205', + 'ernie-3.5-8k-1222', + 'ernie-3.5-4k-0205' ] api_key: str = '' From bc2d9bea99c0f6b8312cee87ed20aca1249278d1 Mon Sep 17 00:00:00 2001 From: Weaxs <459312872@qq.com> Date: Thu, 21 Mar 2024 20:52:18 +0800 Subject: [PATCH 2/7] update ernie-lite-8k-0922 --- .../model_providers/wenxin/llm/ernie-lite-8k-0922.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0922.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0922.yaml index c6beb4b1f7f92..00871030b4fb6 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0922.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0922.yaml @@ -19,6 +19,7 @@ parameter_rules: max: 1.0 default: 0.7 - name: max_output_tokens + use_template: max_output_tokens - name: penalty_score use_template: penalty_score default: 1.0 From a19bdc48a6fc38473a82a21b0cb7f8c7e91c4657 Mon Sep 17 00:00:00 2001 From: Weaxs <459312872@qq.com> Date: Fri, 22 Mar 2024 11:35:10 +0800 Subject: [PATCH 3/7] fix yaml --- .../wenxin/llm/ernie-3.5-4k-0205.yaml | 10 ++--- .../wenxin/llm/ernie-3.5-8k-0205.yaml | 8 ++-- .../wenxin/llm/ernie-3.5-8k-1222.yaml | 8 ++-- .../wenxin/llm/ernie-3.5-8k.yaml | 8 ++-- .../wenxin/llm/ernie-4.0-8k.yaml | 10 ++--- .../wenxin/llm/ernie-bot-4.yaml | 39 +++++++++++++++++++ .../wenxin/llm/ernie-bot-8k.yaml | 39 +++++++++++++++++++ .../wenxin/llm/ernie-bot-turbo.yaml | 30 ++++++++++++++ .../model_providers/wenxin/llm/ernie-bot.yaml | 39 +++++++++++++++++++ .../wenxin/llm/ernie-lite-8k-0308.yaml | 11 ++++-- .../wenxin/llm/ernie-lite-8k-0922.yaml | 11 ++++-- .../wenxin/llm/ernie-speed-128k.yaml | 13 ++++--- .../wenxin/llm/ernie-speed-8k.yaml | 11 ++++-- .../wenxin/llm/ernie-speed-appbuilder.yaml | 11 ++++-- 14 files changed, 205 insertions(+), 43 deletions(-) create mode 100644 api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-4.yaml create mode 100644 api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-8k.yaml create mode 100644 api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-turbo.yaml create mode 100644 api/core/model_runtime/model_providers/wenxin/llm/ernie-bot.yaml diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-4k-0205.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-4k-0205.yaml index 23c55bfd5445a..06e0e529613fb 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-4k-0205.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-4k-0205.yaml @@ -15,13 +15,13 @@ parameter_rules: default: 0.8 - name: top_p use_template: top_p - - name: max_output_tokens - use_template: max_output_tokens + - name: max_tokens + use_template: max_tokens default: 1024 min: 2 - max: 2048 - - name: penalty_score - use_template: penalty_score + max: 4800 + - name: presence_penalty + use_template: presence_penalty - name: frequency_penalty use_template: frequency_penalty - name: response_format diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-0205.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-0205.yaml index bfc297c1fd2e8..3aa62488452ac 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-0205.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-0205.yaml @@ -15,13 +15,13 @@ parameter_rules: default: 0.8 - name: top_p use_template: top_p - - name: max_output_tokens - use_template: max_output_tokens + - name: max_tokens + use_template: max_tokens default: 1024 min: 1 max: 8000 - - name: penalty_score - use_template: penalty_score + - name: presence_penalty + use_template: presence_penalty - name: frequency_penalty use_template: frequency_penalty - name: response_format diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-1222.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-1222.yaml index 97fe460446247..092c0d7859251 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-1222.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-1222.yaml @@ -15,13 +15,13 @@ parameter_rules: default: 0.8 - name: top_p use_template: top_p - - name: max_output_tokens - use_template: max_output_tokens + - name: max_tokens + use_template: max_tokens default: 1024 min: 1 max: 8000 - - name: penalty_score - use_template: penalty_score + - name: presence_penalty + use_template: presence_penalty - name: frequency_penalty use_template: frequency_penalty - name: response_format diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k.yaml index 854c3e96d7aaf..922be9a0db404 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k.yaml @@ -15,13 +15,13 @@ parameter_rules: default: 0.8 - name: top_p use_template: top_p - - name: max_output_tokens - use_template: max_output_tokens + - name: max_tokens + use_template: max_tokens default: 1024 min: 1 max: 8000 - - name: penalty_score - use_template: penalty_score + - name: presence_penalty + use_template: presence_penalty - name: frequency_penalty use_template: frequency_penalty - name: response_format diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-4.0-8k.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-4.0-8k.yaml index a37416ab368b2..7ef0602039b24 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-4.0-8k.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-4.0-8k.yaml @@ -15,13 +15,13 @@ parameter_rules: default: 0.8 - name: top_p use_template: top_p - - name: max_output_tokens - use_template: max_output_tokens + - name: max_tokens + use_template: max_tokens default: 256 min: 1 - max: 4800 - - name: penalty_score - use_template: penalty_score + max: 8000 + - name: presence_penalty + use_template: presence_penalty - name: frequency_penalty use_template: frequency_penalty - name: response_format diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-4.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-4.yaml new file mode 100644 index 0000000000000..f352787aecb27 --- /dev/null +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-4.yaml @@ -0,0 +1,39 @@ +model: ernie-bot-4 +label: + en_US: Ernie Bot 4 +model_type: llm +features: + - agent-thought +model_properties: + mode: chat + context_size: 4800 +parameter_rules: + - name: temperature + use_template: temperature + min: 0.1 + max: 1.0 + default: 0.8 + - name: top_p + use_template: top_p + - name: max_tokens + use_template: max_tokens + required: true + default: 256 + min: 1 + max: 4800 + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty + - name: response_format + use_template: response_format + - name: disable_search + label: + zh_Hans: 禁用搜索 + en_US: Disable Search + type: boolean + help: + zh_Hans: 禁用模型自行进行外部搜索。 + en_US: Disable the model to perform external search. + required: false +deprecated: true diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-8k.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-8k.yaml new file mode 100644 index 0000000000000..703916914aeb8 --- /dev/null +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-8k.yaml @@ -0,0 +1,39 @@ +model: ernie-bot-8k +label: + en_US: Ernie Bot 8k +model_type: llm +features: + - agent-thought +model_properties: + mode: chat + context_size: 8000 +parameter_rules: + - name: temperature + use_template: temperature + min: 0.1 + max: 1.0 + default: 0.8 + - name: top_p + use_template: top_p + - name: max_tokens + use_template: max_tokens + required: true + default: 1024 + min: 1 + max: 8000 + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty + - name: response_format + use_template: response_format + - name: disable_search + label: + zh_Hans: 禁用搜索 + en_US: Disable Search + type: boolean + help: + zh_Hans: 禁用模型自行进行外部搜索。 + en_US: Disable the model to perform external search. + required: false +deprecated: true \ No newline at end of file diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-turbo.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-turbo.yaml new file mode 100644 index 0000000000000..7a5e84347b395 --- /dev/null +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-turbo.yaml @@ -0,0 +1,30 @@ +model: ernie-bot-turbo +label: + en_US: Ernie Bot Turbo +model_type: llm +features: + - agent-thought +model_properties: + mode: chat + context_size: 11200 +parameter_rules: + - name: temperature + use_template: temperature + min: 0.1 + max: 1.0 + default: 0.8 + - name: top_p + use_template: top_p + - name: max_tokens + use_template: max_tokens + required: true + default: 1024 + min: 1 + max: 11200 + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty + - name: response_format + use_template: response_format +deprecated: true \ No newline at end of file diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot.yaml new file mode 100644 index 0000000000000..13985b74831e0 --- /dev/null +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot.yaml @@ -0,0 +1,39 @@ +model: ernie-bot +label: + en_US: Ernie Bot +model_type: llm +features: + - agent-thought +model_properties: + mode: chat + context_size: 4800 +parameter_rules: + - name: temperature + use_template: temperature + min: 0.1 + max: 1.0 + default: 0.8 + - name: top_p + use_template: top_p + - name: max_tokens + use_template: max_tokens + required: true + default: 256 + min: 1 + max: 4800 + - name: presence_penalty + use_template: presence_penalty + - name: frequency_penalty + use_template: frequency_penalty + - name: disable_search + label: + zh_Hans: 禁用搜索 + en_US: Disable Search + type: boolean + help: + zh_Hans: 禁用模型自行进行外部搜索。 + en_US: Disable the model to perform external search. + required: false + - name: response_format + use_template: response_format +deprecated: true diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0308.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0308.yaml index ac0f0721ac2c8..f51abeca19186 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0308.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0308.yaml @@ -18,10 +18,13 @@ parameter_rules: min: 0 max: 1.0 default: 0.7 - - name: max_output_tokens - use_template: max_output_tokens - - name: penalty_score - use_template: penalty_score + - name: max_tokens + use_template: max_tokens + default: 1024 + min: 1 + max: 8000 + - name: presence_penalty + use_template: presence_penalty default: 1.0 min: 1.0 max: 2.0 diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0922.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0922.yaml index 00871030b4fb6..bc15b44e98c7d 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0922.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0922.yaml @@ -18,10 +18,13 @@ parameter_rules: min: 0 max: 1.0 default: 0.7 - - name: max_output_tokens - use_template: max_output_tokens - - name: penalty_score - use_template: penalty_score + - name: max_tokens + use_template: max_tokens + default: 1024 + min: 1 + max: 8000 + - name: presence_penalty + use_template: presence_penalty default: 1.0 min: 1.0 max: 2.0 diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-128k.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-128k.yaml index 60e0a3dd9b5cc..3b0b6db8e1494 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-128k.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-128k.yaml @@ -6,7 +6,7 @@ features: - agent-thought model_properties: mode: chat - context_size: 11200 + context_size: 128000 parameter_rules: - name: temperature use_template: temperature @@ -18,10 +18,13 @@ parameter_rules: min: 0 max: 1.0 default: 0.7 - - name: max_output_tokens - use_template: max_output_tokens - - name: penalty_score - use_template: penalty_score + - name: max_tokens + use_template: max_tokens + default: 1024 + min: 1 + max: 128000 + - name: presence_penalty + use_template: presence_penalty default: 1.0 min: 1.0 max: 2.0 diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-8k.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-8k.yaml index 708100ed27983..76f3c394252db 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-8k.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-8k.yaml @@ -18,10 +18,13 @@ parameter_rules: min: 0 max: 1.0 default: 0.7 - - name: max_output_tokens - use_template: max_output_tokens - - name: penalty_score - use_template: penalty_score + - name: max_tokens + use_template: max_tokens + default: 1024 + min: 1 + max: 8000 + - name: presence_penalty + use_template: presence_penalty default: 1.0 min: 1.0 max: 2.0 diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-appbuilder.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-appbuilder.yaml index fab805de406ea..11f440c3a374f 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-appbuilder.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-appbuilder.yaml @@ -18,10 +18,13 @@ parameter_rules: min: 0 max: 1.0 default: 0.7 - - name: max_output_tokens - use_template: max_output_tokens - - name: penalty_score - use_template: penalty_score + - name: max_tokens + use_template: max_tokens + default: 1024 + min: 1 + max: 8000 + - name: presence_penalty + use_template: presence_penalty default: 1.0 min: 1.0 max: 2.0 From 509f0503f546b42898c2d38351643a83845ffbea Mon Sep 17 00:00:00 2001 From: Weaxs <459312872@qq.com> Date: Fri, 22 Mar 2024 17:10:03 +0800 Subject: [PATCH 4/7] add api_bases for deprecated --- .../model_runtime/model_providers/wenxin/llm/ernie_bot.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie_bot.py b/api/core/model_runtime/model_providers/wenxin/llm/ernie_bot.py index 330dcbd018cf3..16e325db692cd 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie_bot.py +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie_bot.py @@ -121,6 +121,10 @@ def __init__(self, content: str, role: str = 'user') -> None: class ErnieBotModel: api_bases = { + 'ernie-bot': 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie-3.5-4k-0205', + 'ernie-bot-4': 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions_pro', + 'ernie-bot-8k': 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions', + 'ernie-bot-turbo': 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/eb-instant', 'ernie-3.5-8k': 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions', 'ernie-3.5-8k-0205': 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie-3.5-8k-0205', 'ernie-3.5-8k-1222': 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie-3.5-8k-1222', @@ -134,6 +138,8 @@ class ErnieBotModel: } function_calling_supports = [ + 'ernie-bot', + 'ernie-bot-8k', 'ernie-3.5-8k', 'ernie-3.5-8k-0205', 'ernie-3.5-8k-1222', From 4bcc3ff4a80364366a6a2d068536b7cb1da7d0e4 Mon Sep 17 00:00:00 2001 From: Weaxs <459312872@qq.com> Date: Fri, 22 Mar 2024 18:09:09 +0800 Subject: [PATCH 5/7] add blank line at the end of file --- .../model_runtime/model_providers/wenxin/llm/ernie-bot-8k.yaml | 2 +- .../model_providers/wenxin/llm/ernie-bot-turbo.yaml | 2 +- .../model_providers/wenxin/llm/ernie-lite-8k-0922.yaml | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-8k.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-8k.yaml index 703916914aeb8..fa4b7dd800c11 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-8k.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-8k.yaml @@ -36,4 +36,4 @@ parameter_rules: zh_Hans: 禁用模型自行进行外部搜索。 en_US: Disable the model to perform external search. required: false -deprecated: true \ No newline at end of file +deprecated: true diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-turbo.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-turbo.yaml index 7a5e84347b395..c94aa2db88646 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-turbo.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-bot-turbo.yaml @@ -27,4 +27,4 @@ parameter_rules: use_template: frequency_penalty - name: response_format use_template: response_format -deprecated: true \ No newline at end of file +deprecated: true diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0922.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0922.yaml index bc15b44e98c7d..4489eb14f94a6 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0922.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0922.yaml @@ -28,4 +28,3 @@ parameter_rules: default: 1.0 min: 1.0 max: 2.0 - From 9f57904286724280a52aae6c098f99c7efbb3c8d Mon Sep 17 00:00:00 2001 From: Weaxs <459312872@qq.com> Date: Fri, 22 Mar 2024 18:52:49 +0800 Subject: [PATCH 6/7] ernie bot max_tokens -> max_output_tokens presence_penalty -> penalty_score default use ernie-3.5-8k in test case --- .../model_runtime/model_providers/wenxin/llm/ernie_bot.py | 6 ++++++ .../integration_tests/model_runtime/wenxin/test_llm.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie_bot.py b/api/core/model_runtime/model_providers/wenxin/llm/ernie_bot.py index 16e325db692cd..091337c33d284 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie_bot.py +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie_bot.py @@ -299,6 +299,12 @@ def _build_chat_request_body(self, model: str, messages: list[ErnieMessage], str **parameters } + if 'max_tokens' in parameters and type(parameters['max_tokens']) == int: + body['max_output_tokens'] = parameters['max_tokens'] + + if 'presence_penalty' in parameters and type(parameters['presence_penalty']) == float: + body['penalty_score'] = parameters['presence_penalty'] + if system_message: body['system'] = system_message diff --git a/api/tests/integration_tests/model_runtime/wenxin/test_llm.py b/api/tests/integration_tests/model_runtime/wenxin/test_llm.py index 0d6c14492978c..23933b9700c31 100644 --- a/api/tests/integration_tests/model_runtime/wenxin/test_llm.py +++ b/api/tests/integration_tests/model_runtime/wenxin/test_llm.py @@ -154,7 +154,7 @@ def test_invoke_stream_model(): model = ErnieBotLargeLanguageModel() response = model.invoke( - model='ernie-bot', + model='ernie-3.5-8k', credentials={ 'api_key': os.environ.get('WENXIN_API_KEY'), 'secret_key': os.environ.get('WENXIN_SECRET_KEY') From 68d95ced5541b7e3e2e0a1ff84389e252116e137 Mon Sep 17 00:00:00 2001 From: Weaxs <459312872@qq.com> Date: Tue, 26 Mar 2024 12:20:29 +0800 Subject: [PATCH 7/7] fix max_tokens scopes --- .../model_providers/wenxin/llm/ernie-3.5-4k-0205.yaml | 2 +- .../model_providers/wenxin/llm/ernie-3.5-8k-0205.yaml | 4 ++-- .../model_providers/wenxin/llm/ernie-3.5-8k-1222.yaml | 4 ++-- .../model_providers/wenxin/llm/ernie-3.5-8k.yaml | 4 ++-- .../model_providers/wenxin/llm/ernie-4.0-8k.yaml | 6 +++--- .../model_providers/wenxin/llm/ernie-lite-8k-0308.yaml | 4 ++-- .../model_providers/wenxin/llm/ernie-lite-8k-0922.yaml | 4 ++-- .../model_providers/wenxin/llm/ernie-speed-128k.yaml | 4 ++-- .../model_providers/wenxin/llm/ernie-speed-8k.yaml | 4 ++-- .../model_providers/wenxin/llm/ernie-speed-appbuilder.yaml | 5 ----- 10 files changed, 18 insertions(+), 23 deletions(-) diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-4k-0205.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-4k-0205.yaml index 06e0e529613fb..7fea3872b15e2 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-4k-0205.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-4k-0205.yaml @@ -19,7 +19,7 @@ parameter_rules: use_template: max_tokens default: 1024 min: 2 - max: 4800 + max: 2048 - name: presence_penalty use_template: presence_penalty - name: frequency_penalty diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-0205.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-0205.yaml index 3aa62488452ac..34f73dccbba3e 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-0205.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-0205.yaml @@ -18,8 +18,8 @@ parameter_rules: - name: max_tokens use_template: max_tokens default: 1024 - min: 1 - max: 8000 + min: 2 + max: 2048 - name: presence_penalty use_template: presence_penalty - name: frequency_penalty diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-1222.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-1222.yaml index 092c0d7859251..5dfcd5825bb78 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-1222.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-1222.yaml @@ -18,8 +18,8 @@ parameter_rules: - name: max_tokens use_template: max_tokens default: 1024 - min: 1 - max: 8000 + min: 2 + max: 2048 - name: presence_penalty use_template: presence_penalty - name: frequency_penalty diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k.yaml index 922be9a0db404..555d0b0a80225 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k.yaml @@ -18,8 +18,8 @@ parameter_rules: - name: max_tokens use_template: max_tokens default: 1024 - min: 1 - max: 8000 + min: 2 + max: 2048 - name: presence_penalty use_template: presence_penalty - name: frequency_penalty diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-4.0-8k.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-4.0-8k.yaml index 7ef0602039b24..483b6df739feb 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-4.0-8k.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-4.0-8k.yaml @@ -17,9 +17,9 @@ parameter_rules: use_template: top_p - name: max_tokens use_template: max_tokens - default: 256 - min: 1 - max: 8000 + default: 1024 + min: 2 + max: 2048 - name: presence_penalty use_template: presence_penalty - name: frequency_penalty diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0308.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0308.yaml index f51abeca19186..3f09f10d1a77e 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0308.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0308.yaml @@ -21,8 +21,8 @@ parameter_rules: - name: max_tokens use_template: max_tokens default: 1024 - min: 1 - max: 8000 + min: 2 + max: 1024 - name: presence_penalty use_template: presence_penalty default: 1.0 diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0922.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0922.yaml index 4489eb14f94a6..ebb47417cc94e 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0922.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-lite-8k-0922.yaml @@ -21,8 +21,8 @@ parameter_rules: - name: max_tokens use_template: max_tokens default: 1024 - min: 1 - max: 8000 + min: 2 + max: 1024 - name: presence_penalty use_template: presence_penalty default: 1.0 diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-128k.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-128k.yaml index 3b0b6db8e1494..3b8885c862ca7 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-128k.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-128k.yaml @@ -21,8 +21,8 @@ parameter_rules: - name: max_tokens use_template: max_tokens default: 1024 - min: 1 - max: 128000 + min: 2 + max: 1024 - name: presence_penalty use_template: presence_penalty default: 1.0 diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-8k.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-8k.yaml index 76f3c394252db..25d32c9f8a1e9 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-8k.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-8k.yaml @@ -21,8 +21,8 @@ parameter_rules: - name: max_tokens use_template: max_tokens default: 1024 - min: 1 - max: 8000 + min: 2 + max: 1024 - name: presence_penalty use_template: presence_penalty default: 1.0 diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-appbuilder.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-appbuilder.yaml index 11f440c3a374f..c254ae02604c7 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-appbuilder.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-speed-appbuilder.yaml @@ -18,11 +18,6 @@ parameter_rules: min: 0 max: 1.0 default: 0.7 - - name: max_tokens - use_template: max_tokens - default: 1024 - min: 1 - max: 8000 - name: presence_penalty use_template: presence_penalty default: 1.0