Spaces:
Runtime error
Runtime error
hanzla javaid
commited on
Commit
·
116a0d1
1
Parent(s):
92590df
test
Browse files
app.py
CHANGED
|
@@ -30,10 +30,12 @@ def get_model_response(model_name, message):
|
|
| 30 |
|
| 31 |
|
| 32 |
def chat(message, history, model1, model2):
|
| 33 |
-
response1 = get_model_response(model1,
|
| 34 |
-
response2 = get_model_response(model2,
|
| 35 |
-
|
| 36 |
-
|
|
|
|
|
|
|
| 37 |
|
| 38 |
|
| 39 |
|
|
|
|
| 30 |
|
| 31 |
|
| 32 |
def chat(message, history, model1, model2):
|
| 33 |
+
response1 = get_model_response(model1, message)
|
| 34 |
+
response2 = get_model_response(model2, message)
|
| 35 |
+
history = history or []
|
| 36 |
+
history.append({"role": "user", "content": message})
|
| 37 |
+
history.append({"role": "assistant", "content": f"{model1}: {response1}\n\n{model2}: {response2}"})
|
| 38 |
+
return history
|
| 39 |
|
| 40 |
|
| 41 |
|