diff options
| author | sigoden <sigoden@gmail.com> | 2023-11-07 09:55:06 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-07 09:55:06 +0800 |
| commit | 81624f7267ba20799a3bbf779abfe41df30d349c (patch) | |
| tree | 5484737923446cf8bffc2d6e9d0b80062ce421c9 /src/client/model.rs | |
| parent | 399ed3337f1c4edaab39a534b63cc9d00c09dd07 (diff) | |
| download | aichat-81624f7267ba20799a3bbf779abfe41df30d349c.tar.gz | |
refactor: rename Model.llm_name to name (#216)
Diffstat (limited to 'src/client/model.rs')
| -rw-r--r-- | src/client/model.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/model.rs b/src/client/model.rs index d00ad46..dc30dcf 100644 --- a/src/client/model.rs +++ b/src/client/model.rs @@ -10,7 +10,7 @@ pub type TokensCountFactors = (usize, usize); // (per-messages, bias) pub struct Model { pub client_index: usize, pub client_name: String, - pub llm_name: String, + pub name: String, pub max_tokens: Option<usize>, pub tokens_count_factors: TokensCountFactors, } @@ -26,14 +26,14 @@ impl Model { Self { client_index, client_name: client_name.into(), - llm_name: name.into(), + name: name.into(), max_tokens: None, tokens_count_factors: Default::default(), } } pub fn id(&self) -> String { - format!("{}:{}", self.client_name, self.llm_name) + format!("{}:{}", self.client_name, self.name) } pub fn set_max_tokens(mut self, max_tokens: Option<usize>) -> Self { |
