MCPcopy Create free account
hub / github.com/AQ-MedAI/MedMemoryBench / encode

Method encode

utils/tokenizer.py:40–41  ·  view source on GitHub ↗
(self, text: str)

Source from the content-addressed store, hash-verified

38 self.encoding_name = encoding_name
39
40 def encode(self, text: str) -> List[int]:
41 return self._encoding.encode(text)
42
43 def decode(self, tokens: List[int]) -> str:
44 return self._encoding.decode(tokens)

Callers 9

count_tokensMethod · 0.45
encodeMethod · 0.45
count_tokensFunction · 0.45
num_tokens_from_stringFunction · 0.45
get_input_contextFunction · 0.45
get_gpt_answersFunction · 0.45
get_conversation_lengthsFunction · 0.45
get_input_contextFunction · 0.45
compute_config_hashFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected