summaryrefslogtreecommitdiffstats
path: root/src/client/model.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2023-11-07 10:56:28 +0800
committerGitHub <noreply@github.com>2023-11-07 10:56:28 +0800
commit9a8b302432a3f9bfa1e467dde027fc92dacce3e2 (patch)
treeee18de8b077980619ff9a1dee24464a1d13b801d /src/client/model.rs
parent87aec71e080dc9c15f3dd0059dbc91686f3de4e6 (diff)
downloadaichat-9a8b302432a3f9bfa1e467dde027fc92dacce3e2.tar.gz
refactor: remove Model.client_index, match client by name (#218)
Diffstat (limited to 'src/client/model.rs')
-rw-r--r--src/client/model.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/client/model.rs b/src/client/model.rs
index dc30dcf..82d47c9 100644
--- a/src/client/model.rs
+++ b/src/client/model.rs
@@ -8,7 +8,6 @@ pub type TokensCountFactors = (usize, usize); // (per-messages, bias)
#[derive(Debug, Clone)]
pub struct Model {
- pub client_index: usize,
pub client_name: String,
pub name: String,
pub max_tokens: Option<usize>,
@@ -17,14 +16,13 @@ pub struct Model {
impl Default for Model {
fn default() -> Self {
- Model::new(0, "", "")
+ Model::new("", "")
}
}
impl Model {
- pub fn new(client_index: usize, client_name: &str, name: &str) -> Self {
+ pub fn new(client_name: &str, name: &str) -> Self {
Self {
- client_index,
client_name: client_name.into(),
name: name.into(),
max_tokens: None,