-
Notifications
You must be signed in to change notification settings - Fork 34.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First code example does not work with Azure OpenAI #223
Comments
👋 Thanks for contributing @johnbatty! We will review the issue and get back to you soon. |
Fyi, I did get the given code to work in the end by defining the following environment variables:
This took quite a bit of trial and error. I'm also dubious that the I also tried modifying the code to use the Azure OpenAI variation, but have failed to get that to work (so far...). |
I believe this is by design but @nitya please review to see if we can clear this up or also add Azure Open AI support for this lesson to avoid confusion |
Related, the first lesson instructs the user to save their API key as a codespaces secret, but this lesson doesn't tell how to retrieve the secret in the .env file. Would have saved some time to know it's: OPENAI_API_KEY=${SECRET_NAME} |
It looks like this has been resolved via another PR: #188 |
Describe the bug
The introduction states that the code examples will use Azure OpenAI.
However the very first code example Exercise 2: OpenAI API Key Setup uses the (non-Azure) OpenAI API directly, which doesn't work for an Azure OpenAI deployment.
To Reproduce
Run Exercise 2: OpenAI API Key Setup using an Azure OpenAI endpoint URL/key - it fails with an exception.
Expected behavior
The example to work with Azure OpenAI.
I expect that this needs:
The text was updated successfully, but these errors were encountered: