langchain/llms/llamacpp.py/LlamaCpp/get_num_tokens
class LlamaCpp:    def get_num_tokens(self, text: str) -> int:
        tokenized_text = self.client.tokenize(text.encode("utf-8"))
        return len(tokenized_text)