Example

// Initialize LlamaCppEmbeddings with the path to the model file
const embeddings = new LlamaCppEmbeddings({
modelPath: "/Replace/with/path/to/your/model/gguf-llama2-q4_0.bin",
});

// Embed a query string using the Llama embeddings
const res = embeddings.embedQuery("Hello Llama!");

// Output the resulting embeddings
console.log(res);

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

caller: AsyncCaller

The async caller should be used by subclasses to make any async calls, which will thus benefit from the concurrency and retry logic.

Methods

Generated using TypeDoc