convert_to_openai_data_block#
- langchain_core.messages.content_blocks.convert_to_openai_data_block(block: dict) dict [source]#
Format standard data content block to format expected by OpenAI.
- Parameters:
block (dict) β A data content block.
- Raises:
ValueError β If the block type or source type is not supported.
- Returns:
A dictionary formatted for OpenAIβs API.
- Return type:
dict