Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot launch CLI example: SyntaxError: 'async with' outside async function #134

Open
wenjie-lu opened this issue May 15, 2024 · 5 comments

Comments

@wenjie-lu
Copy link

I did a clean installation of the repo following the instruction provided. However, when I ran the first CLI example, agentverse-simulation --task simulation/nlp_classroom_9players, I got the following error:

  File "/Users/x/code/AgentVerse/agentverse_command/main_simulation_cli.py", line 5, in <module>
    from agentverse.logging import logger
  File "/Users/x/code/AgentVerse/agentverse/__init__.py", line 1, in <module>
    from .output_parser import output_parser_registry
  File "/Users/x/code/AgentVerse/agentverse/output_parser/__init__.py", line 5, in <module>
    from .output_parser import *
  File "/Users/x/code/AgentVerse/agentverse/output_parser/output_parser.py", line 12, in <module>
    from agentverse.llms import LLMResult
  File "/Users/x/code/AgentVerse/agentverse/llms/__init__.py", line 41, in <module>
    from .openai import OpenAIChat
  File "/Users/x/code/AgentVerse/agentverse/llms/openai.py", line 235
    async with async_openai_client:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: 'async with' outside async function

OS: MacOS
Python version: 3.10.14

@1ngram24
Copy link

same problem ,hot to solve this ?

@Lucas-TY
Copy link

just created a temp patch for this issue

@641217688tly
Copy link

刚刚为这个问题创建了一个临时补丁

it works, thank you so much!

@dslwz2008
Copy link

I still have this problem.
OS: Win10, Python version: 3.10.14
How to solve this problem?

@1ngram24
Copy link

1ngram24 commented Sep 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants