Skip to content

Commit 1a1798c

Browse files
authored
fix: problem with input token limit (#737)
Fix for problem with token limit applied from default model instead of selected model.
1 parent b4e4fb5 commit 1a1798c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/config/input.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ impl Input {
210210
bail!("The current model does not support vision. Is the model configured with `supports_vision: true`?");
211211
}
212212
let messages = self.build_messages()?;
213-
self.config.read().model.guard_max_input_tokens(&messages)?;
213+
model.guard_max_input_tokens(&messages)?;
214214
let temperature = self.role().temperature();
215215
let top_p = self.role().top_p();
216216
let functions = self.config.read().select_functions(model, self.role());

0 commit comments

Comments
 (0)