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

Function model_copy

src/openai/_compat.py:122–125  ·  src/openai/_compat.py::model_copy
(model: _ModelT, *, deep: bool = False)

Source from the content-addressed store, hash-verified

120
121
122def model_copy(model: _ModelT, *, deep: bool = False) -> _ModelT:
123 if PYDANTIC_V1:
124 return model.copy(deep=deep) class="cm"># type: ignore
125 return model.model_copy(deep=deep)
126
127
128def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str:

Callers 6

on_eventFunction · 0.90
_info_to_optionsMethod · 0.85
requestMethod · 0.85
requestMethod · 0.85
_prepare_optionsMethod · 0.85
_prepare_optionsMethod · 0.85

Calls 1

copyMethod · 0.45

Tested by 1

on_eventFunction · 0.72