summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xArgcfile.sh1
-rw-r--r--config.example.yaml8
-rw-r--r--models.yaml61
-rw-r--r--src/client/mod.rs3
4 files changed, 70 insertions, 3 deletions
diff --git a/Argcfile.sh b/Argcfile.sh
index 4cd53d8..558d056 100755
--- a/Argcfile.sh
+++ b/Argcfile.sh
@@ -88,6 +88,7 @@ OPENAI_COMPATIBLE_PLATFORMS=( \
github,gpt-4o-mini,https://models.inference.ai.azure.com \
groq,llama3-8b-8192,https://api.groq.com/openai/v1 \
huggingface,meta-llama/Meta-Llama-3-8B-Instruct,https://api-inference.huggingface.co/v1 \
+ hunyuan,hunyuan-large,https://api.hunyuan.cloud.tencent.com/v1 \
lingyiwanwu,yi-large,https://api.lingyiwanwu.com/v1 \
mistral,open-mistral-nemo,https://api.mistral.ai/v1 \
moonshot,moonshot-v1-8k,https://api.moonshot.cn/v1 \
diff --git a/config.example.yaml b/config.example.yaml
index 75640a1..b969a84 100644
--- a/config.example.yaml
+++ b/config.example.yaml
@@ -255,12 +255,18 @@ clients:
api_key: xxx
secret_key: xxx
- # See https://help.aliyun.com/zh/dashscope/
+ # See https://dashscope.aliyun.com/
- type: openai-compatible
name: qianwen
api_base: https://dashscope.aliyuncs.com/compatible-mode/v1
api_key: xxx
+ # See https://cloud.tencent.com/product/hunyuan
+ - type: openai-compatible
+ name: hunyuan
+ api_base: https://api.hunyuan.cloud.tencent.com/v1
+ api_key: xxx
+
# See https://platform.moonshot.cn/docs/intro
- type: openai-compatible
name: moonshot
diff --git a/models.yaml b/models.yaml
index c3b0458..de82a60 100644
--- a/models.yaml
+++ b/models.yaml
@@ -112,7 +112,6 @@
- name: text-embedding-004
type: embedding
input_price: 0
- output_price: 0
max_tokens_per_chunk: 2048
default_chunk_size: 1500
max_batch_size: 100
@@ -811,6 +810,66 @@
default_chunk_size: 2000
max_batch_size: 25
+# links:
+# - https://cloud.tencent.com/document/product/1729/104753
+# - https://cloud.tencent.com/document/product/1729/97731
+# - https://cloud.tencent.com/document/product/1729/111007
+- platform: hunyuan
+ models:
+ - name: hunyuan-turbo-latest
+ max_input_tokens: 28000
+ max_output_tokens: 4096
+ input_price: 2.1
+ output_price: 7.0
+ supports_function_calling: true
+ - name: hunyuan-pro
+ max_input_tokens: 28000
+ max_output_tokens: 4096
+ input_price: 4.2
+ output_price: 14.0
+ supports_function_calling: true
+ - name: hunyuan-large
+ max_input_tokens: 28000
+ max_output_tokens: 4096
+ supports_function_calling: true
+ - name: hunyuan-standard
+ max_input_tokens: 30000
+ max_output_tokens: 2048
+ input_price: 0.112
+ output_price: 0.28
+ supports_function_calling: true
+ - name: hunyuan-standard-256K
+ max_input_tokens: 250000
+ max_output_tokens: 6144
+ input_price: 0.07
+ output_price: 0.28
+ supports_function_calling: true
+ - name: hunyuan-lite
+ max_input_tokens: 250000
+ max_output_tokens: 6144
+ input_price: 0
+ output_price: 0
+ supports_function_calling: true
+ - name: hunyuan-functioncall
+ max_input_tokens: 28000
+ max_output_tokens: 4096
+ input_price: 0.56
+ output_price: 1.12
+ supports_function_calling: true
+ - name: hunyuan-vision
+ max_input_tokens: 6144
+ max_output_tokens: 2048
+ input_price: 2.52
+ output_price: 2.52
+ supports_function_calling: true
+ supports_vision: true
+ - name: hunyuan-embedding
+ type: embedding
+ input_price: 0.01
+ max_tokens_per_chunk: 1024
+ default_chunk_size: 1000
+ max_batch_size: 100
+
# Links:
# - https://platform.moonshot.cn/docs/intro
# - https://platform.moonshot.cn/docs/pricing/chat
diff --git a/src/client/mod.rs b/src/client/mod.rs
index 883d5f7..2430d94 100644
--- a/src/client/mod.rs
+++ b/src/client/mod.rs
@@ -35,7 +35,7 @@ register_client!(
(ernie, "ernie", ErnieConfig, ErnieClient),
);
-pub const OPENAI_COMPATIBLE_PLATFORMS: [(&str, &str); 21] = [
+pub const OPENAI_COMPATIBLE_PLATFORMS: [(&str, &str); 22] = [
("ai21", "https://api.ai21.com/studio/v1"),
("cloudflare", ""),
("deepinfra", "https://api.deepinfra.com/v1/openai"),
@@ -44,6 +44,7 @@ pub const OPENAI_COMPATIBLE_PLATFORMS: [(&str, &str); 21] = [
("github", "https://models.inference.ai.azure.com"),
("groq", "https://api.groq.com/openai/v1"),
("huggingface", "https://api-inference.huggingface.co/v1"),
+ ("hunyuan", "https://api.hunyuan.cloud.tencent.com/v1"),
("lingyiwanwu", "https://api.lingyiwanwu.com/v1"),
("mistral", "https://api.mistral.ai/v1"),
("moonshot", "https://api.moonshot.cn/v1"),