fix: problem with input token limit (#737)

Fix for problem with token limit applied from default model instead of selected model.
pull/739/head
Volodymyr Lisivka 2 months ago committed by GitHub
parent b4e4fb57c3
commit 1a1798c893
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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());

Loading…
Cancel
Save