openai.internal._oai_images_fetch_inline

(internal) A `url`-mode datum, fetched and inlined. dall-e's `response_format: "url"` answers with a link that OpenAI expires after 60 minutes, and a `-> image` value whose `base64()` is empty is useless to user code — so the bytes are pulled here, once, and the value handed on carries real content. The MIME type comes from the fetch's own `content-type` when it sent one.

Reference version

Signature

function openai.internal._oai_images_fetch_inline(
location: string,
fallback_mime: string
) -> image throws baml.errors.Io | baml.errors.Timeout | ai.errors.NetworkFailure

(internal) A url-mode datum, fetched and inlined. dall-e's response_format: "url" answers with a link that OpenAI expires after 60 minutes, and a -> image value whose base64() is empty is useless to user code — so the bytes are pulled here, once, and the value handed on carries real content. The MIME type comes from the fetch's own content-type when it sent one.

Source:<builtin>/openai/ns_internal/images.bamlbytes 1215613186