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

Method __init__

models/7B/generation_utils.py:9–17  ·  view source on GitHub ↗

init from a list of dict

(self, tokenizer, history)

Source from the content-addressed store, hash-verified

7class History:
8
9 def __init__(self, tokenizer, history):
10 '''
11 init from a list of dict
12 '''
13 # use deque to meet some special situation
14 self.input_history = deque()
15 self.tokenizer = tokenizer
16 if history:
17 self._transfer_from_list(history)
18
19 def _transfer_from_list(self, history):
20 for message in history:

Callers

nothing calls this directly

Calls 1

_transfer_from_listMethod · 0.95

Tested by

no test coverage detected