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.

feat: add parameter top-k for the llm model provided by openrouter and siliconflow (#9455)

zhuhaob3cde9900c55
diff --git a/api/core/model_runtime/model_providers/openrouter/llm/deepseek-chat.yaml b/api/core/model_runtime/model_providers/openrouter/llm/deepseek-chat.yaml
index 7a1dea69503..6743bfcad66 100644
--- a/api/core/model_runtime/model_providers/openrouter/llm/deepseek-chat.yaml
+++ b/api/core/model_runtime/model_providers/openrouter/llm/deepseek-chat.yaml
@@ -35,6 +35,15 @@ parameter_rules:
help:
zh_Hans: 控制生成结果的随机性。数值越小,随机性越弱;数值越大,随机性越强。一般而言,top_p 和 temperature 两个参数选择一个进行调整即可。
en_US: Control the randomness of generated results. The smaller the value, the weaker the randomness; the larger the value, the stronger the randomness. Generally speaking, you can adjust one of the two parameters top_p and temperature.
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
default: 0
diff --git a/api/core/model_runtime/model_providers/openrouter/llm/deepseek-coder.yaml b/api/core/model_runtime/model_providers/openrouter/llm/deepseek-coder.yaml
index c05f4769b83..375a4d2d52e 100644
--- a/api/core/model_runtime/model_providers/openrouter/llm/deepseek-coder.yaml
+++ b/api/core/model_runtime/model_providers/openrouter/llm/deepseek-coder.yaml
@@ -18,6 +18,15 @@ parameter_rules:
min: 0
max: 1
default: 1
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: max_tokens
use_template: max_tokens
min: 1
diff --git a/api/core/model_runtime/model_providers/openrouter/llm/gpt-3.5-turbo.yaml b/api/core/model_runtime/model_providers/openrouter/llm/gpt-3.5-turbo.yaml
index 186c1cc6636..621ecf065e9 100644
--- a/api/core/model_runtime/model_providers/openrouter/llm/gpt-3.5-turbo.yaml
+++ b/api/core/model_runtime/model_providers/openrouter/llm/gpt-3.5-turbo.yaml
@@ -14,6 +14,15 @@ parameter_rules:
use_template: temperature
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: presence_penalty
use_template: presence_penalty
- name: frequency_penalty
diff --git a/api/core/model_runtime/model_providers/openrouter/llm/gpt-4-32k.yaml b/api/core/model_runtime/model_providers/openrouter/llm/gpt-4-32k.yaml
index 8c2989b3000..887e6d60f9c 100644
--- a/api/core/model_runtime/model_providers/openrouter/llm/gpt-4-32k.yaml
+++ b/api/core/model_runtime/model_providers/openrouter/llm/gpt-4-32k.yaml
@@ -14,6 +14,15 @@ parameter_rules:
use_template: temperature
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: presence_penalty
use_template: presence_penalty
- name: frequency_penalty
diff --git a/api/core/model_runtime/model_providers/openrouter/llm/gpt-4.yaml b/api/core/model_runtime/model_providers/openrouter/llm/gpt-4.yaml
index ef19d4f6f0d..66d1f9ae67e 100644
--- a/api/core/model_runtime/model_providers/openrouter/llm/gpt-4.yaml
+++ b/api/core/model_runtime/model_providers/openrouter/llm/gpt-4.yaml
@@ -14,6 +14,15 @@ parameter_rules:
use_template: temperature
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: presence_penalty
use_template: presence_penalty
- name: frequency_penalty
diff --git a/api/core/model_runtime/model_providers/openrouter/llm/gpt-4o-2024-08-06.yaml b/api/core/model_runtime/model_providers/openrouter/llm/gpt-4o-2024-08-06.yaml
index 0be325f55bd..695cc3eedf5 100644
--- a/api/core/model_runtime/model_providers/openrouter/llm/gpt-4o-2024-08-06.yaml
+++ b/api/core/model_runtime/model_providers/openrouter/llm/gpt-4o-2024-08-06.yaml
@@ -16,6 +16,15 @@ parameter_rules:
use_template: temperature
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: presence_penalty
use_template: presence_penalty
- name: frequency_penalty
diff --git a/api/core/model_runtime/model_providers/openrouter/llm/gpt-4o-mini.yaml b/api/core/model_runtime/model_providers/openrouter/llm/gpt-4o-mini.yaml
index 3b1d95643d2..e1e5889085f 100644
--- a/api/core/model_runtime/model_providers/openrouter/llm/gpt-4o-mini.yaml
+++ b/api/core/model_runtime/model_providers/openrouter/llm/gpt-4o-mini.yaml
@@ -15,6 +15,15 @@ parameter_rules:
use_template: temperature
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: presence_penalty
use_template: presence_penalty
- name: frequency_penalty
diff --git a/api/core/model_runtime/model_providers/openrouter/llm/gpt-4o.yaml b/api/core/model_runtime/model_providers/openrouter/llm/gpt-4o.yaml
index a8c97efdd64..560bf9d7d05 100644
--- a/api/core/model_runtime/model_providers/openrouter/llm/gpt-4o.yaml
+++ b/api/core/model_runtime/model_providers/openrouter/llm/gpt-4o.yaml
@@ -15,6 +15,15 @@ parameter_rules:
use_template: temperature
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: presence_penalty
use_template: presence_penalty
- name: frequency_penalty
diff --git a/api/core/model_runtime/model_providers/openrouter/llm/llama-3-70b-instruct.yaml b/api/core/model_runtime/model_providers/openrouter/llm/llama-3-70b-instruct.yaml
index b91c39e729e..04a4a90c6d6 100644
--- a/api/core/model_runtime/model_providers/openrouter/llm/llama-3-70b-instruct.yaml
+++ b/api/core/model_runtime/model_providers/openrouter/llm/llama-3-70b-instruct.yaml
@@ -10,6 +10,15 @@ parameter_rules:
use_template: temperature
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: max_tokens
use_template: max_tokens
required: true
diff --git a/api/core/model_runtime/model_providers/openrouter/llm/llama-3-8b-instruct.yaml b/api/core/model_runtime/model_providers/openrouter/llm/llama-3-8b-instruct.yaml
index 84b2c7fac2c..066949d431e 100644
--- a/api/core/model_runtime/model_providers/openrouter/llm/llama-3-8b-instruct.yaml
+++ b/api/core/model_runtime/model_providers/openrouter/llm/llama-3-8b-instruct.yaml
@@ -10,6 +10,15 @@ parameter_rules:
use_template: temperature
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: max_tokens
use_template: max_tokens
required: true
diff --git a/api/core/model_runtime/model_providers/openrouter/llm/llama-3.1-405b-instruct.yaml b/api/core/model_runtime/model_providers/openrouter/llm/llama-3.1-405b-instruct.yaml
index a489ce1b5ad..0cd89dea716 100644
--- a/api/core/model_runtime/model_providers/openrouter/llm/llama-3.1-405b-instruct.yaml
+++ b/api/core/model_runtime/model_providers/openrouter/llm/llama-3.1-405b-instruct.yaml
@@ -10,6 +10,15 @@ parameter_rules:
use_template: temperature
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: max_tokens
use_template: max_tokens
required: true
diff --git a/api/core/model_runtime/model_providers/openrouter/llm/llama-3.1-70b-instruct.yaml b/api/core/model_runtime/model_providers/openrouter/llm/llama-3.1-70b-instruct.yaml
index 12037411b10..768ab5ecbb6 100644
--- a/api/core/model_runtime/model_providers/openrouter/llm/llama-3.1-70b-instruct.yaml
+++ b/api/core/model_runtime/model_providers/openrouter/llm/llama-3.1-70b-instruct.yaml
@@ -10,6 +10,15 @@ parameter_rules:
use_template: temperature
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: max_tokens
use_template: max_tokens
required: true
diff --git a/api/core/model_runtime/model_providers/openrouter/llm/llama-3.1-8b-instruct.yaml b/api/core/model_runtime/model_providers/openrouter/llm/llama-3.1-8b-instruct.yaml
index 6f06493f293..67b6b82b5d7 100644
--- a/api/core/model_runtime/model_providers/openrouter/llm/llama-3.1-8b-instruct.yaml
+++ b/api/core/model_runtime/model_providers/openrouter/llm/llama-3.1-8b-instruct.yaml
@@ -10,6 +10,15 @@ parameter_rules:
use_template: temperature
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: max_tokens
use_template: max_tokens
required: true
diff --git a/api/core/model_runtime/model_providers/openrouter/llm/mistral-7b-instruct.yaml b/api/core/model_runtime/model_providers/openrouter/llm/mistral-7b-instruct.yaml
index 012dfc55ce1..d08c016e954 100644
--- a/api/core/model_runtime/model_providers/openrouter/llm/mistral-7b-instruct.yaml
+++ b/api/core/model_runtime/model_providers/openrouter/llm/mistral-7b-instruct.yaml
@@ -18,6 +18,15 @@ parameter_rules:
default: 1
min: 0
max: 1
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: max_tokens
use_template: max_tokens
default: 1024
diff --git a/api/core/model_runtime/model_providers/openrouter/llm/mixtral-8x22b-instruct.yaml b/api/core/model_runtime/model_providers/openrouter/llm/mixtral-8x22b-instruct.yaml
index f4eb4e45d95..e3af0e64d8f 100644
--- a/api/core/model_runtime/model_providers/openrouter/llm/mixtral-8x22b-instruct.yaml
+++ b/api/core/model_runtime/model_providers/openrouter/llm/mixtral-8x22b-instruct.yaml
@@ -18,6 +18,15 @@ parameter_rules:
default: 1
min: 0
max: 1
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: max_tokens
use_template: max_tokens
default: 1024
diff --git a/api/core/model_runtime/model_providers/openrouter/llm/mixtral-8x7b-instruct.yaml b/api/core/model_runtime/model_providers/openrouter/llm/mixtral-8x7b-instruct.yaml
index 7871e1f7a05..095ea5a8584 100644
--- a/api/core/model_runtime/model_providers/openrouter/llm/mixtral-8x7b-instruct.yaml
+++ b/api/core/model_runtime/model_providers/openrouter/llm/mixtral-8x7b-instruct.yaml
@@ -19,6 +19,15 @@ parameter_rules:
default: 1
min: 0
max: 1
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: max_tokens
use_template: max_tokens
default: 1024
diff --git a/api/core/model_runtime/model_providers/openrouter/llm/o1-mini.yaml b/api/core/model_runtime/model_providers/openrouter/llm/o1-mini.yaml
index 85a918ff5e0..f4202ee814e 100644
--- a/api/core/model_runtime/model_providers/openrouter/llm/o1-mini.yaml
+++ b/api/core/model_runtime/model_providers/openrouter/llm/o1-mini.yaml
@@ -12,6 +12,15 @@ parameter_rules:
use_template: temperature
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: presence_penalty
use_template: presence_penalty
- name: frequency_penalty
diff --git a/api/core/model_runtime/model_providers/openrouter/llm/o1-preview.yaml b/api/core/model_runtime/model_providers/openrouter/llm/o1-preview.yaml
index 74b0a511bed..1281b842862 100644
--- a/api/core/model_runtime/model_providers/openrouter/llm/o1-preview.yaml
+++ b/api/core/model_runtime/model_providers/openrouter/llm/o1-preview.yaml
@@ -12,6 +12,15 @@ parameter_rules:
use_template: temperature
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: presence_penalty
use_template: presence_penalty
- name: frequency_penalty
diff --git a/api/core/model_runtime/model_providers/openrouter/llm/qwen2-72b-instruct.yaml b/api/core/model_runtime/model_providers/openrouter/llm/qwen2-72b-instruct.yaml
index 7b75fcb0c98..b6058138d30 100644
--- a/api/core/model_runtime/model_providers/openrouter/llm/qwen2-72b-instruct.yaml
+++ b/api/core/model_runtime/model_providers/openrouter/llm/qwen2-72b-instruct.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/openrouter/llm/qwen2.5-72b-instruct.yaml b/api/core/model_runtime/model_providers/openrouter/llm/qwen2.5-72b-instruct.yaml
index f141a40a00c..5392b111689 100644
--- a/api/core/model_runtime/model_providers/openrouter/llm/qwen2.5-72b-instruct.yaml
+++ b/api/core/model_runtime/model_providers/openrouter/llm/qwen2.5-72b-instruct.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/deepdeek-coder-v2-instruct.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/deepdeek-coder-v2-instruct.yaml
index d4431179e56..d5f23776ea2 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/deepdeek-coder-v2-instruct.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/deepdeek-coder-v2-instruct.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/deepseek-v2-chat.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/deepseek-v2-chat.yaml
index caa6508b5ed..7aa684ef381 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/deepseek-v2-chat.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/deepseek-v2-chat.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/deepseek-v2.5.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/deepseek-v2.5.yaml
index 1c8e15ae52a..b30fa3e2d15 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/deepseek-v2.5.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/deepseek-v2.5.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/gemma-2-27b-it.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/gemma-2-27b-it.yaml
index 2840e3dcf4b..f2a1f64bfb5 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/gemma-2-27b-it.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/gemma-2-27b-it.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/gemma-2-9b-it.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/gemma-2-9b-it.yaml
index d7e19b46f6d..b096b9b647c 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/gemma-2-9b-it.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/gemma-2-9b-it.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/glm4-9b-chat.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/glm4-9b-chat.yaml
index 9b32a024774..87acc557b79 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/glm4-9b-chat.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/glm4-9b-chat.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/internlm2_5-20b-chat.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/internlm2_5-20b-chat.yaml
index d9663582e5c..60157c2b46a 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/internlm2_5-20b-chat.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/internlm2_5-20b-chat.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/internlm2_5-7b-chat.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/internlm2_5-7b-chat.yaml
index 73ad4480aa2..faf4af7ea3f 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/internlm2_5-7b-chat.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/internlm2_5-7b-chat.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3-70b-instruct.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3-70b-instruct.yaml
index 9993d781ac8..d01770cb010 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3-70b-instruct.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3-70b-instruct.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3-8b-instruct.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3-8b-instruct.yaml
index 60e3764789e..3cd75d89e8b 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3-8b-instruct.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3-8b-instruct.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3.1-405b-instruct.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3.1-405b-instruct.yaml
index f992660aa2e..3506a70bccf 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3.1-405b-instruct.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3.1-405b-instruct.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3.1-70b-instruct.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3.1-70b-instruct.yaml
index 1c69d63a400..994a754a82b 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3.1-70b-instruct.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3.1-70b-instruct.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3.1-8b-instruct.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3.1-8b-instruct.yaml
index a97002a5ca3..ebfa9aac9d9 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3.1-8b-instruct.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3.1-8b-instruct.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/mistral-7b-instruct-v0.2.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/mistral-7b-instruct-v0.2.yaml
index 89fb153ba09..a71d8688a87 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/mistral-7b-instruct-v0.2.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/mistral-7b-instruct-v0.2.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/mistral-8x7b-instruct-v0.1.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/mistral-8x7b-instruct-v0.1.yaml
index 2785e7496fb..db45a75c6de 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/mistral-8x7b-instruct-v0.1.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/mistral-8x7b-instruct-v0.1.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/qwen2-1.5b-instruct.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/qwen2-1.5b-instruct.yaml
index f6c976af8e7..bec5d37c57b 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/qwen2-1.5b-instruct.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/qwen2-1.5b-instruct.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/qwen2-57b-a14b-instruct.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/qwen2-57b-a14b-instruct.yaml
index a996e919ea9..b2461335f84 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/qwen2-57b-a14b-instruct.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/qwen2-57b-a14b-instruct.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/qwen2-72b-instruct.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/qwen2-72b-instruct.yaml
index a6e2c22dac8..e0f23bd89eb 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/qwen2-72b-instruct.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/qwen2-72b-instruct.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/qwen2-7b-instruct.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/qwen2-7b-instruct.yaml
index d8bea5e1292..47a9da8119c 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/qwen2-7b-instruct.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/qwen2-7b-instruct.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/qwen2.5-14b-instruct.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/qwen2.5-14b-instruct.yaml
index 02a401464bb..9cc5ac4c91d 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/qwen2.5-14b-instruct.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/qwen2.5-14b-instruct.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/qwen2.5-32b-instruct.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/qwen2.5-32b-instruct.yaml
index d084617e7d7..c7fb21e9e10 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/qwen2.5-32b-instruct.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/qwen2.5-32b-instruct.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/qwen2.5-72b-instruct.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/qwen2.5-72b-instruct.yaml
index dfbad2494cd..03136c88a11 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/qwen2.5-72b-instruct.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/qwen2.5-72b-instruct.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/qwen2.5-7b-instruct.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/qwen2.5-7b-instruct.yaml
index cdc8ffc4d21..99412adde7a 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/qwen2.5-7b-instruct.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/qwen2.5-7b-instruct.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/yi-1.5-34b-chat.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/yi-1.5-34b-chat.yaml
index 864ba46f1ad..3e25f82369f 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/yi-1.5-34b-chat.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/yi-1.5-34b-chat.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/yi-1.5-6b-chat.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/yi-1.5-6b-chat.yaml
index fe4c8b4b3e0..827b2ce1e5d 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/yi-1.5-6b-chat.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/yi-1.5-6b-chat.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing:
diff --git a/api/core/model_runtime/model_providers/siliconflow/llm/yi-1.5-9b-chat.yaml b/api/core/model_runtime/model_providers/siliconflow/llm/yi-1.5-9b-chat.yaml
index c61f0dc53fe..112fcbfe97b 100644
--- a/api/core/model_runtime/model_providers/siliconflow/llm/yi-1.5-9b-chat.yaml
+++ b/api/core/model_runtime/model_providers/siliconflow/llm/yi-1.5-9b-chat.yaml
@@ -21,6 +21,15 @@ parameter_rules:
en_US: Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.
- name: top_p
use_template: top_p
+ - name: top_k
+ label:
+ zh_Hans: 取样数量
+ en_US: Top k
+ type: int
+ help:
+ zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
+ en_US: Only sample from the top K options for each subsequent token.
+ required: false
- name: frequency_penalty
use_template: frequency_penalty
pricing: