(self, *, raw_text: str, error: str)
| 399 | return observation_messages |
| 400 | |
| 401 | def _format_error(self, *, raw_text: str, error: str) -> FormatError: |
| 402 | return FormatError( |
| 403 | self.format_message( |
| 404 | role="user", |
| 405 | content=Template(self.config.format_error_template, undefined=StrictUndefined).render( |
| 406 | error=error, |
| 407 | model_response=raw_text, |
| 408 | **self.get_template_vars(), |
| 409 | ), |
| 410 | extra={ |
| 411 | "interrupt_type": "FormatError", |
| 412 | "model_response": raw_text, |
| 413 | }, |
| 414 | ) |
| 415 | ) |
| 416 | |
| 417 | def _format_repair_message(self, *, raw_text: str, error: str) -> dict[str, Any]: |
| 418 | return self.format_message( |
no test coverage detected