diff options
| author | sigoden <sigoden@gmail.com> | 2024-04-11 05:03:58 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-11 05:03:58 +0800 |
| commit | 3b5843fe2e6b4e3725bbc1b269c23115c953b2b0 (patch) | |
| tree | a1d2c36dbccf0c82079f774d1efe08c993ee31f2 /src/client/openai.rs | |
| parent | 01ebc8734838e13fb533022c1d24e7003ed42935 (diff) | |
| download | aichat-3b5843fe2e6b4e3725bbc1b269c23115c953b2b0.tar.gz | |
refactor: all clients use openai token counter (#402)
Diffstat (limited to 'src/client/openai.rs')
| -rw-r--r-- | src/client/openai.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/client/openai.rs b/src/client/openai.rs index 56cc53c..c996ed0 100644 --- a/src/client/openai.rs +++ b/src/client/openai.rs @@ -1,4 +1,4 @@ -use super::{ExtraConfig, Model, OpenAIClient, PromptType, SendData, TokensCountFactors}; +use super::{ExtraConfig, Model, OpenAIClient, PromptType, SendData}; use crate::{render::ReplyHandler, utils::PromptKind}; @@ -24,8 +24,6 @@ const MODELS: [(&str, usize, &str); 8] = [ ("gpt-4-32k", 32768, "text"), ]; -pub const OPENAI_TOKENS_COUNT_FACTORS: TokensCountFactors = (5, 2); - #[derive(Debug, Clone, Deserialize, Default)] pub struct OpenAIConfig { pub name: Option<String>, @@ -52,7 +50,6 @@ impl OpenAIClient { Model::new(client_name, name) .set_capabilities(capabilities.into()) .set_max_input_tokens(Some(max_input_tokens)) - .set_tokens_count_factors(OPENAI_TOKENS_COUNT_FACTORS) }) .collect() } |
