ka1kuk commited on
Commit
53f828d
1 Parent(s): 9f13a2a

Update networks/message_streamer.py

Browse files
Files changed (1) hide show
  1. networks/message_streamer.py +1 -1
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*", "", "NULL", 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(pattern, replacement, string)
35
  data = json.loads(line)
36
  content = data["token"]["text"]
37
  return content