MCPcopy
hub / github.com/openai/openai-python / get_model_fields

Function get_model_fields

src/openai/_compat.py:116–119  ·  view source on GitHub ↗
(model: type[pydantic.BaseModel])

Source from the content-addressed store, hash-verified

114
115
116def get_model_fields(model: type[pydantic.BaseModel]) -> dict[str, FieldInfo]:
117 if PYDANTIC_V1:
118 return model.__fields__ # type: ignore
119 return model.model_fields
120
121
122def model_copy(model: _ModelT, *, deep: bool = False) -> _ModelT:

Callers 2

assert_matches_modelFunction · 0.90
constructMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected