Skip to content

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

@wenjie-lu

Description

@wenjie-lu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions