Skip to content

Error configuring lovelaice for the first time #3

@varn0

Description

@varn0

Error when user runs lovelaice --config for the first time

╰─❯ lovelaice --config    
Traceback (most recent call last):
  File "/Users/cucostudio/.local/bin/lovelaice", line 7, in <module>
    sys.exit(cli.run())
             ^^^^^^^^^
  File "/Users/cucostudio/.local/pipx/venvs/lovelaice/lib/python3.12/site-packages/lovelaice/cli.py", line 54, in run
    llm = OpenAILLM(config.model, config.api_key, config.base_url)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/cucostudio/.local/pipx/venvs/lovelaice/lib/python3.12/site-packages/lovelaice/connectors.py", line 36, in __init__
    self.client = AsyncOpenAI(api_key=api_key, base_url=str(base_url))
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/cucostudio/.local/pipx/venvs/lovelaice/lib/python3.12/site-packages/openai/_client.py", line 488, in __init__
    raise OpenAIError(
openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable

╰─❯ sw_vers
ProductName:            macOS
ProductVersion:         15.4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions