diff options
| author | sigoden <sigoden@gmail.com> | 2024-08-13 09:49:12 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-13 09:49:12 +0800 |
| commit | 7a95bd5de0751a87caed7376b92071f58dc41861 (patch) | |
| tree | 07956748fa19add9f28b85548194b9ab5cb24d80 /src | |
| parent | 3b8bb7389ebb927d9e9ea37bdec401c467c638e2 (diff) | |
| download | aichat-7a95bd5de0751a87caed7376b92071f58dc41861.tar.gz | |
fix: invalid model error while switching roles if the model_id is same to current (#788)
Diffstat (limited to 'src')
| -rw-r--r-- | src/config/mod.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs index 8db7085..9fb2b77 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -749,6 +749,8 @@ impl Config { if self.model.id() != model_id { let model = Model::retrieve_chat(self, model_id)?; role.set_model(&model); + } else { + role.set_model(&self.model); } } None => role.set_model(&self.model), |
