MCPcopy Create free account
hub / github.com/microsoft/Webwright / serialize

Method serialize

src/webwright/models/base.py:575–587  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

573 return run_async(self._query_async(messages))
574
575 def serialize(self) -> dict[str, Any]:
576 config_dump = self.config.model_dump(mode="json")
577 if self._API_KEY_FIELD:
578 config_dump[self._API_KEY_FIELD] = "<redacted>"
579 return {
580 "model": {
581 "config": config_dump,
582 "usage": {
583 **self._usage_snapshot(),
584 },
585 "model_type": f"{self.__class__.__module__}.{self.__class__.__name__}",
586 }
587 }

Callers

nothing calls this directly

Calls 1

_usage_snapshotMethod · 0.95

Tested by

no test coverage detected