MCPcopy Create free account
hub / github.com/Tele-AI/Telechat / __init__

Method __init__

models/7B_8bit/generation_utils.py:69–87  ·  view source on GitHub ↗
(
            self, tokenizer, history: History = None, skip_prompt: bool = False, timeout: Optional[float] = None,
            **decode_kwargs
    )

Source from the content-addressed store, hash-verified

67 """
68
69 def __init__(
70 self, tokenizer, history: History = None, skip_prompt: bool = False, timeout: Optional[float] = None,
71 **decode_kwargs
72 ):
73
74 self.tokenizer = tokenizer
75 self.history = history
76 self.skip_prompt = skip_prompt
77 self.timeout = timeout
78 self.decode_kwargs = decode_kwargs
79
80 self.text_queue = Queue()
81 self.token_cache = []
82 self.cache_time = 0
83 self.text_until = ""
84 self.stop_signal = None
85 self.next_tokens_are_prompt = True
86
87 self.history.append({"role": "bot", "content": self.text_until})
88
89 def put(self, value):
90 """

Callers

nothing calls this directly

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected