Просмотр исходного кода

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

zhuhao 6 месяцев назад
Родитель
Сommit
b3cde9900c
46 измененных файлов с 414 добавлено и 0 удалено
  1. 9 0
      api/core/model_runtime/model_providers/openrouter/llm/deepseek-chat.yaml
  2. 9 0
      api/core/model_runtime/model_providers/openrouter/llm/deepseek-coder.yaml
  3. 9 0
      api/core/model_runtime/model_providers/openrouter/llm/gpt-3.5-turbo.yaml
  4. 9 0
      api/core/model_runtime/model_providers/openrouter/llm/gpt-4-32k.yaml
  5. 9 0
      api/core/model_runtime/model_providers/openrouter/llm/gpt-4.yaml
  6. 9 0
      api/core/model_runtime/model_providers/openrouter/llm/gpt-4o-2024-08-06.yaml
  7. 9 0
      api/core/model_runtime/model_providers/openrouter/llm/gpt-4o-mini.yaml
  8. 9 0
      api/core/model_runtime/model_providers/openrouter/llm/gpt-4o.yaml
  9. 9 0
      api/core/model_runtime/model_providers/openrouter/llm/llama-3-70b-instruct.yaml
  10. 9 0
      api/core/model_runtime/model_providers/openrouter/llm/llama-3-8b-instruct.yaml
  11. 9 0
      api/core/model_runtime/model_providers/openrouter/llm/llama-3.1-405b-instruct.yaml
  12. 9 0
      api/core/model_runtime/model_providers/openrouter/llm/llama-3.1-70b-instruct.yaml
  13. 9 0
      api/core/model_runtime/model_providers/openrouter/llm/llama-3.1-8b-instruct.yaml
  14. 9 0
      api/core/model_runtime/model_providers/openrouter/llm/mistral-7b-instruct.yaml
  15. 9 0
      api/core/model_runtime/model_providers/openrouter/llm/mixtral-8x22b-instruct.yaml
  16. 9 0
      api/core/model_runtime/model_providers/openrouter/llm/mixtral-8x7b-instruct.yaml
  17. 9 0
      api/core/model_runtime/model_providers/openrouter/llm/o1-mini.yaml
  18. 9 0
      api/core/model_runtime/model_providers/openrouter/llm/o1-preview.yaml
  19. 9 0
      api/core/model_runtime/model_providers/openrouter/llm/qwen2-72b-instruct.yaml
  20. 9 0
      api/core/model_runtime/model_providers/openrouter/llm/qwen2.5-72b-instruct.yaml
  21. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/deepdeek-coder-v2-instruct.yaml
  22. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/deepseek-v2-chat.yaml
  23. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/deepseek-v2.5.yaml
  24. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/gemma-2-27b-it.yaml
  25. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/gemma-2-9b-it.yaml
  26. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/glm4-9b-chat.yaml
  27. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/internlm2_5-20b-chat.yaml
  28. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/internlm2_5-7b-chat.yaml
  29. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3-70b-instruct.yaml
  30. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3-8b-instruct.yaml
  31. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3.1-405b-instruct.yaml
  32. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3.1-70b-instruct.yaml
  33. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/meta-mlama-3.1-8b-instruct.yaml
  34. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/mistral-7b-instruct-v0.2.yaml
  35. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/mistral-8x7b-instruct-v0.1.yaml
  36. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/qwen2-1.5b-instruct.yaml
  37. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/qwen2-57b-a14b-instruct.yaml
  38. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/qwen2-72b-instruct.yaml
  39. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/qwen2-7b-instruct.yaml
  40. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/qwen2.5-14b-instruct.yaml
  41. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/qwen2.5-32b-instruct.yaml
  42. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/qwen2.5-72b-instruct.yaml
  43. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/qwen2.5-7b-instruct.yaml
  44. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/yi-1.5-34b-chat.yaml
  45. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/yi-1.5-6b-chat.yaml
  46. 9 0
      api/core/model_runtime/model_providers/siliconflow/llm/yi-1.5-9b-chat.yaml

+ 9 - 0
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

+ 9 - 0
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

+ 9 - 0
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

+ 9 - 0
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

+ 9 - 0
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

+ 9 - 0
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

+ 9 - 0
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

+ 9 - 0
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

+ 9 - 0
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

+ 9 - 0
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

+ 9 - 0
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

+ 9 - 0
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

+ 9 - 0
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

+ 9 - 0
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

+ 9 - 0
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

+ 9 - 0
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

+ 9 - 0
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

+ 9 - 0
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

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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:

+ 9 - 0
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: