Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -51,8 +51,14 @@ def chat_stream(message, history, model, system_prompt, temperature, max_tokens)
|
|
| 51 |
messages.append({"role": "user", "content": message})
|
| 52 |
|
| 53 |
# 4. Append user message to history visually before generating
|
| 54 |
-
history.append(
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
# 5. Stream from Groq
|
| 58 |
try:
|
|
|
|
| 51 |
messages.append({"role": "user", "content": message})
|
| 52 |
|
| 53 |
# 4. Append user message to history visually before generating
|
| 54 |
+
history.append(
|
| 55 |
+
{
|
| 56 |
+
"role": "assistant",
|
| 57 |
+
"content": response
|
| 58 |
+
}
|
| 59 |
+
)
|
| 60 |
+
|
| 61 |
+
return history
|
| 62 |
|
| 63 |
# 5. Stream from Groq
|
| 64 |
try:
|