20 lines
641 B
Python
20 lines
641 B
Python
"""LightRAG 集成占位。阶段 1 会在这里封装真正的查询与索引。"""
|
|
|
|
from app.config import settings
|
|
|
|
|
|
class LightRAGService:
|
|
def __init__(self) -> None:
|
|
self.collection = settings.lightrag_collection
|
|
|
|
async def queue_index(self, document_id: str, raw_text: str) -> None:
|
|
"""预留方法:后续调用 LightRAG.update_index。"""
|
|
return None
|
|
|
|
async def query(self, query_text: str, user_id: str) -> str:
|
|
"""预留方法:后续调用 LightRAG.query,当前返回占位回答。"""
|
|
return f"[mock] {query_text}"
|
|
|
|
|
|
lightrag_service = LightRAGService()
|