MCPcopy Create free account
hub / github.com/abetlen/llama-cpp-python / text_token_at

Method text_token_at

examples/server/server.py:4021–4022  ·  view source on GitHub ↗
(self, pos: int)

Source from the content-addressed store, hash-verified

4019 return pos in self.text_token_index_by_pos
4020
4021 def text_token_at(self, pos: int) -> int:
4022 return self.text_tokens[self.text_token_index_by_pos[pos]]
4023
4024 def prev_text_tokens_at(self, pos: int) -> List[int]:
4025 return self.text_tokens[: self.text_token_index_by_pos[pos]]

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected