Skip to content

LLamaEmbedder

Namespace: LLama

The embedder for LLama, which supports getting embeddings from text.

public class LLamaEmbedder : System.IDisposable

Inheritance ObjectLLamaEmbedder
Implements IDisposable

Constructors

LLamaEmbedder(ModelParams)

public LLamaEmbedder(ModelParams params)

Parameters

params ModelParams

Methods

GetEmbeddings(String, Int32, Boolean, String)

Get the embeddings of the text.

public Single[] GetEmbeddings(string text, int threads, bool addBos, string encoding)

Parameters

text String

threads Int32
Threads used for inference.

addBos Boolean
Add bos to the text.

encoding String

Returns

Single[]

Exceptions

RuntimeError

Dispose()

public void Dispose()