cutting a new version addressin backward compatibility

This commit is contained in:
João Moura
2024-02-28 12:03:43 -03:00
parent 5857c22daf
commit 78bf008c36
5 changed files with 33 additions and 8 deletions

View File

@@ -256,9 +256,10 @@ class Agent(BaseModel):
def interpolate_inputs(self, inputs: Dict[str, Any]) -> None:
"""Interpolate inputs into the agent description and backstory."""
self.role = self.role.format(**inputs)
self.goal = self.goal.format(**inputs)
self.backstory = self.backstory.format(**inputs)
if inputs:
self.role = self.role.format(**inputs)
self.goal = self.goal.format(**inputs)
self.backstory = self.backstory.format(**inputs)
def increment_formatting_errors(self) -> None:
"""Count the formatting errors of the agent."""