openai.internal._chat_prompt_parts

(internal) One prompt message as content parts. With `compat.cache_breakpoints` a `${cache(args)}` becomes a breakpoint on the part before it, with the text on either side trimmed where it faces the delimiter (`ai.wire.prompt_parts`); without, the delimiter is dropped and the text around it is one part again (`ai.wire.prompt_blocks`), so the request is the one the prompt would produce without it.

Reference version

Signature

function openai.internal._chat_prompt_parts(
message: ai.PromptMessage,
preview: bool = …
) -> openai.internal.ChatContentPart[] throws baml.errors.InvalidArgument | baml.errors.Timeout | ai.errors.InvalidRequest | ai.errors.NetworkFailure | ai.errors.PreviewUnsupported

(internal) One prompt message as content parts. With compat.cache_breakpoints a ${cache(args)} becomes a breakpoint on the part before it, with the text on either side trimmed where it faces the delimiter (ai.wire.prompt_parts); without, the delimiter is dropped and the text around it is one part again (ai.wire.prompt_blocks), so the request is the one the prompt would produce without it.

Source:<builtin>/openai/ns_internal/chat.bamlbytes 29405–30317