Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,10 +18,15 @@ def generate_story(character1, character2, character3, character4, localizer, ag
|
|
| 18 |
|
| 19 |
# Define the request to the OpenAI API
|
| 20 |
response = openai.ChatCompletion.create(
|
| 21 |
-
|
| 22 |
-
|
| 23 |
temperature=0.9,
|
| 24 |
-
max_tokens=1000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
)
|
| 26 |
|
| 27 |
# Return the story
|
|
|
|
| 18 |
|
| 19 |
# Define the request to the OpenAI API
|
| 20 |
response = openai.ChatCompletion.create(
|
| 21 |
+
model="gpt-3.5-turbo",
|
| 22 |
+
messages=inject,
|
| 23 |
temperature=0.9,
|
| 24 |
+
max_tokens=1000,
|
| 25 |
+
top_p=1,
|
| 26 |
+
n=1,
|
| 27 |
+
frequency_penalty=0,
|
| 28 |
+
presence_penalty=0,
|
| 29 |
+
stop=None
|
| 30 |
)
|
| 31 |
|
| 32 |
# Return the story
|