MCPcopy
hub / github.com/Tele-AI/Telechat / on_finalized_text

Method on_finalized_text

models/7B/generation_utils.py:137–142  ·  view source on GitHub ↗

Put the text tuple in the queue.

(self, text: str, stream_end: bool = False)

Source from the content-addressed store, hash-verified

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):

Callers 2

putMethod · 0.95
endMethod · 0.95

Calls 2

updateMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected