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

11 lines (10 loc) • 695 B
/** * Finish-reason translation driven by the `finishReasons` tables in * `src/lib/providers/rules/<id>.json`. Every provider wire and proxy format * reads its table here instead of hard-coding a switch. */ import type { ProviderFinishReasonMap } from "../../types/index.js"; /** The named finish-reason table from a rules file; throws when it is missing. */ export declare function getFinishReasonMap(id: string, name: string): ProviderFinishReasonMap; /** Translate one finish reason through a table (see ProviderFinishReasonMap). */ export declare function translateFinishReason(table: ProviderFinishReasonMap, raw: string | null | undefined, hadToolCallsAtCap?: boolean): string | null;