RAG数据库生成

This commit is contained in:
2026-04-19 15:01:40 +08:00
parent c18e8a9860
commit cc8ef41ef9
17 changed files with 1089 additions and 577 deletions

View File

@@ -0,0 +1,31 @@
"""
文档存储模块 - 用于 ParentDocumentRetriever 的父文档存储。
提供 PostgreSQL 存储后端:
- PostgresDocStore: PostgreSQL 数据库存储(生产环境)
示例用法:
>>> from rag_indexer.store import create_docstore
>>> # 创建 PostgreSQL 存储
>>> store, conn = create_docstore(
... connection_string="postgresql://user:pass@host:5432/db",
... table_name="parent_docs"
... )
"""
from .postgres import PostgresDocStore
from .factory import create_docstore, get_docstore_uri, DEFAULT_DB_URI
__version__ = "2.0.0"
__all__ = [
# 具体实现
"PostgresDocStore",
# 工厂函数
"create_docstore",
"get_docstore_uri",
"DEFAULT_DB_URI",
]