Skip to main content

assistant_action_groups

Function assistant_action_groups 

Source
pub fn assistant_action_groups(
    messages: &[Message],
) -> Vec<AssistantActionGroup>
Expand description

Partition a message list into assistant-action groups.

Groups are defined by assistant message boundaries. For each assistant message, we pull the group start backward across any directly preceding user messages so the user’s prompt is preserved with the assistant work when that work survives compaction.