BabyAGI OPENAI API key issue

Hello everyone! I am trying to use OPENAI API for the first time with Babyagi. I set up the OPENAI API key as an environment variable as instructed, but I keep getting this error message when I run Babyagi:

Message: Execution failed. Error: litellm.NotFoundError: OpenAIException - Error code: 404 - {‘error’: {‘message’: ‘The model gpt-4-turbo does not exist or you do not have access to it.’, ‘type’: ‘invalid_request_error’, ‘param’: None, ‘code’: ‘model_not_found’}}
Params: {“prompt”:“Provide a concise and clear description for the following Python function:\n\ndef integrated_function():\n return "Hello from integrated function!"\n\nDescription:”}
Output: null

Has anyone run into the same error?

Much appreciated for any thoughts!

It seems like BabyAGI is attempting to use a GPT-4 model (named “gpt-4-turbo”) but your account doesn’t have access to that model. Try switching the model to something you do have access to, perhaps "gpt-3.5-turbo".

The GitHub repo for babyagi would be the best place to start. There’s already an open issue for the same.

2 Likes

Thank you for the tip! I am able to solve it by adding funds to my OpenAI account lol…

1 Like