pub struct CountTokensConfig {
pub tools: Option<Vec<Tool>>,
pub system_instruction: Option<Content>,
pub response_schema: Option<Schema>,
}Expand description
Configuration for count_tokens, matching the Python SDK’s CountTokensConfig.
Provides optional tools, system instruction, and response schema that contribute additional tokens to the count.
Fields§
§tools: Option<Vec<Tool>>Tool definitions whose declarations contribute tokens.
system_instruction: Option<Content>System instruction content that contributes tokens.
response_schema: Option<Schema>Response schema that contributes tokens.
Trait Implementations§
Source§impl Clone for CountTokensConfig
impl Clone for CountTokensConfig
Source§fn clone(&self) -> CountTokensConfig
fn clone(&self) -> CountTokensConfig
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 CountTokensConfig
impl Debug for CountTokensConfig
Source§impl Default for CountTokensConfig
impl Default for CountTokensConfig
Source§fn default() -> CountTokensConfig
fn default() -> CountTokensConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CountTokensConfig
impl RefUnwindSafe for CountTokensConfig
impl Send for CountTokensConfig
impl Sync for CountTokensConfig
impl Unpin for CountTokensConfig
impl UnwindSafe for CountTokensConfig
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