Skip to main content

encode_ids

Function encode_ids 

Source
pub fn encode_ids(text: &str) -> Option<Vec<u32>>
Expand description

Encode text into Claude token ids. Returns None if the tokenizer is unavailable so callers can pick a byte-based fallback.