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

Function has_rich_response_format

src/openai/lib/_parsing/_completions.py:216–225  ·  view source on GitHub ↗
(
    response_format: type[ResponseFormatT] | ResponseFormatParam | Omit,
)

Source from the content-addressed store, hash-verified

214
215
216def has_rich_response_format(
217 response_format: type[ResponseFormatT] | ResponseFormatParam | Omit,
218) -> TypeGuard[type[ResponseFormatT]]:
219 if not is_given(response_format):
220 return False
221
222 if is_response_format_param(response_format):
223 return False
224
225 return True
226
227
228def is_response_format_param(response_format: object) -> TypeGuard[ResponseFormatParam]:

Callers 2

maybe_parse_contentFunction · 0.85
has_parseable_inputFunction · 0.85

Calls 2

is_givenFunction · 0.85
is_response_format_paramFunction · 0.85

Tested by

no test coverage detected