Skip to main content

storage_plan

Function storage_plan 

Source
fn storage_plan(
    item: OutputItem,
    conversation_id: Uuid,
) -> ChatbotResult<StoragePlan>
Expand description

Routes an output item to how it should be persisted, or rejects it.

Message, FunctionCall and FunctionCallOutput are each handled by their caller before a call would reach here (a text Message is streamed, a refusal Message is inserted here, a FunctionCall is recorded by the round that receives it, and a FunctionCallOutput never arrives from Azure at all) — the error arms below are the guard against a caller passing one in anyway, on an unexpected wire shape, not a normal path.