feat(ark): add doubao-pro-256k and doubao-embedding-large (#11831)
This commit is contained in:
parent
3388d6636c
commit
560d375e0f
3 changed files with 18 additions and 1 deletions
|
|
@ -40,6 +40,10 @@ configs: dict[str, ModelConfig] = {
|
||||||
properties=ModelProperties(context_size=32768, max_tokens=4096, mode=LLMMode.CHAT),
|
properties=ModelProperties(context_size=32768, max_tokens=4096, mode=LLMMode.CHAT),
|
||||||
features=[ModelFeature.TOOL_CALL],
|
features=[ModelFeature.TOOL_CALL],
|
||||||
),
|
),
|
||||||
|
"Doubao-pro-256k": ModelConfig(
|
||||||
|
properties=ModelProperties(context_size=262144, max_tokens=4096, mode=LLMMode.CHAT),
|
||||||
|
features=[],
|
||||||
|
),
|
||||||
"Doubao-pro-128k": ModelConfig(
|
"Doubao-pro-128k": ModelConfig(
|
||||||
properties=ModelProperties(context_size=131072, max_tokens=4096, mode=LLMMode.CHAT),
|
properties=ModelProperties(context_size=131072, max_tokens=4096, mode=LLMMode.CHAT),
|
||||||
features=[ModelFeature.TOOL_CALL],
|
features=[ModelFeature.TOOL_CALL],
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ class ModelConfig(BaseModel):
|
||||||
|
|
||||||
ModelConfigs = {
|
ModelConfigs = {
|
||||||
"Doubao-embedding": ModelConfig(properties=ModelProperties(context_size=4096, max_chunks=32)),
|
"Doubao-embedding": ModelConfig(properties=ModelProperties(context_size=4096, max_chunks=32)),
|
||||||
|
"Doubao-embedding-large": ModelConfig(properties=ModelProperties(context_size=4096, max_chunks=32)),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -21,7 +22,7 @@ def get_model_config(credentials: dict) -> ModelConfig:
|
||||||
if not model_configs:
|
if not model_configs:
|
||||||
return ModelConfig(
|
return ModelConfig(
|
||||||
properties=ModelProperties(
|
properties=ModelProperties(
|
||||||
context_size=int(credentials.get("context_size", 0)),
|
context_size=int(credentials.get("context_size", 4096)),
|
||||||
max_chunks=int(credentials.get("max_chunks", 1)),
|
max_chunks=int(credentials.get("max_chunks", 1)),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -166,6 +166,12 @@ model_credential_schema:
|
||||||
show_on:
|
show_on:
|
||||||
- variable: __model_type
|
- variable: __model_type
|
||||||
value: llm
|
value: llm
|
||||||
|
- label:
|
||||||
|
en_US: Doubao-pro-256k
|
||||||
|
value: Doubao-pro-256k
|
||||||
|
show_on:
|
||||||
|
- variable: __model_type
|
||||||
|
value: llm
|
||||||
- label:
|
- label:
|
||||||
en_US: Llama3-8B
|
en_US: Llama3-8B
|
||||||
value: Llama3-8B
|
value: Llama3-8B
|
||||||
|
|
@ -220,6 +226,12 @@ model_credential_schema:
|
||||||
show_on:
|
show_on:
|
||||||
- variable: __model_type
|
- variable: __model_type
|
||||||
value: text-embedding
|
value: text-embedding
|
||||||
|
- label:
|
||||||
|
en_US: Doubao-embedding-large
|
||||||
|
value: Doubao-embedding-large
|
||||||
|
show_on:
|
||||||
|
- variable: __model_type
|
||||||
|
value: text-embedding
|
||||||
- label:
|
- label:
|
||||||
en_US: Custom
|
en_US: Custom
|
||||||
zh_Hans: 自定义
|
zh_Hans: 自定义
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue