Lesson 4: what is the OpenAI-BaseURL?

In lesson 4, the code calls for an environmental variable called
“X-OpenAI-BaseURL”: os.environ[‘OPENAI_API_BASE’]

Within the course on the DeepLearning page, the value is:

http://jupyter-api-proxy.internal.dlai/rev-proxy/for_weaviate

but I am attempting to run this locally and would need to know the “outside” address.

Any ideas?

I think you have to get that from OpenAI.

1 Like

well, it’s not like my api-key which is personal to me and i do have to get that from OpenAi, but the BaseURL should be public knowledge and the same for eveyone taking this course. I just don’t know what that “public knowledge” fact is.

the answer to this question appears to be: https://api.openai.com

although i am far from 100% sure of that, it does get me pretty far through the lesson 4 notebook and the remaining issues do not seem to be related to this question. :slight_smile:

3 Likes

Little late to the party. For people who are trying to replicate the code in your local machine or any platform other than the Jupyter instance assigned by Coursera, it’s better to use the public API endpoint and to generate and use your own API key - these may change from time to time, but should be easily accessible on the respective websites (could be OpenAI, unstructured, langchain, etc.). It’s very easy to find the API endpoint and key used on Coursera, but do not use those.