openai.internal._chat_lower_block

(internal) One content block -> one typed content part. Chat completions imposes no role restriction on media, so every position accepts what the endpoint has a part for — except a `tool` message, whose content is text only, so media in a tool result degrades into a user turn after the run of results (`chat_lower_journal`). There is no video part at all (`_chat_media_part`).

Reference version

Signature

function openai.internal._chat_lower_block(
block: ai.content.Block,
preview: bool = …
) -> openai.internal.ChatContentPart throws baml.errors.InvalidArgument | baml.errors.Io | baml.errors.Timeout | ai.errors.InvalidRequest | ai.errors.NetworkFailure | ai.errors.PreviewUnsupported

(internal) One content block -> one typed content part. Chat completions imposes no role restriction on media, so every position accepts what the endpoint has a part for — except a tool message, whose content is text only, so media in a tool result degrades into a user turn after the run of results (chat_lower_journal). There is no video part at all (_chat_media_part).

position | text | image | pdf | audio | video system | Accept | Accept | Accept | Accept | Reject user | Accept | Accept | Accept | Accept | Reject assistant | Accept | Accept | Accept | Accept | Reject tool_result | Accept | Degrade | Degrade | Degrade | Reject

Source:<builtin>/openai/ns_internal/chat.bamlbytes 2393524275