Embedding constructor
Embedding(})
Implementation
factory Embedding(
String path, {
int? nThread,
int? nThreadBatch,
int? nCtx,
int? nBatch,
int? nGpuLayers,
bool verbose = false,
}) {
final cStr = NativeString();
path.into(cStr);
final (model, ctx) = c.loadModel(
cStr,
LlamaParams(
nThread: nThread,
nThreadBatch: nThreadBatch,
nCtx: nCtx,
nBatch: nBatch,
nGpuLayers: nGpuLayers,
embedding: true,
),
);
return Embedding._(
model,
ctx,
cStr,
verbose,
);
}