summaryrefslogtreecommitdiffstats
path: root/src/client/claude.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/claude.rs
parent01ebc8734838e13fb533022c1d24e7003ed42935 (diff)
downloadaichat-3b5843fe2e6b4e3725bbc1b269c23115c953b2b0.tar.gz
refactor: all clients use openai token counter (#402)
Diffstat (limited to 'src/client/claude.rs')
-rw-r--r--src/client/claude.rs8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/client/claude.rs b/src/client/claude.rs
index 1eb83d1..0acbf72 100644
--- a/src/client/claude.rs
+++ b/src/client/claude.rs
@@ -1,7 +1,4 @@
-use super::{
- patch_system_message, ClaudeClient, Client, ExtraConfig, Model, PromptType, SendData,
- TokensCountFactors,
-};
+use super::{patch_system_message, ClaudeClient, Client, ExtraConfig, Model, PromptType, SendData};
use crate::{
client::{ImageUrl, MessageContent, MessageContentPart},
@@ -26,8 +23,6 @@ const MODELS: [(&str, usize, &str); 3] = [
("claude-3-haiku-20240307", 200000, "text,vision"),
];
-const TOKENS_COUNT_FACTORS: TokensCountFactors = (5, 2);
-
#[derive(Debug, Clone, Deserialize)]
pub struct ClaudeConfig {
pub name: Option<String>,
@@ -69,7 +64,6 @@ impl ClaudeClient {
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()
}