Skip to main content

invoke

Function invoke 

Source
pub async fn invoke(
    spec: &AgentSpec,
    seat: &mut SeatState,
    inv: &Invocation<'_>,
) -> Result<AgentOutput>
Expand description

Invoke spec for seat, updating the seat’s conversation state.

The work itself runs as one heap-allocated future. Every caller holds this future inside its own (a chat turn nests it four levels deep), and in a debug build each level also keeps by-value temporaries of it in its poll frame. Inline, that pushed a chat worker turn past the 2 MiB a test thread has on Windows; boxed, callers carry a pointer.