Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,7 +13,7 @@ load_dotenv() # load environment variables from .env file
|
|
| 13 |
api_key = os.getenv("OPENAI_API_KEY") # access the value of the OPENAI_API_KEY environment variable
|
| 14 |
|
| 15 |
def openai_chat(prompt):
|
| 16 |
-
completions = openai.Completion.create(engine="text-davinci-003", prompt=prompt, max_tokens=1024, n=1, temperature=0.
|
| 17 |
message = completions.choices[0].text
|
| 18 |
return message.strip()
|
| 19 |
|
|
|
|
| 13 |
api_key = os.getenv("OPENAI_API_KEY") # access the value of the OPENAI_API_KEY environment variable
|
| 14 |
|
| 15 |
def openai_chat(prompt):
|
| 16 |
+
completions = openai.Completion.create(engine="text-davinci-003", prompt=prompt, max_tokens=1024, n=1, temperature=0.4,)
|
| 17 |
message = completions.choices[0].text
|
| 18 |
return message.strip()
|
| 19 |
|