openai.internal._chat_apply_metadata

(internal) Attach a message's authored `metadata` to its LAST content part (see ChatExtraPart). A message that lowered to no parts has nowhere to put the directive, and an empty metadata map is the common case, so both are no-ops.

Reference version

Signature

function openai.internal._chat_apply_metadata(
metadata: map<string, baml.json.json>
) -> void

(internal) Attach a message's authored metadata to its LAST content part (see ChatExtraPart). A message that lowered to no parts has nowhere to put the directive, and an empty metadata map is the common case, so both are no-ops.

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