Just finished watching the crewAI course. I am totally new to programming and would love some help with running this on my own laptop.
I cannot get past this stage (below) as the error message says TypeError: str expected, not NoneType. Does this mean I need to key in my own OpenAI API key?
openai_api_key = get_openai_api_key()
os.environ[“OPENAI_MODEL_NAME”] = ‘gpt-3.5-turbo’
os.environ[“SERPER_API_KEY”] = get_serper_api_key()
If so, how do I do that? Do I just past the key here: get_openai_api_key(here)? And the does the basic account suffice? I tried putting my key in but it ran out of limits immediately.
At the start of the notebook, there are the library names which you need to install first.
Next, you need an OpenAI API/credits. I doubt a very basic package would be enough for this course, as you may have seen in the course, there’s a lot of back and forth communication which agents do, so “few” credits would run out fast.
You also need Serper API. Fortunately, it offers 2500 free credits to begin with, which are more than enough for you to play with the notebooks.
As for your (1) question, the API keys are passed in a “secretive” manner, you don’t need to do that when running locally. You can replace that code with more straight forward code of passing the API keys.
Another hot tip: for security purposes, don’t put the actual API keys in the code when you are ready.
Set them up as environment variables. Thankfully, in the code this is actually already partly set up. The other thing to do is to set up the environment variables in your local system.
Try searching ‘Edit System Environment Variable’ in your search bar (in Windows). If it’s not there you can find it this way:
Control Panel (in Windows, and you can search in the search bar for it) → System and Security → System → Advanced System Settings → Environment Variables
Once there, in the System variables section, enter the name (eg. OPEN_AI_KEY) as the Variable and the key itself (eg. y0u11neverfind0utmyc0de!11) as the Value.
I’ve already seen a friend get his API key hacked recently and it hit his monthly limit in a day by whoever managed to get it, so I think this is a good practice!
I am also struggling with how to run the crew shown in the course on my VS code on my macbook. I see that only one file has been created.
I want to install all this on a virtu environment on my laptop and create the files for main, agents, tasks etc and run it my laptop. Can someone help