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

16 lines (15 loc) • 564 B
import { toolSchemaOf } from "../rules/requestFields.js"; function isAnthropicTool(declaration) { return (typeof declaration.name === "string" && toolSchemaOf("anthropic", declaration) !== undefined); } /** * A tool declaration from `toolDeclaration("anthropic", …)` as the SDK's * tool type, checked: it must carry a name and a schema object. */ export function asAnthropicTool(declaration) { if (!isAnthropicTool(declaration)) { throw new Error("Anthropic tool declaration has no name or no schema"); } return declaration; }