normalize_post_prompt
normalize_post_prompt
Normalize a post-prompt body from either engine. Parses post_prompt_data with
parse_post_prompt_data(), reads the log from call_log, raw_call_log, or
raw_messages, and extracts the dialogue with dialogue_turns(), dropping the chat
engine’s summary echo by comparing against the raw summary string.
Parameters
body
The complete post-prompt request body.
Returns
NormalizedPostPrompt — Never raises. A body the function can’t make sense of
yields one with empty fields.