Skip to main content

replayable_input_messages

Function replayable_input_messages 

Source
fn replayable_input_messages(
    messages: Vec<ChatbotConversationMessage>,
) -> ChatbotResult<Vec<APIInputMessage>>
Expand description

A conversation’s stored messages as the request should replay them.

Replaying reasoning keeps a turn’s prefix matching what the previous turn’s later rounds sent, so only reasoning is ever dropped, and only where Azure would reject it: without an encrypted_content payload it cannot be resolved once responses are not stored Azure-side, and unless the item it reasoned about follows it immediately the request 400s. A conversation whose stored tail is a reasoning item — a stream that died mid-round, or a round that persisted its reasoning before its calls — would otherwise be unusable for good.