Skip to content

Commit 5d72d99

Browse files
committed
Chore: dict -> model_dump()
1 parent 82609da commit 5d72d99

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

codeclash/agents/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ class GameContext(BaseModel):
2828
working_dir: str
2929

3030
def _render_prompt_templates(self) -> dict:
31-
context = self.dict()
31+
context = self.model_dump()
3232
return {key: Template(template_str).render(**context) for key, template_str in self.prompts.items()}
3333

3434
def to_template_vars(self) -> dict[str, str]:
3535
"""Convert the GameContext to a dictionary for rendering prompts in the agent"""
36-
out = self.dict() | self._render_prompt_templates()
36+
out = self.model_dump() | self._render_prompt_templates()
3737
out.pop("prompts")
3838
return out

0 commit comments

Comments
 (0)