Put the text tuple in the queue.
(self, text: str, stream_end: bool = False)
| 135 | self.next_tokens_are_prompt = True |
| 136 | |
| 137 | def on_finalized_text(self, text: str, stream_end: bool = False): |
| 138 | """Put the text tuple in the queue.""" |
| 139 | self.history.update(self.text_until) |
| 140 | self.text_queue.put((text, self.history), timeout=self.timeout) |
| 141 | if stream_end: |
| 142 | self.text_queue.put((self.stop_signal, self.history), timeout=self.timeout) |
| 143 | |
| 144 | @staticmethod |
| 145 | def _is_printable(cp): |