Who owns the OpenApi api key that has exceeded its rate limit

I’m kind of confused. I took the prompt engineering for developers course months ago. I’ve not touched the short courses since.

I just started taking LangChain: Chat with Your Data training yesterday. When I attempt to do the embeddings in the lesson Vectorstores and Embeddings, I’ve gotten the dreaded RateLimitError: exceeded quota for this month error.

So maybe I missed reading something, but doesn’t deeplearning.ai own that API key? It seems to be loading it from an env variable.

But even if I go to create a new api key from OpenAI, I still get the same error.

How do I complete the practical part of this lesson when neither my API key, nor (ostensibly) DLAI’s seem to work to do embeddings?

Hi @pchittum

I read some learners reporting this issue.

Let me tag @Mubsi in this discussion. Maybe he can help us on this.

I kindly ask for your patience. It might be necessary some investigation to determine the real cause of this issue.

Hi @pchittum,

I’ll DM you regarding this.

Thank you for your support, @Mubsi

I’m running into the same problem, although I seem to be able to use my own API key. How do I update the env variable so my own key gets pulled when running:

openai.api_key = ‘os.environ[‘OPENAI_API_KEY’]’

Right now I’m hard coding my API key in the notebook, which I prefer not to do.

Hi @johnnyo,

In order to run things on the platform, you’d need to hard-code it. But you can put that in the environment when you do things on your local system, as then it would be your environment. Right now, it is platform’s environment.

To learn how to make your own environment on your local system, you can use the “search” feature in the community to read threads on what others have shared, or you can just search on the internet.


When you say my environment, do you mean running the Notebook on my local computer?


@johnnyo Since you’re asking, I’m going to take a guess that you’re new or newish to Jupyter Notebooks and python. There are a set of “magic commands” you can use in python to access local machine APIs/command line commands. For instance you can use

> %set_env MY_ENV_VAR=env_variable_value

And if you’re using Jupyter Notebook locally, there’s some steps you can use to run it in a virtual environment which sets the environment variable in the virtual environment, but not in your global machine env variables. For this you can search for “venv Jupyter Notebook” or something like that. It’s super handy!

@pchittum Thanks, but not new to Jupyter Notebooks. Was hoping I can create a .env file and store my API keys there and load with something like python-dotenv when running on DeepLearning.ai. Having to hard code API keys inside the Notebook is new to me though :wink:.