Find answers from the community

Updated 2 months ago

Hello. The following codes give me the

Hello. The following codes give me the answer
Plain Text
query_engine = vector_index.as_query_engine(llm=llm)
response = query_engine.query(
    "What does the author do to live?"
)
print(response)

But when I run these codes:
Plain Text
evaluator = FaithfulnessEvaluator(llm=llm)
eval_result = evaluator.evaluate_response(response=response)
print(str(eval_result.passing))

I am getting errors idk why. These are taken directly from the doc by the way.
Error:
Plain Text
RuntimeError: asyncio.run() cannot be called from a running event loop
L
m
3 comments
The doc probably had

Plain Text
import nest_asyncio
nest_asyncio.apply()


At the top
actually, there is no import part in the doc
Add a reply
Sign up and join the conversation on Discord