File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ This sample is an endpoint that tells programming jokes and shows how to deploy
13
13
## Deploying
14
14
15
15
1 . Open the terminal and type ` defang login `
16
- 2 . Set the environment variable ` OPENAI_API_KEY ` by typing ` defang config set OPENAI_API_KEY ` .
16
+ 2 . Set the environment variable ` OPENAI_KEY ` by typing ` defang config set OPENAI_KEY ` .
17
17
3 . Type ` defang compose up ` in the CLI.
18
18
4 . Your app will be running within a few minutes.
19
19
Original file line number Diff line number Diff line change 12
12
)
13
13
14
14
def generate_text (prompt : str ) -> str :
15
- api_key = os .getenv ("OPENAI_API_KEY " )
15
+ api_key = os .getenv ("OPENAI_KEY " )
16
16
model = OpenAI (api_key = api_key )
17
17
response = model .invoke (prompt )
18
18
return response
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ services:
4
4
context : ./app
5
5
dockerfile : Dockerfile
6
6
environment :
7
- - OPENAI_API_KEY
7
+ - OPENAI_KEY
8
8
ports :
9
9
- target : 80
10
10
published : 8080
You can’t perform that action at this time.
0 commit comments