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

10 lines (9 loc) • 474 B
/** * @description Builds the id that pairs one tool call's `tool:start` and `tool:end` events. * @param toolName {string} - Name of the tool being run. * @param startTime {number} - When the call started, in epoch milliseconds. * @returns {string} `<toolName>-<startTime>-<nine random base-36 characters>`. */ export function createToolExecutionId(toolName, startTime = Date.now()) { return `${toolName}-${startTime}-${Math.random().toString(36).slice(2, 11)}`; }