|
|
|
@ -40,7 +40,7 @@ os.environ["POSTGRES_PASSWORD"] = "postgres"
|
|
|
|
|
os.environ["POSTGRES_DATABASE"] = "rag"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async def initialize_rag():
|
|
|
|
|
async def initialize_pg_rag():
|
|
|
|
|
rag = LightRAG(
|
|
|
|
|
working_dir=WORKING_DIR,
|
|
|
|
|
llm_model_func=llm_model_func,
|
|
|
|
@ -67,7 +67,7 @@ async def initialize_rag():
|
|
|
|
|
|
|
|
|
|
async def main():
|
|
|
|
|
try:
|
|
|
|
|
rag = await initialize_rag()
|
|
|
|
|
rag = await initialize_pg_rag()
|
|
|
|
|
resp = await rag.aquery(
|
|
|
|
|
"What are the top themes in this story",
|
|
|
|
|
param=QueryParam(mode="hybrid", stream=True),
|
|
|
|
|