Frames are the structs that processors pass to each other.
Every frame has a category:
:system- handled before queued frames and never dropped by an interruption (for exampleInterruption, VAD events, input audio):data- delivered in order; dropped by an interruption unless the frame is markeduninterruptible:control- like:data, for markers such asLLMResponseStart
Every frame also has an :id, which the runner sets the first time the
frame is pushed.
Define a frame of your own with use Octoroom.Agent.Frame:
defmodule MyApp.Frames.Sentiment do
use Octoroom.Agent.Frame, category: :data, fields: [:label, score: 0.0]
endStructs that don't use Octoroom.Agent.Frame can still be pushed; they count as
interruptible :data frames.
Summary
Functions
The frame's category: :system, :data or :control.
Defines a frame module nested in the calling module.
True for system frames.
True if the frame is marked uninterruptible. An interruption keeps these
frames queued, and doesn't kill tasks started while handling them. (System
frames are never dropped either, but tasks started for them are killed.)
Functions
The frame's category: :system, :data or :control.
Defines a frame module nested in the calling module.
defframe Transcription, :data, fields: [:text], uninterruptible: true
True for system frames.
True if the frame is marked uninterruptible. An interruption keeps these
frames queued, and doesn't kill tasks started while handling them. (System
frames are never dropped either, but tasks started for them are killed.)