(self, encoding_name: str = "cl100k_base")
| 33 | """Tiktoken wrapper.""" |
| 34 | |
| 35 | def __init__(self, encoding_name: str = "cl100k_base"): |
| 36 | import tiktoken |
| 37 | self._encoding = tiktoken.get_encoding(encoding_name) |
| 38 | self.encoding_name = encoding_name |
| 39 | |
| 40 | def encode(self, text: str) -> List[int]: |
| 41 | return self._encoding.encode(text) |
nothing calls this directly
no outgoing calls
no test coverage detected