diff options
| author | Volodymyr Lisivka <vlisivka@gmail.com> | 2024-07-22 15:56:53 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-22 20:56:53 +0800 |
| commit | 1a1798c893277fd1e4f42ffea9bc54f75881326e (patch) | |
| tree | a992aec03d050e1bd30fc19484441149156975f0 /src/config | |
| parent | b4e4fb57c3858a484384f51786121a88bf28d8f9 (diff) | |
| download | aichat-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')
| -rw-r--r-- | src/config/input.rs | 2 |
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()); |
