Interface: RealtimeAdapter#
Defined in: packages/ai/src/realtime/types.ts:319
Adapter interface for connecting to realtime providers. Each provider (OpenAI, ElevenLabs, etc.) implements this interface.
Defined here in @tanstack/ai — the shared layer that both provider adapter
packages and the client runtime (@tanstack/ai-client) already depend on —
so a provider package can describe its realtime adapter without taking a
dependency on the client-only @tanstack/ai-client. @tanstack/ai-client
re-exports this type for backwards compatibility.
Properties#
connect()#
connect: (token, clientTools?) => Promise<RealtimeConnection>;
Defined in: packages/ai/src/realtime/types.ts:329
Create a connection using the provided token
Parameters#
token#
The ephemeral token from the server
clientTools?#
readonly AnyClientTool[]
Optional client-side tools to register with the provider
Returns#
Promise<RealtimeConnection>
A connection instance
provider#
provider: string;
Defined in: packages/ai/src/realtime/types.ts:321
Provider identifier