Fix linting errors
This commit is contained in:
@@ -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())
|
||||||
|
Reference in New Issue
Block a user