GeezerVison is showing adk.dev — LiveRequestQueue | ADK for TypeScript: API Reference - v2.5.0
Queue used to send LiveRequest in a live (bidirectional streaming) way.
Constructors
constructor
-
new LiveRequestQueue(): LiveRequestQueue
Returns LiveRequestQueue
Methods
[asyncIterator]
-
"[asyncIterator]"(): AsyncGenerator<LiveRequest, void, undefined>
Implements the async iterator protocol.
Returns AsyncGenerator<LiveRequest, void, undefined>
close
-
Sends a close signal to the queue.
Returns void
get
-
Retrieves a request from the queue. If the queue is empty, it will
wait until a request is available.
Parameters
OptionalabortSignal: AbortSignal
When provided, a parked (pending) read is released by
rejecting with an abort error once the signal fires. The live send
loop passes the connection's abort signal so a waiter is not stranded
across reconnect/teardown, where it could otherwise steal a request
from the next connection's send loop.
A promise that resolves with the next available request.
send
-
Adds a request to the queue. If there is a pending get() call, it
will be resolved with the given request.
Returns void
sendActivityEnd
-
Sends an activity end signal to mark the end of user input.
Returns void
sendActivityStart
-
sendActivityStart(): void
Sends an activity start signal to mark the beginning of user input.
Returns void
sendContent
-
sendContent(content: Content): void
Sends a content object to the queue.
Returns void
sendRealtime
-
sendRealtime(blob: Blob_2): void
Sends a blob to the model in realtime mode.
Returns void