@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
25 lines (24 loc) • 685 B
JavaScript
/**
* Type definitions for NeuroLink tool system, including parameter schemas,
* argument patterns, execution metadata, context, and result types.
*/
/**
* Type guard for tool result
*/
export function isToolResult(value) {
return (typeof value === "object" &&
value !== null &&
"success" in value &&
typeof value.success === "boolean");
}
/**
* Type guard for tool definition
*/
export function isToolDefinition(value) {
return (typeof value === "object" &&
value !== null &&
"description" in value &&
"execute" in value &&
typeof value.description === "string" &&
typeof value.execute === "function");
}