diff options
| author | sigoden <sigoden@gmail.com> | 2023-11-02 15:33:22 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-02 15:33:22 +0800 |
| commit | 652b51509d461d2121e94304d6f00e714ebd0f9f (patch) | |
| tree | fdaeffaa52ca04553e06fcad92fe95f73c6bd2a7 /src/config/session.rs | |
| parent | 7c6841782d36faacc2aa3616dc3ed1b9403fa26e (diff) | |
| download | aichat-652b51509d461d2121e94304d6f00e714ebd0f9f.tar.gz | |
refactor: improve repl completer (#199)
Diffstat (limited to 'src/config/session.rs')
| -rw-r--r-- | src/config/session.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/config/session.rs b/src/config/session.rs index 446b682..92e8c2a 100644 --- a/src/config/session.rs +++ b/src/config/session.rs @@ -33,7 +33,7 @@ impl Session { pub fn new(name: &str, model_info: ModelInfo, role: Option<Role>) -> Self { let temperature = role.as_ref().and_then(|v| v.temperature); Self { - model: model_info.full_name(), + model: model_info.id(), temperature, messages: vec![], name: name.to_string(), @@ -103,7 +103,7 @@ impl Session { items.push(("path", path.to_string())); } - items.push(("model", self.model_info.full_name())); + items.push(("model", self.model_info.id())); if let Some(temperature) = self.temperature() { items.push(("temperature", temperature.to_string())); @@ -165,7 +165,7 @@ impl Session { } pub fn set_model(&mut self, model_info: ModelInfo) -> Result<()> { - self.model = model_info.full_name(); + self.model = model_info.id(); self.model_info = model_info; Ok(()) } |
