MCPcopy Create free account
hub / github.com/BerriAI/litellm / model_dump

Method model_dump

litellm/types/integrations/prometheus.py:1155–1160  ·  view source on GitHub ↗

Same shape as the former Pydantic ``model_dump()`` (plain dict, list tags).

(self)

Source from the content-addressed store, hash-verified

1153 return ""
1154
1155 def model_dump(self) -> dict[str, object]:
1156 """Same shape as the former Pydantic ``model_dump()`` (plain dict, list tags)."""
1157 d: Final[dict[str, object]] = {f.name: getattr(self, f.name) for f in fields(self)}
1158 d["tags"] = list(self.tags)
1159 d["custom_metadata_labels"] = dict(self.custom_metadata_labels)
1160 return d
1161
1162
1163@dataclass

Calls 3

fieldsFunction · 0.50
listFunction · 0.50
dictFunction · 0.50