@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
22 lines (21 loc) • 1.08 kB
TypeScript
/**
* What this package adds around an xAI realtime session.
*
* The LiveKit xAI plugin is the OpenAI realtime plugin pointed at xAI, and the
* live service differs from OpenAI in three ways the plugin does not cover
* (measured 2026-10-20, see docs/features/livekit-voice-agent.md):
*
* - xAI sends usage at the top level of `response.done` and leaves
* `response.usage` an empty object, which is what the plugin reads, so its
* metrics are zero for every response;
* - an unknown model id is accepted and runs a default model, with no error;
* - a wrong key is refused with HTTP 400 at the WebSocket upgrade, and the
* plugin opens its socket without an 'error' listener, so the refusal is an
* uncaught exception.
*
* `observeXaiSession` reads the stream of server events the plugin republishes
* as `openai_server_event_received` for the first two, and watches for the
* third.
*/
import type { XaiObservedSession } from "../../types/index.js";
export declare function observeXaiSession(session: XaiObservedSession, requestedModel: string): void;