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

Method has_text_token_at

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

Source from the content-addressed store, hash-verified

4016 raise RuntimeError(f"missing prompt segment at position {pos}")
4017
4018 def has_text_token_at(self, pos: int) -> bool:
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]]

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected