Skip to content

Commit

Permalink
make sure we copy temp from parser on prompt init
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoskal committed Sep 27, 2024
1 parent a915ab3 commit ce013ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion parser/src/constraint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ impl Constraint {
pub fn process_prompt(&mut self, prompt: Vec<TokenId>) -> Vec<TokenId> {
assert!(!self.started);
self.started = true;
self.parser.process_prompt(prompt)
let r = self.parser.process_prompt(prompt);
self.temperature = self.parser.parser.temperature();
r
}

/// This can be called before the first get_mask() to walk forward the
Expand Down Expand Up @@ -129,6 +131,7 @@ impl Constraint {
if !self.started {
self.started = true;
self.parser.start_without_prompt();
self.temperature = self.parser.parser.temperature();
}

if self.delayed_stop {
Expand Down

0 comments on commit ce013ae

Please sign in to comment.