From ce013ae0114584e656bddac49bf7b1784a5330aa Mon Sep 17 00:00:00 2001 From: Michal Moskal Date: Fri, 27 Sep 2024 22:26:20 +0000 Subject: [PATCH] make sure we copy temp from parser on prompt init --- parser/src/constraint.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/parser/src/constraint.rs b/parser/src/constraint.rs index 079dbaec..1a48c71a 100644 --- a/parser/src/constraint.rs +++ b/parser/src/constraint.rs @@ -88,7 +88,9 @@ impl Constraint { pub fn process_prompt(&mut self, prompt: Vec) -> Vec { 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 @@ -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 {