Skip to content
Public template

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

sabaki logo

@sabaki-js/plugin-template

npm license CI

Starter template for a sabaki plugin.

Three patterns: definePlugin (ad-hoc), nanoClassifier (TF-IDF), miniClassifier (ONNX). Click Use this template.

Bundled mini weights (no download needed)

Ship ONNX weights inside the package so it works offline:

  1. Put the files in models/<workflow>-int8/ (<workflow>_int8.onnx, <workflow>_int8.onnx.data if any, <workflow>.json, model.json, tokenizer.json).
  2. Export the dir from src/index.ts:
    import path from "node:path";
    import { fileURLToPath } from "node:url";
    export const modelDir = path.join(
      path.dirname(fileURLToPath(import.meta.url)),
      "..", "models", "<workflow>-int8",
    );
  3. Add "models" to package.json files.
  4. Callers pass it explicitly: miniClassifier(manifest, wf, { modelDir }) (falls back to HF download when absent).

Publish

npm version patch && npm run publish-package  # tags v* -> CI publishes to npm

Part of sabaki - see the GUIDE.

License

MIT

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages