MCPcopy Create free account
hub / github.com/ankane/tokenizers-ruby / token_to_id

Method token_to_id

ext/tokenizers/src/tokenizer.rs:621–623  ·  view source on GitHub ↗
(&self, token: String)

Source from the content-addressed store, hash-verified

619 }
620
621 pub fn token_to_id(&self, token: String) -> RbResult<Option<u32>> {
622 Ok(self.read_inner()?.token_to_id(&token))
623 }
624
625 pub fn id_to_token(&self, id: u32) -> RbResult<Option<String>> {
626 Ok(self.read_inner()?.id_to_token(id))

Callers 2

test_worksMethod · 0.45

Calls 1

read_innerMethod · 0.80

Tested by 2

test_worksMethod · 0.36