Interface BidiAction<I,O,S,Init>

Type Parameters:
I - per-turn input type
O - final output type
S - stream chunk type
Init - session-init type (pass Void / null when not needed)
All Superinterfaces:
Action<I,O,S>, Registerable
All Known Implementing Classes:
Agent, BidiActionImpl

public interface BidiAction<I,O,S,Init> extends Action<I,O,S>
A bidirectional streaming action.

A BidiAction accepts a one-time session-init value (Init), a stream of per-turn inputs (InputSource<I>), streams chunk values of type S via a callback, and returns a final output of type O.

Callers that only need a single input can use the inherited Action.run(com.google.genkit.core.ActionContext, I) methods, which wrap the single input in a BufferedInputSource and invoke the bidi handler transparently.