Skip to content

why await no support from demo #1939

Open
@landhu

Description

@landhu

[ ] 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:

Image

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmodule-metricsthis is part of metrics module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions