Explorar o código

add llm: ernie-character-8k of wenxin (#4448)

jiaqianjing hai 11 meses
pai
achega
0ac5d621b6

+ 30 - 0
api/core/model_runtime/model_providers/wenxin/llm/ernie-character-8k-0321.yaml

@@ -0,0 +1,30 @@
+model: ernie-character-8k-0321
+label:
+  en_US: ERNIE-Character-8K-0321
+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_tokens
+    use_template: max_tokens
+    default: 1024
+    min: 2
+    max: 1024
+  - name: presence_penalty
+    use_template: presence_penalty
+    default: 1.0
+    min: 1.0
+    max: 2.0

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

@@ -135,6 +135,7 @@ class ErnieBotModel:
         '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',
+        'ernie-character-8k-0321': 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ernie-char-8k',
     }
 
     function_calling_supports = [