UNPKG

@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

21 lines (20 loc) • 987 B
import type { ProxyHealthResponse, ProxyReadinessState } from "../types/index.js"; export declare function createProxyReadinessState(startTimeMs?: number): ProxyReadinessState; export declare function markProxyReady(state: ProxyReadinessState, readyAtMs?: number): void; /** Stop admitting new inference requests while existing responses drain. */ export declare function markProxyDrainingForUpdate(state: ProxyReadinessState): boolean; /** Reopen inference admission after a deferred or failed update attempt. */ export declare function resumeProxyConnections(state: ProxyReadinessState): boolean; export declare function buildProxyHealthResponse(state: ProxyReadinessState, options: { strategy: string; passthrough: boolean; version: string; now?: number; }): ProxyHealthResponse; export declare function waitForProxyReadiness(args: { host: string; port: number; timeoutMs?: number; intervalMs?: number; fetchImpl?: typeof fetch; }): Promise<void>;