Fix "A Simple Program" example in README.md

The example should use ainsert and aquery. Fixes #1723
This commit is contained in:
Ákos Lukács 2025-07-22 14:37:15 +02:00 committed by GitHub
parent 681d43bb32
commit f115661e16
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -218,12 +218,12 @@ async def main():
try:
# Initialize RAG instance
rag = await initialize_rag()
rag.insert("Your text")
await rag.ainsert("Your text")
# Perform hybrid search
mode = "hybrid"
print(
await rag.query(
await rag.aquery(
"What are the top themes in this story?",
param=QueryParam(mode=mode)
)