AsyncVectorStore

org.llm4s.vectorstore.AsyncVectorStore
See theAsyncVectorStore companion object

Asynchronous, non-blocking vector storage abstraction for high-throughput RAG.

This mitigates thread-exhaustion vulnerabilities found in the synchronous VectorStore by wrapping operations in AsyncResult (Futures) executed on a dedicated blocking context.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def clear()(implicit ec: ExecutionContext): AsyncResult[Unit]
def close(): Unit
def count(filter: Option[MetadataFilter])(implicit ec: ExecutionContext): AsyncResult[Long]
def delete(id: String)(implicit ec: ExecutionContext): AsyncResult[Unit]
def deleteBatch(ids: Seq[String])(implicit ec: ExecutionContext): AsyncResult[Unit]
def deleteByFilter(filter: MetadataFilter)(implicit ec: ExecutionContext): AsyncResult[Long]
def deleteByPrefix(prefix: String)(implicit ec: ExecutionContext): AsyncResult[Long]
def get(id: String)(implicit ec: ExecutionContext): AsyncResult[Option[VectorRecord]]
def getBatch(ids: Seq[String])(implicit ec: ExecutionContext): AsyncResult[Seq[VectorRecord]]
def list(limit: Int, offset: Int, filter: Option[MetadataFilter])(implicit ec: ExecutionContext): AsyncResult[Seq[VectorRecord]]
def search(queryVector: Array[Float], topK: Int, filter: Option[MetadataFilter])(implicit ec: ExecutionContext): AsyncResult[Seq[ScoredRecord]]
def stats()(implicit ec: ExecutionContext): AsyncResult[VectorStoreStats]
def upsert(record: VectorRecord)(implicit ec: ExecutionContext): AsyncResult[Unit]
def upsertBatch(records: Seq[VectorRecord])(implicit ec: ExecutionContext): AsyncResult[Unit]