Find answers from the community

Updated 6 months ago

Asyncio

At a glance

The community member is encountering a RuntimeError when using asyncio.run() in Colab. Another community member suggests running import nest_asyncio and nest_asyncio.apply() at the top to resolve the issue. The second comment simply expresses gratitude.

In Colab I'm getting
RuntimeError: asyncio.run() cannot be called from a running event loop
for
response_str = response.response
for source_node in response.source_nodes:
eval_result = evaluator.evaluate(response=response_str, contexts=[source_node.get_content()])
print(str(eval_result.passing))
L
M
2 comments
Just have to run this at the top

Plain Text
import nest_asyncio
nest_asyncio.apply()
Thank you very much.
Add a reply
Sign up and join the conversation on Discord