Fix linting errors

This commit is contained in:
Gurjot Singh
2025-01-16 11:31:22 +05:30
parent e64805c9e2
commit 2ea104d738
2 changed files with 6 additions and 4 deletions

View File

@@ -95,6 +95,7 @@ book2 = open("./book_2.txt", encoding="utf-8")
rag.insert([book1.read(), book2.read()]) rag.insert([book1.read(), book2.read()])
# Example function demonstrating the new query_with_separate_keyword_extraction usage # Example function demonstrating the new query_with_separate_keyword_extraction usage
async def run_example(): async def run_example():
query = "What are the top themes in this story?" query = "What are the top themes in this story?"
@@ -104,11 +105,12 @@ async def run_example():
response = rag.query_with_separate_keyword_extraction( response = rag.query_with_separate_keyword_extraction(
query=query, query=query,
prompt=prompt, prompt=prompt,
param=QueryParam(mode="hybrid") # Adjust QueryParam mode as necessary param=QueryParam(mode="hybrid"), # Adjust QueryParam mode as necessary
) )
print("Extracted Response:", response) print("Extracted Response:", response)
# Run the example asynchronously # Run the example asynchronously
if __name__ == "__main__": if __name__ == "__main__":
asyncio.run(run_example()) asyncio.run(run_example())