why await no support from demo
[ ] I have checked the documentation and related resources and couldn't resolve my bug.
Describe the bug run demo in https://docs.ragas.io/en/latest/getstarted/evals/#evaluating-using-a-llm-based-metric
Ragas version: Python version: 3.10 Ragas Version: ragas 0.2.13
Code to Reproduce same as demo
Error trace File "D:\PyInvo\ragas_demo.py", line 271 await metric.single_turn_ascore(SingleTurnSample(**test_data)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: 'await' outside function
And in my pycharm, also have error:
Expected behavior A clear and concise description of what you expected to happen.
Additional context Add any other context about the problem here.
Hi @landhu,
I tried reproducing the error with the same Python and Ragas versions, but I wasn't able to replicate the issue. Could you please share the full error trace or any additional context that might help identify the root cause?
The code needs to be in inside aasync def function. See this pull request for an example https://github.com/explodinggradients/ragas/pull/1983
thanks again @yesidc for raising this - we are closing this now