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

Function has_parseable_input

src/openai/lib/_parsing/_completions.py:201–213  ·  view source on GitHub ↗
(
    *,
    response_format: type | ResponseFormatParam | Omit,
    input_tools: Iterable[ChatCompletionToolUnionParam] | Omit = omit,
)

Source from the content-addressed store, hash-verified

199
200
201def has_parseable_input(
202 *,
203 response_format: type | ResponseFormatParam | Omit,
204 input_tools: Iterable[ChatCompletionToolUnionParam] | Omit = omit,
205) -> bool:
206 if has_rich_response_format(response_format):
207 return True
208
209 for input_tool in input_tools or []:
210 if is_parseable_tool(input_tool):
211 return True
212
213 return False
214
215
216def has_rich_response_format(

Callers 1

_accumulate_chunkMethod · 0.85

Calls 2

has_rich_response_formatFunction · 0.85
is_parseable_toolFunction · 0.85

Tested by

no test coverage detected