Ver código fonte

add JSON Mode support for moonshot models (#7568)

噢哎哟喂 8 meses atrás
pai
commit
ad13011043

+ 12 - 0
api/core/model_runtime/model_providers/moonshot/llm/moonshot-v1-128k.yaml

@@ -21,6 +21,18 @@ parameter_rules:
     default: 1024
     min: 1
     max: 128000
+  - name: response_format
+    label:
+      zh_Hans: 回复格式
+      en_US: response_format
+    type: string
+    help:
+      zh_Hans: 指定模型必须输出的格式
+      en_US: specifying the format that the model must output
+    required: false
+    options:
+      - text
+      - json_object
 pricing:
   input: '0.06'
   output: '0.06'

+ 12 - 0
api/core/model_runtime/model_providers/moonshot/llm/moonshot-v1-32k.yaml

@@ -21,6 +21,18 @@ parameter_rules:
     default: 1024
     min: 1
     max: 32000
+  - name: response_format
+    label:
+      zh_Hans: 回复格式
+      en_US: response_format
+    type: string
+    help:
+      zh_Hans: 指定模型必须输出的格式
+      en_US: specifying the format that the model must output
+    required: false
+    options:
+      - text
+      - json_object
 pricing:
   input: '0.024'
   output: '0.024'

+ 12 - 0
api/core/model_runtime/model_providers/moonshot/llm/moonshot-v1-8k.yaml

@@ -21,6 +21,18 @@ parameter_rules:
     default: 512
     min: 1
     max: 8192
+  - name: response_format
+    label:
+      zh_Hans: 回复格式
+      en_US: response_format
+    type: string
+    help:
+      zh_Hans: 指定模型必须输出的格式
+      en_US: specifying the format that the model must output
+    required: false
+    options:
+      - text
+      - json_object
 pricing:
   input: '0.012'
   output: '0.012'