Method
render
(
self,
conversation: list,
code_markdown: str,
commands: list,
error :str,
system_os: str
)
Source from the content-addressed store, hash-verified
| 20 | self.llm = LLM(model_id=base_model) |
| 21 | |
| 22 | def render( |
| 23 | self, |
| 24 | conversation: list, |
| 25 | code_markdown: str, |
| 26 | commands: list, |
| 27 | error :str, |
| 28 | system_os: str |
| 29 | ) -> str: |
| 30 | env = Environment(loader=BaseLoader()) |
| 31 | template = env.from_string(PROMPT) |
| 32 | return template.render( |
| 33 | conversation=conversation, |
| 34 | code_markdown=code_markdown, |
| 35 | commands=commands, |
| 36 | error=error, |
| 37 | system_os=system_os |
| 38 | ) |
| 39 | |
| 40 | def validate_response(self, response: str) -> Union[List[Dict[str, str]], bool]: |
| 41 | response = response.strip() |
Tested by
no test coverage detected