diff --git a/nanocode.py b/nanocode.py index fdbbc94..f670616 100644 --- a/nanocode.py +++ b/nanocode.py @@ -323,11 +323,13 @@ class RLMCodingProgram(PrecompiledProgram): max_iterations=self.config.max_iters, verbose=self.config.verbose, ) + agent.set_lm(self.lm) - print(f"Using model: {self.lm.model}") - print(f"Using sub-model: {self.sub_lm.model}") self.agent = agent + print(f"Using model: {self.agent.get_lm().model}") + print(f"Using sub-model: {self.agent.get_lm().model}") + def forward(self, task: str) -> str: assert task, "Task cannot be empty" return self.agent(task=task)