Update main.py
Browse files
main.py
CHANGED
|
@@ -106,7 +106,8 @@ def chat(message: str, history):
|
|
| 106 |
thread = threading.Thread(target=model.generate, kwargs=generation_kwargs)
|
| 107 |
thread.start()
|
| 108 |
|
| 109 |
-
history.append(
|
|
|
|
| 110 |
result = ""
|
| 111 |
|
| 112 |
for token in streamer:
|
|
|
|
| 106 |
thread = threading.Thread(target=model.generate, kwargs=generation_kwargs)
|
| 107 |
thread.start()
|
| 108 |
|
| 109 |
+
history.append({"role": "user", "content": message})
|
| 110 |
+
history.append({"role": "assistant", "content": ""})
|
| 111 |
result = ""
|
| 112 |
|
| 113 |
for token in streamer:
|