openai.internal.lower_journal
ai.Journal -> Responses API input items. Only promptable events lower; ai.RunStarted, ai.ToolRequested, ai.Usage, and ai.FinalProduced are journal-only. Callers pass the SANITIZED journal (see _request).
Reference version
Signature
function openai.internal.lower_journal(
j: ai.Journal,
metadata: map<string, baml.json.json>[],
preview: bool = …
) -> openai.internal.OaInputItem[] throws baml.errors.InvalidArgument | baml.errors.Io | baml.errors.Timeout | baml.json.SerializationError | ai.errors.Failure
ai.Journal -> Responses API input items. Only promptable events lower; ai.RunStarted, ai.ToolRequested, ai.Usage, and ai.FinalProduced are journal-only. Callers pass the SANITIZED journal (see _request).
metadata is the per-item directive list _apply_message_metadata walks:
one map is appended per item produced here (a user turn's own, an empty
one for everything else) so it stays aligned one-to-one with input.
Source:<builtin>/openai/ns_internal/responses.bamlbytes 20274–23662