Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,7 +33,8 @@ def chatbot(input, history):
|
|
| 33 |
try:
|
| 34 |
# Call your chatbot function here
|
| 35 |
message = [{"role": "user", "content": input}]
|
| 36 |
-
|
|
|
|
| 37 |
|
| 38 |
output = client.chat_completion(
|
| 39 |
messages=messages,
|
|
|
|
| 33 |
try:
|
| 34 |
# Call your chatbot function here
|
| 35 |
message = [{"role": "user", "content": input}]
|
| 36 |
+
history = [{"role": "system", "content": "You are a helpful assistant."}]
|
| 37 |
+
messages = history + message
|
| 38 |
|
| 39 |
output = client.chat_completion(
|
| 40 |
messages=messages,
|