From 3b5843fe2e6b4e3725bbc1b269c23115c953b2b0 Mon Sep 17 00:00:00 2001 From: sigoden Date: Thu, 11 Apr 2024 05:03:58 +0800 Subject: refactor: all clients use openai token counter (#402) --- src/client/qianwen.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/client/qianwen.rs') 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, @@ -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() } -- cgit v1.2.3