ReadonlycountReadonlydimEmbedding dimension.
ReadonlymodelModel identifier passed to the embedder.
ReadonlynamespaceCorpus namespace this instance was opened with.
ReadonlystoreActive backing-store mode ("memory" | "opfs" | "indexeddb").
Release all resources held by this instance. Resolves on success; rejects with TRAGarError("InstanceClosed") if already closed.
Ingest one document: chunk → embed → store. Resolves when all chunks are stored; rejects with TRAGarError("InstanceClosed") if closed.
Query the corpus for the top-k most relevant chunks. Returns an empty array when no chunks have been ingested. Rejects with TRAGarError("InstanceClosed") if closed.
Optionalopts: QueryOptionsStream the top-k hits as an async iterator, yielding in descending score order. Safe to abandon with break or an exception — resources are released when the iterator protocol's return() method is called. Throws TRAGarError("InstanceClosed") on first iteration if closed.
Optionalopts: QueryOptionsReturn a summary of the current corpus state. Rejects with TRAGarError("InstanceClosed") if closed.
Number of chunks currently stored. Updated after each ingest() call.