Embedding class final

Embedding runs in current isolate. Place it in another isolate if you want async embeddings.

Constructors

Embedding(String path, {int? nThread, int? nThreadBatch, int? nCtx, int? nBatch, int? nGpuLayers, bool verbose = false})
factory

Properties

cStr → CharArray
final
ctx → Pointer<llama_context>
final
hashCode → int
The hash code for this object.
no setterinherited
model → Pointer<llama_model>
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tokenBuf → TokenArray
final
verbose → bool
final

Methods

dispose() → void
Free context, model and memory objects in C world.
embedBatch(List<String> prompts) → List<List<double>>
Embedding multiple prompts at one time.
embedSingle(String prompt) → List<double>
Embedding one prompt at one time.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited