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/vertexai.rs | |
| parent | 01ebc8734838e13fb533022c1d24e7003ed42935 (diff) | |
| download | aichat-3b5843fe2e6b4e3725bbc1b269c23115c953b2b0.tar.gz | |
refactor: all clients use openai token counter (#402)
Diffstat (limited to 'src/client/vertexai.rs')
| -rw-r--r-- | src/client/vertexai.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/client/vertexai.rs b/src/client/vertexai.rs index babbd23..ad39c16 100644 --- a/src/client/vertexai.rs +++ b/src/client/vertexai.rs @@ -1,6 +1,6 @@ use super::{ json_stream, message::*, patch_system_message, Client, ExtraConfig, Model, PromptType, - SendData, TokensCountFactors, VertexAIClient, + SendData, VertexAIClient, }; use crate::{render::ReplyHandler, utils::PromptKind}; @@ -20,8 +20,6 @@ const MODELS: [(&str, usize, &str); 3] = [ ("gemini-1.5-pro-preview-0409", 1000000, "text,vision"), ]; -const TOKENS_COUNT_FACTORS: TokensCountFactors = (5, 2); - static mut ACCESS_TOKEN: (String, i64) = (String::new(), 0); // safe under linear operation #[derive(Debug, Clone, Deserialize, Default)] @@ -69,7 +67,6 @@ impl VertexAIClient { 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() } |
