MCPcopy Index your code
hub / github.com/microsoft/Webwright / _format_error

Method _format_error

src/webwright/models/base.py:401–415  ·  view source on GitHub ↗
(self, *, raw_text: str, error: str)

Source from the content-addressed store, hash-verified

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(

Callers 1

_query_asyncMethod · 0.95

Calls 3

format_messageMethod · 0.95
get_template_varsMethod · 0.95
FormatErrorClass · 0.90

Tested by

no test coverage detected