summaryrefslogtreecommitdiffstats
path: root/src/client/qianwen.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-04-11 05:03:58 +0800
committerGitHub <noreply@github.com>2024-04-11 05:03:58 +0800
commit3b5843fe2e6b4e3725bbc1b269c23115c953b2b0 (patch)
treea1d2c36dbccf0c82079f774d1efe08c993ee31f2 /src/client/qianwen.rs
parent01ebc8734838e13fb533022c1d24e7003ed42935 (diff)
downloadaichat-3b5843fe2e6b4e3725bbc1b269c23115c953b2b0.tar.gz
refactor: all clients use openai token counter (#402)
Diffstat (limited to 'src/client/qianwen.rs')
-rw-r--r--src/client/qianwen.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/client/qianwen.rs b/src/client/qianwen.rs
index 3e69dae..031abe7 100644
--- a/src/client/qianwen.rs
+++ b/src/client/qianwen.rs
@@ -1,5 +1,5 @@
use super::{
- message::*, Client, ExtraConfig, Model, PromptType, QianwenClient, SendData, TokensCountFactors,
+ message::*, Client, ExtraConfig, Model, PromptType, QianwenClient, SendData,
};
use crate::{
@@ -37,8 +37,6 @@ const MODELS: [(&str, usize, &str); 6] = [
("qwen-vl-max", 0, "text,vision"),
];
-const TOKENS_COUNT_FACTORS: TokensCountFactors = (4, 14);
-
#[derive(Debug, Clone, Deserialize, Default)]
pub struct QianwenConfig {
pub name: Option<String>,
@@ -88,7 +86,6 @@ impl QianwenClient {
Model::new(client_name, name)
.set_capabilities(capabilities.into())
.set_max_input_tokens(Some(max_input_tokens))
- .set_tokens_count_factors(TOKENS_COUNT_FACTORS)
})
.collect()
}