Skip to content

Commit 5bec133

Browse files
authored
Merge branch 'langgenius:main' into main
2 parents 89a9f50 + a126d53 commit 5bec133

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+452
-1
lines changed

api/core/model_runtime/model_providers/spark/llm/_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@ def __init__(self, model: str, app_id: str, api_key: str, api_secret: str, api_d
2525
"spark-pro": {"version": "v3.1", "chat_domain": "generalv3"},
2626
"spark-pro-128k": {"version": "pro-128k", "chat_domain": "pro-128k"},
2727
"spark-max": {"version": "v3.5", "chat_domain": "generalv3.5"},
28+
"spark-max-32k": {"version": "max-32k", "chat_domain": "max-32k"},
2829
"spark-4.0-ultra": {"version": "v4.0", "chat_domain": "4.0Ultra"},
2930
}
3031

3132
api_version = model_api_configs[model]["version"]
3233

3334
self.chat_domain = model_api_configs[model]["chat_domain"]
3435

35-
if model == "spark-pro-128k":
36+
if model in ["spark-pro-128k", "spark-max-32k"]:
3637
self.api_base = f"wss://{domain}/{endpoint}/{api_version}"
3738
else:
3839
self.api_base = f"wss://{domain}/{api_version}/{endpoint}"

api/core/model_runtime/model_providers/spark/llm/_position.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
- spark-max-32k
12
- spark-4.0-ultra
23
- spark-max
34
- spark-pro-128k
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
model: spark-max-32k
2+
label:
3+
en_US: Spark Max-32K
4+
model_type: llm
5+
model_properties:
6+
mode: chat
7+
parameter_rules:
8+
- name: temperature
9+
use_template: temperature
10+
default: 0.5
11+
help:
12+
zh_Hans: 核采样阈值。用于决定结果随机性,取值越高随机性越强即相同的问题得到的不同答案的可能性越高。
13+
en_US: Kernel sampling threshold. Used to determine the randomness of the results. The higher the value, the stronger the randomness, that is, the higher the possibility of getting different answers to the same question.
14+
- name: max_tokens
15+
use_template: max_tokens
16+
default: 4096
17+
min: 1
18+
max: 8192
19+
help:
20+
zh_Hans: 模型回答的tokens的最大长度。
21+
en_US: Maximum length of tokens for the model response.
22+
- name: top_k
23+
label:
24+
zh_Hans: 取样数量
25+
en_US: Top k
26+
type: int
27+
default: 4
28+
min: 1
29+
max: 6
30+
help:
31+
zh_Hans: 从 k 个候选中随机选择一个(非等概率)。
32+
en_US: Randomly select one from k candidates (non-equal probability).
33+
required: false

api/core/model_runtime/model_providers/tongyi/llm/farui-plus.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,17 @@ parameter_rules:
6262
type: float
6363
default: 1.1
6464
label:
65+
zh_Hans: 重复惩罚
6566
en_US: Repetition penalty
6667
help:
6768
zh_Hans: 用于控制模型生成时的重复度。提高repetition_penalty时可以降低模型生成的重复度。1.0表示不做惩罚。
6869
en_US: Used to control the repeatability when generating models. Increasing repetition_penalty can reduce the duplication of model generation. 1.0 means no punishment.
6970
- name: enable_search
7071
type: boolean
7172
default: false
73+
label:
74+
zh_Hans: 联网搜索
75+
en_US: Web Search
7276
help:
7377
zh_Hans: 模型内置了互联网搜索服务,该参数控制模型在生成文本时是否参考使用互联网搜索结果。启用互联网搜索,模型会将搜索结果作为文本生成过程中的参考信息,但模型会基于其内部逻辑“自行判断”是否使用互联网搜索结果。
7478
en_US: The model has a built-in Internet search service. This parameter controls whether the model refers to Internet search results when generating text. When Internet search is enabled, the model will use the search results as reference information in the text generation process, but the model will "judge" whether to use Internet search results based on its internal logic.

api/core/model_runtime/model_providers/tongyi/llm/qwen-coder-turbo-0919.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,17 @@ parameter_rules:
6060
type: float
6161
default: 1.1
6262
label:
63+
zh_Hans: 重复惩罚
6364
en_US: Repetition penalty
6465
help:
6566
zh_Hans: 用于控制模型生成时的重复度。提高repetition_penalty时可以降低模型生成的重复度。1.0表示不做惩罚。
6667
en_US: Used to control the repeatability when generating models. Increasing repetition_penalty can reduce the duplication of model generation. 1.0 means no punishment.
6768
- name: enable_search
6869
type: boolean
6970
default: false
71+
label:
72+
zh_Hans: 联网搜索
73+
en_US: Web Search
7074
help:
7175
zh_Hans: 模型内置了互联网搜索服务,该参数控制模型在生成文本时是否参考使用互联网搜索结果。启用互联网搜索,模型会将搜索结果作为文本生成过程中的参考信息,但模型会基于其内部逻辑“自行判断”是否使用互联网搜索结果。
7276
en_US: The model has a built-in Internet search service. This parameter controls whether the model refers to Internet search results when generating text. When Internet search is enabled, the model will use the search results as reference information in the text generation process, but the model will "judge" whether to use Internet search results based on its internal logic.

api/core/model_runtime/model_providers/tongyi/llm/qwen-coder-turbo-latest.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,17 @@ parameter_rules:
6060
type: float
6161
default: 1.1
6262
label:
63+
zh_Hans: 重复惩罚
6364
en_US: Repetition penalty
6465
help:
6566
zh_Hans: 用于控制模型生成时的重复度。提高repetition_penalty时可以降低模型生成的重复度。1.0表示不做惩罚。
6667
en_US: Used to control the repeatability when generating models. Increasing repetition_penalty can reduce the duplication of model generation. 1.0 means no punishment.
6768
- name: enable_search
6869
type: boolean
6970
default: false
71+
label:
72+
zh_Hans: 联网搜索
73+
en_US: Web Search
7074
help:
7175
zh_Hans: 模型内置了互联网搜索服务,该参数控制模型在生成文本时是否参考使用互联网搜索结果。启用互联网搜索,模型会将搜索结果作为文本生成过程中的参考信息,但模型会基于其内部逻辑“自行判断”是否使用互联网搜索结果。
7276
en_US: The model has a built-in Internet search service. This parameter controls whether the model refers to Internet search results when generating text. When Internet search is enabled, the model will use the search results as reference information in the text generation process, but the model will "judge" whether to use Internet search results based on its internal logic.

api/core/model_runtime/model_providers/tongyi/llm/qwen-coder-turbo.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,17 @@ parameter_rules:
6060
type: float
6161
default: 1.1
6262
label:
63+
zh_Hans: 重复惩罚
6364
en_US: Repetition penalty
6465
help:
6566
zh_Hans: 用于控制模型生成时的重复度。提高repetition_penalty时可以降低模型生成的重复度。1.0表示不做惩罚。
6667
en_US: Used to control the repeatability when generating models. Increasing repetition_penalty can reduce the duplication of model generation. 1.0 means no punishment.
6768
- name: enable_search
6869
type: boolean
6970
default: false
71+
label:
72+
zh_Hans: 联网搜索
73+
en_US: Web Search
7074
help:
7175
zh_Hans: 模型内置了互联网搜索服务,该参数控制模型在生成文本时是否参考使用互联网搜索结果。启用互联网搜索,模型会将搜索结果作为文本生成过程中的参考信息,但模型会基于其内部逻辑“自行判断”是否使用互联网搜索结果。
7276
en_US: The model has a built-in Internet search service. This parameter controls whether the model refers to Internet search results when generating text. When Internet search is enabled, the model will use the search results as reference information in the text generation process, but the model will "judge" whether to use Internet search results based on its internal logic.

api/core/model_runtime/model_providers/tongyi/llm/qwen-long.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,17 @@ parameter_rules:
6363
type: float
6464
default: 1.1
6565
label:
66+
zh_Hans: 重复惩罚
6667
en_US: Repetition penalty
6768
help:
6869
zh_Hans: 用于控制模型生成时的重复度。提高repetition_penalty时可以降低模型生成的重复度。1.0表示不做惩罚。
6970
en_US: Used to control the repeatability when generating models. Increasing repetition_penalty can reduce the duplication of model generation. 1.0 means no punishment.
7071
- name: enable_search
7172
type: boolean
7273
default: false
74+
label:
75+
zh_Hans: 联网搜索
76+
en_US: Web Search
7377
help:
7478
zh_Hans: 模型内置了互联网搜索服务,该参数控制模型在生成文本时是否参考使用互联网搜索结果。启用互联网搜索,模型会将搜索结果作为文本生成过程中的参考信息,但模型会基于其内部逻辑“自行判断”是否使用互联网搜索结果。
7579
en_US: The model has a built-in Internet search service. This parameter controls whether the model refers to Internet search results when generating text. When Internet search is enabled, the model will use the search results as reference information in the text generation process, but the model will "judge" whether to use Internet search results based on its internal logic.

api/core/model_runtime/model_providers/tongyi/llm/qwen-math-plus-0816.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,17 @@ parameter_rules:
6060
type: float
6161
default: 1.1
6262
label:
63+
zh_Hans: 重复惩罚
6364
en_US: Repetition penalty
6465
help:
6566
zh_Hans: 用于控制模型生成时的重复度。提高repetition_penalty时可以降低模型生成的重复度。1.0表示不做惩罚。
6667
en_US: Used to control the repeatability when generating models. Increasing repetition_penalty can reduce the duplication of model generation. 1.0 means no punishment.
6768
- name: enable_search
6869
type: boolean
6970
default: false
71+
label:
72+
zh_Hans: 联网搜索
73+
en_US: Web Search
7074
help:
7175
zh_Hans: 模型内置了互联网搜索服务,该参数控制模型在生成文本时是否参考使用互联网搜索结果。启用互联网搜索,模型会将搜索结果作为文本生成过程中的参考信息,但模型会基于其内部逻辑“自行判断”是否使用互联网搜索结果。
7276
en_US: The model has a built-in Internet search service. This parameter controls whether the model refers to Internet search results when generating text. When Internet search is enabled, the model will use the search results as reference information in the text generation process, but the model will "judge" whether to use Internet search results based on its internal logic.

api/core/model_runtime/model_providers/tongyi/llm/qwen-math-plus-0919.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,17 @@ parameter_rules:
6060
type: float
6161
default: 1.1
6262
label:
63+
zh_Hans: 重复惩罚
6364
en_US: Repetition penalty
6465
help:
6566
zh_Hans: 用于控制模型生成时的重复度。提高repetition_penalty时可以降低模型生成的重复度。1.0表示不做惩罚。
6667
en_US: Used to control the repeatability when generating models. Increasing repetition_penalty can reduce the duplication of model generation. 1.0 means no punishment.
6768
- name: enable_search
6869
type: boolean
6970
default: false
71+
label:
72+
zh_Hans: 联网搜索
73+
en_US: Web Search
7074
help:
7175
zh_Hans: 模型内置了互联网搜索服务,该参数控制模型在生成文本时是否参考使用互联网搜索结果。启用互联网搜索,模型会将搜索结果作为文本生成过程中的参考信息,但模型会基于其内部逻辑“自行判断”是否使用互联网搜索结果。
7276
en_US: The model has a built-in Internet search service. This parameter controls whether the model refers to Internet search results when generating text. When Internet search is enabled, the model will use the search results as reference information in the text generation process, but the model will "judge" whether to use Internet search results based on its internal logic.

0 commit comments

Comments
 (0)