Update networks/message_streamer.py
Browse files
networks/message_streamer.py
CHANGED
|
@@ -31,7 +31,7 @@ class MessageStreamer:
|
|
| 31 |
|
| 32 |
def parse_line(self, line):
|
| 33 |
line = line.decode("utf-8")
|
| 34 |
-
line = re.sub(r"data:\s*", "", line)
|
| 35 |
data = json.loads(line)
|
| 36 |
content = data["token"]["text"]
|
| 37 |
return content
|
|
|
|
| 31 |
|
| 32 |
def parse_line(self, line):
|
| 33 |
line = line.decode("utf-8")
|
| 34 |
+
line = re.sub(r"data:\s*", "", "NULL", line)
|
| 35 |
data = json.loads(line)
|
| 36 |
content = data["token"]["text"]
|
| 37 |
return content
|