Update app.py
Browse files
app.py
CHANGED
|
@@ -123,7 +123,13 @@ def talk(prompt, history):
|
|
| 123 |
global historylog
|
| 124 |
print(historylog)
|
| 125 |
print(stream['choices'][0]['message']['content'])
|
| 126 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
# text = ""
|
| 128 |
# for output in stream:
|
| 129 |
# text += output['choices'][0]['message']['content']
|
|
|
|
| 123 |
global historylog
|
| 124 |
print(historylog)
|
| 125 |
print(stream['choices'][0]['message']['content'])
|
| 126 |
+
response = stream['choices'][0]['message']['content']
|
| 127 |
+
for i in range(len(response)):
|
| 128 |
+
time.sleep(0.3)
|
| 129 |
+
yield response[: i+1]
|
| 130 |
+
|
| 131 |
+
# return(stream['choices'][0]['message']['content'])
|
| 132 |
+
|
| 133 |
# text = ""
|
| 134 |
# for output in stream:
|
| 135 |
# text += output['choices'][0]['message']['content']
|