pub struct RobotConfig {
pub format: OutputFormat,
pub max_tokens: Option<usize>,
pub max_results: Option<usize>,
pub max_content_length: Option<usize>,
pub fields: FieldMode,
pub enabled: bool,
}Expand description
Robot mode configuration
Fields§
§format: OutputFormatOutput format
max_tokens: Option<usize>Maximum tokens to output (estimated)
max_results: Option<usize>Maximum results to return
max_content_length: Option<usize>Maximum content length before truncation
fields: FieldModeField selection mode
enabled: boolWhether robot mode is enabled
Implementations§
Source§impl RobotConfig
impl RobotConfig
Sourcepub fn with_format(self, format: OutputFormat) -> Self
pub fn with_format(self, format: OutputFormat) -> Self
Set output format
Sourcepub fn with_max_tokens(self, max_tokens: usize) -> Self
pub fn with_max_tokens(self, max_tokens: usize) -> Self
Set max tokens
Sourcepub fn with_max_results(self, max_results: usize) -> Self
pub fn with_max_results(self, max_results: usize) -> Self
Set max results
Sourcepub fn with_max_content_length(self, max_content_length: usize) -> Self
pub fn with_max_content_length(self, max_content_length: usize) -> Self
Set max content length
Sourcepub fn with_fields(self, fields: FieldMode) -> Self
pub fn with_fields(self, fields: FieldMode) -> Self
Set field mode
Sourcepub fn is_robot_mode(&self) -> bool
pub fn is_robot_mode(&self) -> bool
Check if this is robot mode
Trait Implementations§
Source§impl Clone for RobotConfig
impl Clone for RobotConfig
Source§fn clone(&self) -> RobotConfig
fn clone(&self) -> RobotConfig
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 RobotConfig
impl Debug for RobotConfig
Auto Trait Implementations§
impl Freeze for RobotConfig
impl RefUnwindSafe for RobotConfig
impl Send for RobotConfig
impl Sync for RobotConfig
impl Unpin for RobotConfig
impl UnwindSafe for RobotConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more