Multi AI Agent Systems with crewAI: local run problems

Please help me to resolve the problems described below:
It looks like I miss something in setup of the notebook “L2: Create Agents to Research and Write an Article” for running it at local computer.

It starts from:
You can download the requirements.txt for this course from the workspace of this lab. File --> Open...

Where may I find requirements.txt?

from utils import get_openai_api_key
I obtained the following error: ImportError: cannot import name ‘get_openai_api_key’ from ‘utils’ ([C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\]

openai_api_key = get_openai_api_key()
NameError: name ‘get_openai_api_key’ is not defined

Where may I find correct utils?

If I use my existing open api key instead:
openai_api_key = os.getenv(“OPENAI_API_KEY”)
It works but this variable is never passed to any place afterwards.

Afterwards I obtained an error at:
result = crew.kickoff(inputs={“topic”: “Artificial Intelligence”})
Error code: 429 - {‘error’: {‘message’: 'You exceeded your current quota, please check your plan and billing details.

My plan is active and I worked with it previously. Looks like I cannot connect LLM inside agents with my key.

You can refer the below link, to find solution.

Now it works! Indeed, after updating account and creating project key instead of user key, everything works as expected. Thanks a lot!

1 Like

Hi @at61,

Glad everything worked! You can download the files from your workspace. You can access your workspace by clicking File on the top left (or Menu if your Jupyter notebook window is small) in the Jupyter notebook and then click Open...


1 Like