Check whether a block contains multimodal data in OpenAI Chat Completions format.
Supports both data and ID-style blocks (e.g. 'file_data' and 'file_id')
If additional keys are present, they are ignored / will not affect outcome as long as the required keys are present and valid.
is_openai_data_block(
block: dict,
filter_: Literal['image', 'audio', 'file'] | None = None
) -> bool| Name | Type | Description |
|---|---|---|
block* | dict | The content block to check. |
filter_ | Literal['image', 'audio', 'file'] | None | Default: NoneIf provided, only return True for blocks matching this specific type.
|