Skip to content

Commit 97225eb

Browse files
committed
Fixed typos
1 parent d91b2af commit 97225eb

File tree

38 files changed

+119
-620
lines changed

38 files changed

+119
-620
lines changed

00-course-setup/SETUP.md

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Setup Your Dev Environment
22

3-
We have instrumented this repository with a _dev container_ that comes with a Python 3 runtime. Simply open the repo in GitHub Codespaces or on your local Docker Desktop, to activate the runtime automatically. Then open th Jupyter notebook and select the Python 3.x kernel to prepare the Notebook for execution.
3+
We have setup this repository and course with a _dev container_ that comes with a Python 3 runtime. Open the repo in GitHub Codespaces or on your local Docker Desktop, to activate the runtime automatically. Then open th Jupyter notebook and select the Python 3.x kernel to prepare the Notebook for execution.
44

55
## 1. Create `.env` file
66

@@ -10,18 +10,20 @@ To configure this, we need to setup local environment variables for Azure as fol
1010

1111
1. Look in the root folder for a `.env.copy` file. It should contain a list of name-value pairs like this:
1212

13-
```bash
14-
AZURE_OPENAI_ENDPOINT='<add your endpoint here>'
15-
AZURE_OPENAI_DEPLOYMENT='<add your deployment name here>'
16-
AZURE_OPENAI_KEY='<add your key here>'
17-
AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT='<add your deployment name here>'
18-
```
13+
```bash
14+
AZURE_OPENAI_ENDPOINT='<add your endpoint here>'
15+
AZURE_OPENAI_DEPLOYMENT='<add your deployment name here>'
16+
AZURE_OPENAI_KEY='<add your key here>'
17+
AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT='<add your deployment name here>'
18+
```
1919

2020
2. Make a copy of that file called `.env` using a command like this at the terminal:
21-
```bash
22-
cp .env.copy .env
23-
```
24-
This should create an identical copy _except that this file is .gitignore-d and will never get checked into source control_. We can now populate **this .env file** with the environment variable values (secrets) without fear of them being checked in accidentally. You can now move to the next section to start populating these variables.
21+
22+
```bash
23+
cp .env.copy .env
24+
```
25+
26+
This should create an identical copy _except that this file is .gitignore-d and will never get checked into source control_. We can now populate **this .env file** with the environment variable values (secrets) without fear of them being checked in accidentally. You can now move to the next section to start populating these variables.
2527

2628
3. (Option) If you use GitHub Codespaces, you have the option to save environment variables as _Codespaces secrets_ associated with this repository. In that case, you won't need to setup a local .env file. **However, note that this option works only if you use GitHub Codespaces.** You will still need to setup the .env file if you use Docker Desktop instead.
2729

@@ -31,35 +33,35 @@ The above steps should be executed also if you are using the non-Azure OpenAI en
3133
OPENAI_API_KEY='<add your OpenAI key here>'
3234
```
3335

34-
3536
## 2. Populate `.env` file
3637

3738
Let's take a quick look at the variable names to understand what they represent:
3839

39-
| Variable | Description |
40-
|:---|:---|
41-
|AZURE_OPENAI_ENDPOINT| This is the deployed endpoint for an Azure OpenAI resource|
42-
|AZURE_OPENAI_KEY | This is the authorization key for using that service |
43-
|OPENAI_API_KEY | This is the authorization key for using the service for non-Azure OpenAI endpoints |
44-
|AZURE_OPENAI_DEPLOYMENT| This is the _text generation_ model deployment endpoint |
45-
|AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT | This is the _text embeddings_ model deployment endpoint |
46-
| | |
40+
| Variable | Description |
41+
| :--------------------------------- | :--------------------------------------------------------------------------------- |
42+
| AZURE_OPENAI_ENDPOINT | This is the deployed endpoint for an Azure OpenAI resource |
43+
| AZURE_OPENAI_KEY | This is the authorization key for using that service |
44+
| OPENAI_API_KEY | This is the authorization key for using the service for non-Azure OpenAI endpoints |
45+
| AZURE_OPENAI_DEPLOYMENT | This is the _text generation_ model deployment endpoint |
46+
| AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT | This is the _text embeddings_ model deployment endpoint |
47+
| | |
4748

4849
For context, the last two variables refer to specific models that are used in chat completion (text generation model) and vector search (embeddings model) activities that are frequently used in generative AI applications. In the following sections, we'll locate the _values_ for these variables and set them in `.env` (replacing the content within the `' '`, but preserving the quotes).
4950

5051
### 2.1 Use Azure Portal
5152

5253
The Azure OpenAI endpoint and key values will be found in the [Azure Portal](https://portal.azure.com?WT.mc_id=academic-105485-koreyst) so let's start there.
5354

54-
1. Navigate to the [Azure Portal](https://portal.azure.com?WT.mc_id=academic-105485-koreyst)
55+
1. Go to the [Azure Portal](https://portal.azure.com?WT.mc_id=academic-105485-koreyst)
5556
1. Click the **Keys and Endpoint** option in the sidebar (menu at left).
5657
1. Click **Show Keys** - you should see the following: KEY 1, KEY 2 and Endpoint.
5758
1. Use the KEY 1 value for AZURE_OPENAI_KEY
5859
1. Use the Endpoint value for AZURE_OPENAI_ENDPOINT
5960

6061
Next, we need the endpoints for the specific models we've deployed.
62+
6163
1. Click the **Model deployments** option in the sidebar (left menu) for Azure OpenAI resource.
62-
1. In the destination page, click **Manage Deployments**
64+
1. In the destination page, click **Manage Deployments**
6365

6466
This will take you to the Azure OpenAI Studio website, where we'll find the other values as described below.
6567

@@ -74,11 +76,12 @@ This will take you to the Azure OpenAI Studio website, where we'll find the othe
7476
Now update the environment variables to reflect the _Deployment name_ used. This will typically be the same as the model name unless you changed it explcitly. So, as an example, you might have:
7577

7678
```bash
77-
AZURE_OPENAI_DEPLOYMENT='gpt-35-turbo'
79+
AZURE_OPENAI_DEPLOYMENT='gpt-35-turbo'
7880
AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT='text-embedding-ada-002'
7981
```
8082

8183
**Don't forget to save the .env file when done**. You can now exit the file and return to the instructions for running the notebook.
8284

8385
### 2.3 Use OpenAI Public API
84-
Your OpenAI API key can be found in your [OpenAI account](https://platform.openai.com/api-keys?WT.mc_id=academic-105485-koreyst). If you don't have one, you can sign up for an account and create an API key. Once you have the key, you can use it to populate the `OPENAI_API_KEY` variable in the `.env` file.
86+
87+
Your OpenAI API key can be found in your [OpenAI account](https://platform.openai.com/api-keys?WT.mc_id=academic-105485-koreyst). If you don't have one, you can sign up for an account and create an API key. Once you have the key, you can use it to populate the `OPENAI_API_KEY` variable in the `.env` file.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)