UNPKG

adk-typescript

Version:

TypeScript port of Google's Agent Development Kit (ADK)

47 lines (46 loc) 1.13 kB
/** * A queue for live requests in streaming sessions. */ import { Content } from '../models/types'; /** * Represents a live request within a streaming session. */ export interface LiveRequest { /** Indicates if the connection should be closed */ close?: boolean; /** Binary blob data for audio/video streaming */ blob?: Uint8Array; /** Content data */ content?: Content; } /** * A queue for managing live requests in streaming sessions. */ export declare class LiveRequestQueue { private queue; private resolvers; /** * Adds a blob request to the queue. * * @param blob The binary blob data */ sendBlob(blob: Uint8Array): void; /** * Adds a content request to the queue. * * @param content The content data */ sendContent(content: Content): void; /** * Gets the next request from the queue. * * @returns A promise that resolves to the next request */ get(): Promise<LiveRequest>; /** * Adds a request to the queue. * * @param request The request to add */ private enqueue; }