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

20 lines (19 loc) • 950 B
/** * CLI helper: parse --classifier-* flags into a ClassifierRouterConfig. * * Side-effect-free so it can be unit-tested without a running NeuroLink * instance. Mirrors the `--tool-routing-*` flag parser. */ import type { CliClassifierRouterFlags, ClassifierRouterConfig } from "../../types/index.js"; /** * Build a {@link ClassifierRouterConfig} from the parsed CLI flags. * * Returns `undefined` when `--classifier-router` is absent or false, so callers * can skip the setter entirely with a simple truthiness check. * * `--classifier-pool` is parsed permissively: * - If the value is an existing file path, the file is read and JSON-parsed. * - Otherwise the value is treated as an inline JSON string. * - On any parse error a warning is logged and the pool is left empty. */ export declare function buildClassifierRouterConfigFromCli(flags: CliClassifierRouterFlags & Record<string, unknown>): ClassifierRouterConfig | undefined;