Skip to content

Commit

Permalink
[hotfix-#163] Fix asynchronous problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Dormiveglia-elf committed Oct 29, 2024
1 parent ea5e63e commit 4761a73
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/lightrag_openai_compatible_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,33 +69,33 @@ async def main():
)

with open("./book.txt", "r", encoding="utf-8") as f:
rag.insert(f.read())
await rag.ainsert(f.read())

# Perform naive search
print(
rag.query(
await rag.aquery(
"What are the top themes in this story?", param=QueryParam(mode="naive")
)
)

# Perform local search
print(
rag.query(
await rag.aquery(
"What are the top themes in this story?", param=QueryParam(mode="local")
)
)

# Perform global search
print(
rag.query(
await rag.aquery(
"What are the top themes in this story?",
param=QueryParam(mode="global"),
)
)

# Perform hybrid search
print(
rag.query(
await rag.aquery(
"What are the top themes in this story?",
param=QueryParam(mode="hybrid"),
)
Expand Down

0 comments on commit 4761a73

Please sign in to comment.