(self, output_stream)
| 245 | print(f"{role}: ", end="", flush=True) |
| 246 | |
| 247 | def stream_output(self, output_stream): |
| 248 | pre = 0 |
| 249 | for outputs in output_stream: |
| 250 | output_text = outputs["text"] |
| 251 | output_text = output_text.strip().split(" ") |
| 252 | now = len(output_text) - 1 |
| 253 | if now > pre: |
| 254 | print(" ".join(output_text[pre:now]), end=" ", flush=True) |
| 255 | pre = now |
| 256 | print(" ".join(output_text[pre:]), flush=True) |
| 257 | return " ".join(output_text) |
| 258 | |
| 259 | def return_output(self, output_stream): |
| 260 | pre = 0 |
nothing calls this directly
no outgoing calls
no test coverage detected