summaryrefslogtreecommitdiffstats
path: root/src/config/input.rs
diff options
context:
space:
mode:
authorVolodymyr Lisivka <vlisivka@gmail.com>2024-07-22 15:56:53 +0300
committerGitHub <noreply@github.com>2024-07-22 20:56:53 +0800
commit1a1798c893277fd1e4f42ffea9bc54f75881326e (patch)
treea992aec03d050e1bd30fc19484441149156975f0 /src/config/input.rs
parentb4e4fb57c3858a484384f51786121a88bf28d8f9 (diff)
downloadaichat-1a1798c893277fd1e4f42ffea9bc54f75881326e.tar.gz
fix: problem with input token limit (#737)
Fix for problem with token limit applied from default model instead of selected model.
Diffstat (limited to 'src/config/input.rs')
-rw-r--r--src/config/input.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config/input.rs b/src/config/input.rs
index 46e1e74..6df3b71 100644
--- a/src/config/input.rs
+++ b/src/config/input.rs
@@ -210,7 +210,7 @@ impl Input {
bail!("The current model does not support vision. Is the model configured with `supports_vision: true`?");
}
let messages = self.build_messages()?;
- self.config.read().model.guard_max_input_tokens(&messages)?;
+ model.guard_max_input_tokens(&messages)?;
let temperature = self.role().temperature();
let top_p = self.role().top_p();
let functions = self.config.read().select_functions(model, self.role());