Find answers from the community

Updated 6 months ago

Hello

At a glance

A community member is trying to use the HybridFusionRetrieverPack but is encountering a RuntimeError: asyncio.run() cannot be called from a running event loop. The community member has provided a small piece of code to reproduce the error. Another community member has suggested trying a link, but there is no explicitly marked answer.

Useful resources
Hello
i'm trying to use the pack called HybridFusionRetrieverPack but i'm getting this error RuntimeError: asyncio.run() cannot be called from a running event loop
Did someone succeeded at making it work ? Bellow is a small piece of code to reproduce the error.


Plain Text
from llama_index import SimpleDirectoryReader
from llama_index.node_parser import SimpleNodeParser

# load in some sample data
reader = SimpleDirectoryReader(input_files=["paul_graham_essay.txt"])
documents = reader.load_data()

# parse nodes
node_parser = SimpleNodeParser.from_defaults()
nodes_test = node_parser.get_nodes_from_documents(documents)

hybrid_fusion_pack_test = HybridFusionRetrieverPack(
    nodes, chunk_size=256, vector_similarity_top_k=2, bm25_similarity_top_k=2
)

response = hybrid_fusion_pack.run("What did the author do during his time in YC?")



--> RuntimeError: asyncio.run() cannot be called from a running event loop

Thank you πŸ™‚
Add a reply
Sign up and join the conversation on Discord