AS AgentScopeAPI 手册 / API Reference

VDBStoreBase

public interface VDBStoreBase
源码Source io/agentscope/core/rag/store/VDBStoreBase.java:39–78

定义 VDB 存储基类契约的接口。位于 io.agentscope.core.rag.store 包。核心成员包括 add、search、delete。

Interface for vector database storage.

This interface provides a unified API for storing and searching vector embeddings. Implementations can use in-memory storage, Qdrant, ChromaDB, or other vector databases.

The store directly stores Document objects (including metadata/payload), not just vectors. This allows retrieval of complete documents with their metadata.

Key features:

  • Batch document addition for efficiency

  • Vector similarity search with optional score threshold

  • Document retrieval with embeddings and metadata

方法摘要Method Summary

方法Method说明Description
public Mono<Void> add(List<Document> documents)
设置添加。
Adds multiple documents to the store.
public Mono<List<Document>> search(SearchDocumentDto searchDocumentDto)
设置搜索。
Searches for similar documents.
public Mono<Boolean> delete(String id)
删除数据。
Deletes a document from the store (optional).

方法详情Method Detail

add

public Mono<Void> add(List<Document> documents)

设置添加。

Adds multiple documents to the store.

参数Parameters
名称Name类型Type说明Description
documentsList<Document>文档到存储(所有必须有向量设置)的列出。the list of documents to store (all must have embeddings set)
返回Returns Mono<Void>
返回Mono。a Mono that completes when all documents are stored
源码Source io/agentscope/core/rag/store/VDBStoreBase.java:53

delete

public Mono<Boolean> delete(String id)

删除数据。

Deletes a document from the store (optional).

参数Parameters
名称Name类型Type说明Description
idString标识(类型 `String`)。the document ID (UUID string) to delete
返回Returns Mono<Boolean>
返回Mono。a Mono that emits true if the deletion was successful, false otherwise
源码Source io/agentscope/core/rag/store/VDBStoreBase.java:77
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.