Quellcode durchsuchen

feat: update ernie model (#4756)

Weaxs vor 10 Monaten
Ursprung
Commit
b189faca52

+ 37 - 0
api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-128k.yaml

@@ -0,0 +1,37 @@
+model: ernie-3.5-128k
+label:
+  en_US: Ernie-3.5-128K
+model_type: llm
+features:
+  - agent-thought
+model_properties:
+  mode: chat
+  context_size: 128000
+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
+    default: 4096
+    min: 2
+    max: 4096
+  - 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

+ 1 - 0
api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-4k-0205.yaml

@@ -35,3 +35,4 @@ parameter_rules:
       zh_Hans: 禁用模型自行进行外部搜索。
       en_US: Disable the model to perform external search.
     required: false
+deprecated: true

+ 1 - 0
api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-8k-1222.yaml

@@ -35,3 +35,4 @@ parameter_rules:
       zh_Hans: 禁用模型自行进行外部搜索。
       en_US: Disable the model to perform external search.
     required: false
+deprecated: true

+ 4 - 1
api/core/model_runtime/model_providers/wenxin/llm/ernie_bot.py

@@ -129,6 +129,7 @@ class ErnieBotModel:
         '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-3.5-128k': 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie-3.5-128k',
         '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',
@@ -144,7 +145,9 @@ class ErnieBotModel:
         'ernie-3.5-8k',
         'ernie-3.5-8k-0205',
         'ernie-3.5-8k-1222',
-        'ernie-3.5-4k-0205'
+        'ernie-3.5-4k-0205',
+        'ernie-3.5-128k',
+        'ernie-4.0-8k'
     ]
 
     api_key: str = ''