@juspay/neurolink
Version:
The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002
23 lines (22 loc) • 1.4 kB
TypeScript
/**
* Per-call memory for the realtime (speech-to-speech) voice agent.
*
* Decides, once per call and before anything else is wired, whether this call
* may be remembered: the room metadata must carry a memory binding that
* verifies against the shared secret and the actual room name. If it does, a
* NeuroLink instance is built, the conversation's recent history is read for
* seeding, and a turn recorder is created that writes each finished exchange
* through `recordConversationTurn`. If it does not, the call proceeds exactly
* as it would without memory, and a warning says why (never the ids).
*
* The shutdown flush is registered here, before the job lifecycle installs its
* process reaper. LiveKit starts every shutdown callback in registration order
* and the reaper exits the process about a second later, so the flush gets a
* budget below that second and starts first.
*
* See docs/features/livekit-voice-agent.md.
*/
import type { JobContext } from "@livekit/agents";
import type { RealtimeCallMemory, RealtimeVoiceMemoryConfig } from "../../types/index.js";
/** Verify the call's binding and prepare its recorder; `undefined` means "no memory for this call". */
export declare function setUpRealtimeCallMemory(ctx: Pick<JobContext, "room" | "addShutdownCallback">, config: RealtimeVoiceMemoryConfig | undefined, model?: string): Promise<RealtimeCallMemory | undefined>;