MCPcopy Create free account
hub / github.com/TransluceAI/observatory / tokenize

Method tokenize

lib/util/util/chat_input.py:47–48  ·  view source on GitHub ↗
(self, subject: "Subject")

Source from the content-addressed store, hash-verified

45class ModelInput(BaseModel):
46 @abstractmethod
47 def tokenize(self, subject: "Subject") -> list[int]:
48 pass
49
50 def token_strs(self, subject: "Subject") -> list[str]:
51 return [subject.decode(x) for x in self.tokenize(subject)]

Callers 4

token_strsMethod · 0.95
is_emptyMethod · 0.95
to_strMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected