MCPcopy Create free account
hub / github.com/CodeClash-ai/CodeClash / to_template_vars

Method to_template_vars

codeclash/agents/utils.py:34–38  ·  view source on GitHub ↗

Convert the GameContext to a dictionary for rendering prompts in the agent

(self)

Source from the content-addressed store, hash-verified

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

Callers 1

runMethod · 0.80

Calls 1

Tested by

no test coverage detected