UNPKG

hnswsqlite

Version:

Vector search with HNSWlib and SQLite in TypeScript.

19 lines (15 loc) 547 B
// Stub for HuggingFace embedding plugin // To use: install axios and set HF_TOKEN in env import axios from 'axios'; export class HuggingFaceEmbeddingGenerator { private model: string; private token: string; constructor(token: string, model: string = 'sentence-transformers/all-MiniLM-L6-v2') { this.token = token; this.model = model; } async embed(text: string): Promise<number[]> { // Replace with real HuggingFace API call throw new Error('Not implemented: Use HuggingFace Inference API to get embeddings.'); } }