Revision history for HuggingFace::API

0.2.1  2026-04-29T23:44:09+01:00
    - Bump Github actions to use node 24+
    - New: get-chat-template($model-id, :$revision) — fetch a
      model's Jinja chat template, trying chat_template.jinja
      first and falling back to extracting chat_template from
      tokenizer_config.json. Modern HF uploads ship the template
      as a standalone .jinja file; older repos embed it as a
      string in the config. Returns Str (undefined) when the
      model has neither source.
    - New: get-chat-template-to-file($model-id, $output, :$revision)
      — variant that writes the resolved template to disk. Returns
      the output path on success or IO::Path (undefined) when no
      template was found, leaving the target untouched.
    - New: extract-chat-template-from-config($json) — exported sub
      that parses a tokenizer_config.json payload and returns the
      template string. Handles both the bare-string form and the
      list-of-{name, template} form (Cohere Command A and similar
      multi-template repos). Selects the entry named "default"
      when present, falling back to the first list entry.

0.2.0  2026-04-24T06:05:51+01:00
    - New: get-file($model-id, $filename, :$revision) — download
      any file from a HuggingFace repo as text. Generalises the
      existing tokenizer-only downloads to arbitrary filenames.
    - New: get-file-blob($model-id, $filename, :$revision) —
      binary-safe variant that returns a Blob. Required for
      anything that isn't UTF-8 text (ONNX weights, safetensors,
      tarballs); text decode corrupts non-UTF8 bytes.
    - New: get-file-to-file($model-id, $filename, $output,
      :$revision) — streams the file to disk, binary-safe. Used
      by LLM::Classifiers::Emotions's Build.rakumod to fetch the
      pinned go-emotions model files at install time.
    - Existing get-tokenizer / get-tokenizer-to-file /
      get-tokenizer-config / get-tokenizer-config-to-file now
      accept a :$revision parameter (default 'main' for
      back-compat). Consumers that want a reproducible install
      should pin a specific commit SHA — matters when models
      get updated and you want deterministic behaviour across
      installs.
    - All signatures add optional parameters with safe defaults;
      0.1.x callers (App-Kelpie, App-Cantina) work unchanged.
    - Version bump to 0.2.0 — new methods, no removals, no
      behaviour changes to existing ones.

0.1.1  2026-04-09T05:16:31+01:00
    - get-tokenizer-config: download tokenizer_config.json for a model
    - get-tokenizer-config-to-file: download tokenizer_config.json to a file

0.1.0  2026-04-08T01:08:13+01:00
    - Initial release
    - search: search HuggingFace models by prefix
    - get-tokenizer: download tokenizer.json for a model
