All connectors
LLM providers

Hugging Face

HF Inference wrapper.

Wraps @huggingface/inference. Covers hosted models on HF Inference plus self-hosted TGI / TEI endpoints.

Install

pnpm add @blackunicorn/bonklm-huggingface

Minimal example

import { HfInference } from '@huggingface/inference'
import { wrapHuggingFace } from '@blackunicorn/bonklm-huggingface'

const hf = wrapHuggingFace(new HfInference(TOKEN), {
  validators: ['prompt-injection'],
})
Related connectors