Skip to content

Commit 4a465ee

Browse files
Move the quickstart back to the single folder structure
1 parent 4d2e0fd commit 4a465ee

File tree

6 files changed

+61
-73
lines changed

6 files changed

+61
-73
lines changed

ChatCompletions/README.md

Lines changed: 0 additions & 44 deletions
This file was deleted.

README.md

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,44 @@
11
# OpenAI API Quickstart - Python example app
22

3-
This repository contains examples of working with different OpenAI API's in order to help you get up and running quickly. If you are new to the OpenAI API and want to go from setup to your first API call, consider checking our [general developer quickstart guide](https://platform.openai.com/docs/quickstart?context=python).
3+
This is an example chat app intended to get you started with your first OpenAI API [quickstart tutorial](https://platform.openai.com/docs/quickstart) project. It uses the [Chat Completions API](https://platform.openai.com/docs/api-reference/chat) to create a simple general purpose chat interface.
44

5-
## Example projects
5+
## Setup
66

7-
- [Chat Completions API](/ChatCompletions/)
8-
- [Assistants API - Coming soon]()
7+
1. If you don’t have Python installed, install it [from Python.org](https://www.python.org/downloads/).
8+
9+
2. Clone this repository.
10+
11+
3. Navigate into the project directory:
12+
13+
```bash
14+
$ cd openai-quickstart-python
15+
```
16+
17+
4. Create a new virtual environment:
18+
19+
```bash
20+
$ python -m venv venv
21+
$ . venv/bin/activate
22+
```
23+
24+
5. Install the requirements:
25+
26+
```bash
27+
$ pip install -r requirements.txt
28+
```
29+
30+
6. Make a copy of the example environment variables file:
31+
32+
```bash
33+
$ cp .env.example .env
34+
```
35+
36+
7. Add your [API key](https://platform.openai.com/api-keys) to the newly created `.env` file.
37+
38+
8. Run the app:
39+
40+
```bash
41+
$ flask run
42+
```
43+
44+
You should now be able to access the app at [http://localhost:5000](http://localhost:5000)!
File renamed without changes.

requirements.txt

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
1-
autopep8==1.6.0
2-
certifi==2021.10.8
3-
charset-normalizer==2.0.7
4-
click==8.0.3
5-
et-xmlfile==1.1.0
6-
Flask==2.0.2
7-
idna==3.3
8-
itsdangerous==2.0.1
9-
Jinja2==3.0.2
10-
MarkupSafe==2.0.1
11-
numpy==1.21.3
12-
openai==0.19.0
13-
openpyxl==3.0.9
14-
pandas==1.3.4
15-
pandas-stubs==1.2.0.35
16-
pycodestyle==2.8.0
17-
python-dateutil==2.8.2
18-
python-dotenv==0.19.2
19-
pytz==2021.3
20-
requests==2.26.0
21-
six==1.16.0
22-
toml==0.10.2
23-
tqdm==4.62.3
24-
urllib3==1.26.7
25-
Werkzeug==2.0.2
1+
annotated-types==0.6.0
2+
anyio==4.2.0
3+
blinker==1.7.0
4+
certifi==2024.2.2
5+
click==8.1.7
6+
distro==1.9.0
7+
Flask==3.0.2
8+
h11==0.14.0
9+
httpcore==1.0.2
10+
httpx==0.26.0
11+
idna==3.6
12+
itsdangerous==2.1.2
13+
Jinja2==3.1.3
14+
MarkupSafe==2.1.5
15+
openai==1.11.1
16+
pydantic==2.6.1
17+
pydantic_core==2.16.2
18+
sniffio==1.3.0
19+
tqdm==4.66.1
20+
typing_extensions==4.9.0
21+
Werkzeug==3.0.1
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)