feat: support lingyiwanwu client (#613)

pull/614/head
sigoden 2 weeks ago committed by GitHub
parent b965c63be0
commit 2f8c694626
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -91,7 +91,8 @@ OPENAI_COMPATIBLE_PLATFORMS=( \
octoai,meta-llama-3-8b-instruct,https://text.octoai.run/v1 \
perplexity,llama-3-8b-instruct,https://api.perplexity.ai \
together,meta-llama/Llama-3-8b-chat-hf,https://api.together.xyz/v1 \
zhipuai,glm-4,https://open.bigmodel.cn/api/paas/v4 \
zhipuai,glm-4-0520,https://open.bigmodel.cn/api/paas/v4 \
lingyiwanwu,yi-large,https://api.lingyiwanwu.com/v1 \
)
# @cmd Chat with any LLM api

@ -112,7 +112,7 @@ clients:
api_key: xxx # ENV: {client}_API_KEY
patches:
'.*':
chat_completions_body: # Override safetySettings for all models
chat_completions_body:
safetySettings:
- category: HARM_CATEGORY_HARASSMENT
threshold: BLOCK_NONE
@ -178,7 +178,7 @@ clients:
adc_file: <path-to/gcloud/application_default_credentials.json>
patches:
'gemini-.*':
chat_completions_body: # Override safetySettings for all gemini models
chat_completions_body:
safetySettings:
- category: HARM_CATEGORY_HARASSMENT
threshold: BLOCK_ONLY_HIGH

@ -588,6 +588,41 @@
output_price: 7
supports_vision: true
- platform: lingyiwanwu
# docs:
# - https://platform.lingyiwanwu.com/docs#%E6%A8%A1%E5%9E%8B
# - https://platform.lingyiwanwu.com/docs#%E8%AE%A1%E8%B4%B9%E5%8D%95%E5%85%83
models:
- name: yi-large
max_input_tokens: 32768
input_price: 2.8
output_price: 2.8
- name: yi-medium
max_input_tokens: 16384
input_price: 0.35
output_price: 0.35
- name: yi-vision
max_input_tokens: 4096
input_price: 0.84
output_price: 0.84
supports_vision: true
- name: yi-medium-200k
max_input_tokens: 200000
input_price: 1.68
output_price: 1.68
- name: yi-spark
max_input_tokens: 16384
input_price: 0.14
output_price: 0.14
- name: yi-large-rag
max_input_tokens: 16384
input_price: 3.5
output_price: 3.5
- name: yi-large-turbo
max_input_tokens: 16384
input_price: 1.68
output_price: 1.68
- platform: anyscale
# docs:
# - https://docs.anyscale.com/endpoints/text-generation/supported-models/meta-llama-Meta-Llama-3-8B-Instruct

@ -45,7 +45,7 @@ register_client!(
(qianwen, "qianwen", QianwenConfig, QianwenClient),
);
pub const OPENAI_COMPATIBLE_PLATFORMS: [(&str, &str); 12] = [
pub const OPENAI_COMPATIBLE_PLATFORMS: [(&str, &str); 13] = [
("anyscale", "https://api.endpoints.anyscale.com/v1"),
("deepinfra", "https://api.deepinfra.com/v1/openai"),
("deepseek", "https://api.deepseek.com"),
@ -58,4 +58,5 @@ pub const OPENAI_COMPATIBLE_PLATFORMS: [(&str, &str); 12] = [
("perplexity", "https://api.perplexity.ai"),
("together", "https://api.together.xyz/v1"),
("zhipuai", "https://open.bigmodel.cn/api/paas/v4"),
("lingyiwanwu", "https://api.lingyiwanwu.com/v1"),
];

Loading…
Cancel
Save