(self)
| 128 | self.clear_cache() |
| 129 | |
| 130 | def clear_cache(self): |
| 131 | self.cache_time = 0 |
| 132 | self.token_cache = [] |
| 133 | self.text_until = "" |
| 134 | self.history = None |
| 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.""" |