You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-3Lines changed: 24 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,15 +122,36 @@ A related option is VS Code Dev Containers, which will open the project in your
122
122
123
123
## Running the Python examples
124
124
125
-
1. If you're not already running in a Codespace or Dev Container, create a Python virtual environment.
125
+
To run the samples, you'll either need to have already [deployed the Azure OpenAI account](#deployment) or use GitHub models.
126
126
127
-
2. Install the requirements:
127
+
1. Check that the `.env` file exists in the root of the project. If you [deployed an Azure OpenAI account](#deployment), it should have been created for you, and look like this:
128
+
129
+
```shell
130
+
OPENAI_HOST=azure
131
+
AZURE_OPENAI_GPT_DEPLOYMENT=gpt-4o
132
+
AZURE_OPENAI_SERVICE=your-service-name
133
+
AZURE_TENANT_ID=your-tenant-id-1234
134
+
```
135
+
136
+
If you're using GitHub models, create a `.env` file with the following content:
137
+
138
+
```shell
139
+
OPENAI_HOST=github
140
+
GITHUB_TOKEN=
141
+
```
142
+
143
+
You can create a GitHub token by following the [GitHub documentation](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token),
144
+
or open this project inside GitHub Codespaces where the token is already exposed as an environment variable.
145
+
146
+
2. If you're not already running in a Codespace or Dev Container, create a Python virtual environment.
147
+
148
+
3. Install the requirements:
128
149
129
150
```shell
130
151
python -m pip install -r requirements.txt
131
152
```
132
153
133
-
3. Run an example by running either `python example_file.py` or selecting the `Run` button on the opened file. Available examples:
154
+
4. Run an example by running either `python example_file.py` or selecting the `Run` button on the opened file. Available examples:
0 commit comments