We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82609da commit 5d72d99Copy full SHA for 5d72d99
1 file changed
codeclash/agents/utils.py
@@ -28,11 +28,11 @@ class GameContext(BaseModel):
28
working_dir: str
29
30
def _render_prompt_templates(self) -> dict:
31
- context = self.dict()
+ context = self.model_dump()
32
return {key: Template(template_str).render(**context) for key, template_str in self.prompts.items()}
33
34
def to_template_vars(self) -> dict[str, str]:
35
"""Convert the GameContext to a dictionary for rendering prompts in the agent"""
36
- out = self.dict() | self._render_prompt_templates()
+ out = self.model_dump() | self._render_prompt_templates()
37
out.pop("prompts")
38
return out
0 commit comments