Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hotfix-#163] Fix asynchronous problem #168

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading