pub struct TokenMappingBuilder { /* private fields */ }Expand description
Builder for creating custom token mappings.
Implementations§
Source§impl TokenMappingBuilder
impl TokenMappingBuilder
Sourcepub fn node_start(self, id: u32) -> Self
pub fn node_start(self, id: u32) -> Self
Set the LLM token ID for NodeStart.
Sourcepub fn input_decl(self, id: u32) -> Self
pub fn input_decl(self, id: u32) -> Self
Set the LLM token ID for InputDecl.
Sourcepub fn output_decl(self, id: u32) -> Self
pub fn output_decl(self, id: u32) -> Self
Set the LLM token ID for OutputDecl.
Sourcepub fn true_token(self, id: u32) -> Self
pub fn true_token(self, id: u32) -> Self
Set the LLM token ID for True.
Sourcepub fn false_token(self, id: u32) -> Self
pub fn false_token(self, id: u32) -> Self
Set the LLM token ID for False.
Sourcepub fn id_base(self, base: u32) -> Self
pub fn id_base(self, base: u32) -> Self
Set the base LLM token ID for Id tokens. Id(n) will map to id_base + n.
Sourcepub fn build(self) -> TokenMapping
pub fn build(self) -> TokenMapping
Trait Implementations§
Source§impl Clone for TokenMappingBuilder
impl Clone for TokenMappingBuilder
Source§fn clone(&self) -> TokenMappingBuilder
fn clone(&self) -> TokenMappingBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TokenMappingBuilder
impl Debug for TokenMappingBuilder
Auto Trait Implementations§
impl Freeze for TokenMappingBuilder
impl RefUnwindSafe for TokenMappingBuilder
impl Send for TokenMappingBuilder
impl Sync for TokenMappingBuilder
impl Unpin for TokenMappingBuilder
impl UnwindSafe for TokenMappingBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more