Convert the GameContext to a dictionary for rendering prompts in the agent
(self)
| 32 | context = self.model_dump() |
| 33 | return {key: Template(template_str).render(**context) for key, template_str in self.prompts.items()} |
| 34 | |
| 35 | def to_template_vars(self) -> dict[str, str]: |
| 36 | """Convert the GameContext to a dictionary for rendering prompts in the agent""" |
| 37 | out = self.model_dump() | self._render_prompt_templates() |
| 38 | out.pop("prompts") |
| 39 | return out |
no test coverage detected