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

Function _content_schema

scripts/check_openapi_docs.py:34–39  ·  view source on GitHub ↗
(container: object)

Source from the content-addressed store, hash-verified

32
33
34def _content_schema(container: object) -> object:
35 content: Final = _as_mapping(_as_mapping(container).get("content"))
36 return next(
37 (schema for media_type in SCHEMA_MEDIA_TYPES if (schema := _as_mapping(content.get(media_type)).get("schema"))),
38 None,
39 )
40
41
42def _operation_codes(operation: Mapping[str, object]) -> Iterator[str]:

Callers 1

_operation_codesFunction · 0.85

Calls 3

_as_mappingFunction · 0.70
getMethod · 0.65
nextFunction · 0.50

Tested by

no test coverage detected