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

Function is_file_content

src/openai/_files.py:29–32  ·  view source on GitHub ↗
(obj: object)

Source from the content-addressed store, hash-verified

27
28
29def is_file_content(obj: object) -> TypeGuard[FileContent]:
30 return (
31 isinstance(obj, bytes) or isinstance(obj, tuple) or isinstance(obj, io.IOBase) or isinstance(obj, os.PathLike)
32 )
33
34
35def assert_is_file_content(obj: object, *, key: str | None = None) -> None:

Callers 3

assert_is_file_contentFunction · 0.85
_transform_fileFunction · 0.85
_async_transform_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected