Update app.py
Browse files
app.py
CHANGED
|
@@ -565,7 +565,7 @@ def generate(message, temperature):
|
|
| 565 |
|
| 566 |
# The reason why the library method is not used here is that if an error occurs,
|
| 567 |
# the returned data will not be a stream, and using the official library will result in an error.
|
| 568 |
-
for chunk in str(response).encode()
|
| 569 |
chunk = chunk.decode("utf-8")
|
| 570 |
data_chunks = parse_data_chunk(chunk)
|
| 571 |
try:
|
|
|
|
| 565 |
|
| 566 |
# The reason why the library method is not used here is that if an error occurs,
|
| 567 |
# the returned data will not be a stream, and using the official library will result in an error.
|
| 568 |
+
for chunk in str(response).encode():
|
| 569 |
chunk = chunk.decode("utf-8")
|
| 570 |
data_chunks = parse_data_chunk(chunk)
|
| 571 |
try:
|