Spaces:
Runtime error
Runtime error
Commit
·
29b56a4
1
Parent(s):
e973c3a
Update app.py
Browse files
app.py
CHANGED
@@ -28,12 +28,12 @@ def chatbot(input):
|
|
28 |
response = openai.Completion.create(
|
29 |
engine="text-davinci-003",
|
30 |
prompt='\n'.join(conversation_history),
|
31 |
-
max_tokens=
|
32 |
)
|
33 |
|
34 |
# Add AI response to conversation history
|
35 |
ai_response = response.choices[0].text.strip()
|
36 |
-
conversation_history.append(f"
|
37 |
|
38 |
return ai_response
|
39 |
|
|
|
28 |
response = openai.Completion.create(
|
29 |
engine="text-davinci-003",
|
30 |
prompt='\n'.join(conversation_history),
|
31 |
+
max_tokens=600
|
32 |
)
|
33 |
|
34 |
# Add AI response to conversation history
|
35 |
ai_response = response.choices[0].text.strip()
|
36 |
+
conversation_history.append(f": {ai_response}")
|
37 |
|
38 |
return ai_response
|
39 |
|