@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
17 lines (16 loc) • 1.04 kB
TypeScript
/**
* Tool-choice spelling and tool-name rules, driven by the `toolChoices` and
* `toolNames` blocks in `src/lib/providers/rules/<id>.json`.
*/
import type { ProviderCompiledToolNameRules, ProviderToolChoiceMap, ProviderToolNameRules } from "../../types/index.js";
/** The named tool-choice table from a rules file; throws when it is missing. */
export declare function getToolChoiceMap(id: string, name: string): ProviderToolChoiceMap;
/**
* Spell a tool choice for one wire (see ProviderToolChoiceMap). `toWireName`
* maps a registered tool name onto the name the wire knows it by. Returns
* undefined when nothing should be sent.
*/
export declare function translateToolChoice(table: ProviderToolChoiceMap, choice: unknown, toWireName?: (toolName: string) => string): unknown;
/** A provider's tool-name rules; throws when its rules file has none. */
export declare function getToolNameRules(id: string): ProviderToolNameRules;
export declare function compileToolNameRules(rules: ProviderToolNameRules): ProviderCompiledToolNameRules;