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

51 lines (50 loc) • 1.55 kB
import type { CommandModule } from "yargs"; export declare class OllamaCommandFactory { /** * Secure wrapper around spawnSync to prevent command injection. */ private static safeSpawn; /** * Create the Ollama command group */ /** * Every handler is registered `.bind(this)`. * * yargs invokes the handler as a plain function, so a bare `this.xHandler` * reference arrives with `this` unset and the first `this.safeSpawn(...)` * throws `TypeError: this.safeSpawn is not a function`. That made EVERY * subcommand here fail on its first line — list-models, pull, remove, status * and stop all reported their generic "Failed to ..." message regardless of * whether Ollama was installed or running, which is exactly why the real * cause stayed hidden. */ static createOllamaCommands(): CommandModule; /** * Handler for listing installed models */ private static listModelsHandler; /** * Handler for pulling/downloading models */ private static pullModelHandler; /** * Handler for removing models */ private static removeModelHandler; /** * Handler for checking Ollama service status */ private static statusHandler; /** * Handler for starting Ollama service */ private static startHandler; /** * Handler for stopping Ollama service */ private static stopHandler; /** * Handler for interactive Ollama setup */ private static setupHandler; }