Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

add JSON Mode support for moonshot models (#7568)

噢哎哟喂ad130110430b
diff --git a/api/core/model_runtime/model_providers/moonshot/llm/moonshot-v1-128k.yaml b/api/core/model_runtime/model_providers/moonshot/llm/moonshot-v1-128k.yaml
index 0d2e51c47f9..1078e84c59d 100644
--- a/api/core/model_runtime/model_providers/moonshot/llm/moonshot-v1-128k.yaml
+++ b/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'
diff --git a/api/core/model_runtime/model_providers/moonshot/llm/moonshot-v1-32k.yaml b/api/core/model_runtime/model_providers/moonshot/llm/moonshot-v1-32k.yaml
index 9ff537014a8..9c739d05019 100644
--- a/api/core/model_runtime/model_providers/moonshot/llm/moonshot-v1-32k.yaml
+++ b/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'
diff --git a/api/core/model_runtime/model_providers/moonshot/llm/moonshot-v1-8k.yaml b/api/core/model_runtime/model_providers/moonshot/llm/moonshot-v1-8k.yaml
index 0f308d36766..187a86999e1 100644
--- a/api/core/model_runtime/model_providers/moonshot/llm/moonshot-v1-8k.yaml
+++ b/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'