MCPcopy Index your code
hub / github.com/abetlen/llama-cpp-python / token_get_text

Method token_get_text

llama_cpp/_internals.py:122–123  ·  view source on GitHub ↗
(self, token: int)

Source from the content-addressed store, hash-verified

120 # Vocab
121
122 def token_get_text(self, token: int) -> str:
123 return llama_cpp.llama_vocab_get_text(self.vocab, token).decode("utf-8")
124
125 def token_get_score(self, token: int) -> float:
126 return llama_cpp.llama_vocab_get_score(self.vocab, token)

Callers 2

__init__Method · 0.80
_create_completionMethod · 0.80

Calls 1

decodeMethod · 0.45

Tested by

no test coverage detected