diff --git a/Argcfile.sh b/Argcfile.sh index 3b29cda..5f04b6f 100755 --- a/Argcfile.sh +++ b/Argcfile.sh @@ -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 diff --git a/config.example.yaml b/config.example.yaml index c64ed05..9e32a91 100644 --- a/config.example.yaml +++ b/config.example.yaml @@ -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: patches: 'gemini-.*': - chat_completions_body: # Override safetySettings for all gemini models + chat_completions_body: safetySettings: - category: HARM_CATEGORY_HARASSMENT threshold: BLOCK_ONLY_HIGH diff --git a/models.yaml b/models.yaml index 2ac3da9..47eac21 100644 --- a/models.yaml +++ b/models.yaml @@ -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 diff --git a/src/client/mod.rs b/src/client/mod.rs index 00aa7d0..579c2a3 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -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"), ];