MCPcopy
hub / github.com/XPixelGroup/DiffBIR / write

Method write

llava/utils.py:73–85  ·  view source on GitHub ↗
(self, buf)

Source from the content-addressed store, hash-verified

71 return getattr(self.terminal, attr)
72
73 def write(self, buf):
74 temp_linebuf = self.linebuf + buf
75 self.linebuf = ''
76 for line in temp_linebuf.splitlines(True):
77 # From the io.TextIOWrapper docs:
78 # On output, if newline is None, any '\n' characters written
79 # are translated to the system default line separator.
80 # By default sys.stdout.write() expects '\n' newlines and then
81 # translates them so this is still cross platform.
82 if line[-1] == '\n':
83 self.logger.log(self.log_level, line.rstrip())
84 else:
85 self.linebuf += line
86
87 def flush(self):
88 if self.linebuf != '':

Callers 11

vote_last_responseFunction · 0.80
http_botFunction · 0.80
eval_modelFunction · 0.80
eval_modelFunction · 0.80
eval_gpt_review.pyFile · 0.80
eval_modelFunction · 0.80
eval_modelFunction · 0.80
eval_modelFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected