MCPcopy Create free account
hub / github.com/Enfoirer/Text2GraphRAG / decode

Method decode

nano_graphrag/_utils.py:152–154  ·  view source on GitHub ↗
(self, tokens: list[int])

Source from the content-addressed store, hash-verified

150 return self._tokenizer.encode(text)
151
152 def decode(self, tokens: list[int]) -> str:
153 self._lazy_load_tokenizer()
154 return self._tokenizer.decode(tokens)
155
156 # +++ 新增 +++: 增加一个批量解码的方法以提高效率,并保持接口一致性
157 def decode_batch(self, tokens_list: list[list[int]]) -> list[str]:

Callers 2

decode_batchMethod · 0.80

Calls 1

_lazy_load_tokenizerMethod · 0.95

Tested by

no test coverage detected