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
[](https://lawrencemcdaniel.com)
17
16
18
-
A Python "Hello World" application that also demonstrates the OpenAI API and usage of Docker.
17
+
A Python "Hello World" application that demonstrates the OpenAI API and usage of Docker Compose to containerize your project. This is a command line utility that returns the value "Hello World" in the written language of your choice.
make build # run Docker compose to containerize your application
26
+
make run # run the application as a Docker container
27
+
```
28
+
29
+
To run from the command line:
30
+
31
+
```console
32
+
source venv/bin/activate
33
+
python3 -m app.hello_world "Chinese"
34
+
```
35
+
36
+
Sample output:
37
+
38
+
```console
39
+
% make run
40
+
Hello World
41
+
Your language: Mandarin
42
+
你好,世界 -- (Mandarin)
43
+
```
19
44
20
45
## Requirements
21
46
@@ -25,7 +50,8 @@ A Python "Hello World" application that also demonstrates the OpenAI API and usa
25
50
_If you're new to OpenAI API then see [How to Get an OpenAI API Key](./doc/OPENAI_API_GETTING_STARTED_GUIDE.md)_
26
51
-[Python 3.11](https://www.python.org/downloads/): for creating virtual environment used for building AWS Lambda Layer, and locally by pre-commit linters and code formatters.
27
52
-[NodeJS](https://nodejs.org/en/download): used with NPM for local ReactJS developer environment, and for configuring/testing Semantic Release.
28
-
-[Docker Compose](https://docs.docker.com/compose/install/): used by an automated Terraform process to create the AWS Lambda Layer for OpenAI and LangChain.
53
+
-[Docker](https://docs.docker.com/): the Docker run-time environment for your operating system. Can be installed as a desktop application or as a service (daemon)
54
+
-[Docker Compose](https://docs.docker.com/compose/install/): used to create your production container.
0 commit comments