Skip to content

Getting issue in OpenAI key #8

@hasnainhakim

Description

@hasnainhakim

Getting Below error

I have added the apikey to env file, change the name from .env.example to .env still same error

C:\Users\hhakim\Desktop\Hasnain_Personal\jobber-main>python -u -m jobber_fsm
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Users\Desktop\jobber-main\jobber_fsm_main
.py", line 21, in
asyncio.run(main())
File "C:\Users\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run
return self.loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\Desktop\jobber-main\jobber_fsm_main
.py", line 12, in main
State.PLAN: PlannerAgent(),
^^^^^^^^^^^^^^
File "C:\Users\Desktop\jobber-main\jobber_fsm\core\agent\planner_agent.py", line 15, in init
super().init(
File "C:\Users\Desktop\jobber-main\jobber_fsm\core\agent\base.py", line 41, in init
self.client = wrap_openai(openai.Client())
^^^^^^^^^^^^^^^
File "C:\Users\hhakim\AppData\Local\Programs\Python\Python311\Lib\site-packages\openai_client.py", line 105, 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions