summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-03-17 09:20:16 +0800
committerGitHub <noreply@github.com>2024-03-17 09:20:16 +0800
commit50c03e4fdc0eada5379d136298f9bd3ca3554105 (patch)
tree91a8fccb777dc90580f6b818854f3226d57bf440
parentf3210d622ab362e621169d92510702c1a1d53847 (diff)
downloadaichat-50c03e4fdc0eada5379d136298f9bd3ca3554105.tar.gz
feat: update ernie models (#357)
-rw-r--r--src/client/ernie.rs23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/client/ernie.rs b/src/client/ernie.rs
index c7221b5..caa61e7 100644
--- a/src/client/ernie.rs
+++ b/src/client/ernie.rs
@@ -14,23 +14,26 @@ use std::env;
const API_BASE: &str = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1";
const ACCESS_TOKEN_URL: &str = "https://aip.baidubce.com/oauth/2.0/token";
-const MODELS: [(&str, usize, &str); 7] = [
+const MODELS: [(&str, usize, &str); 6] = [
// https://cloud.baidu.com/doc/WENXINWORKSHOP/s/clntwmv7t
- ("ernie-bot-4", 5120, "/wenxinworkshop/chat/completions_pro"),
- ("ernie-bot-8k", 5120, "/wenxinworkshop/chat/ernie_bot_8k"),
- ("ernie-bot", 2048, "/wenxinworkshop/chat/completions"),
+ ("ernie-4.0-8k", 5120, "/wenxinworkshop/chat/completions_pro"),
(
- "ernie-3.5-4k-0205",
+ "ernie-3.5-8k",
+ 5120,
+ "/wenxinworkshop/chat/ernie-3.5-8k-0205",
+ ),
+ (
+ "ernie-3.5-4k",
2048,
"/wenxinworkshop/chat/ernie-3.5-4k-0205",
),
+ ("ernie-speed-8k", 7168, "/wenxinworkshop/chat/ernie_speed"),
(
- "ernie-3.5-8k-0205",
- 5120,
- "/wenxinworkshop/chat/ernie-3.5-8k-0205",
+ "ernie-speed-128k",
+ 124000,
+ "/wenxinworkshop/chat/ernie-speed-128k",
),
- ("ernie-speed", 7168, "/wenxinworkshop/chat/ernie_speed"),
- ("ernie-bot-turbo", 7168, "/wenxinworkshop/chat/eb-instant"),
+ ("ernie-lite-8k", 7168, "/wenxinworkshop/chat/ernie-lite-8k"),
];
static mut ACCESS_TOKEN: String = String::new(); // safe under linear operation