#[non_exhaustive]pub struct InferenceConfigurationBuilder { /* private fields */ }Expand description
A builder for InferenceConfiguration.
Implementations§
source§impl InferenceConfigurationBuilder
impl InferenceConfigurationBuilder
sourcepub fn temperature(self, input: f32) -> Self
pub fn temperature(self, input: f32) -> Self
Controls randomness, higher values increase diversity
sourcepub fn set_temperature(self, input: Option<f32>) -> Self
pub fn set_temperature(self, input: Option<f32>) -> Self
Controls randomness, higher values increase diversity
sourcepub fn get_temperature(&self) -> &Option<f32>
pub fn get_temperature(&self) -> &Option<f32>
Controls randomness, higher values increase diversity
sourcepub fn set_top_p(self, input: Option<f32>) -> Self
pub fn set_top_p(self, input: Option<f32>) -> Self
Cumulative probability cutoff for token selection
sourcepub fn maximum_length(self, input: i32) -> Self
pub fn maximum_length(self, input: i32) -> Self
Maximum length of output
sourcepub fn set_maximum_length(self, input: Option<i32>) -> Self
pub fn set_maximum_length(self, input: Option<i32>) -> Self
Maximum length of output
sourcepub fn get_maximum_length(&self) -> &Option<i32>
pub fn get_maximum_length(&self) -> &Option<i32>
Maximum length of output
sourcepub fn stop_sequences(self, input: impl Into<String>) -> Self
pub fn stop_sequences(self, input: impl Into<String>) -> Self
Appends an item to stop_sequences.
To override the contents of this collection use set_stop_sequences.
List of stop sequences
sourcepub fn set_stop_sequences(self, input: Option<Vec<String>>) -> Self
pub fn set_stop_sequences(self, input: Option<Vec<String>>) -> Self
List of stop sequences
sourcepub fn get_stop_sequences(&self) -> &Option<Vec<String>>
pub fn get_stop_sequences(&self) -> &Option<Vec<String>>
List of stop sequences
sourcepub fn build(self) -> InferenceConfiguration
pub fn build(self) -> InferenceConfiguration
Consumes the builder and constructs a InferenceConfiguration.
Trait Implementations§
source§impl Clone for InferenceConfigurationBuilder
impl Clone for InferenceConfigurationBuilder
source§fn clone(&self) -> InferenceConfigurationBuilder
fn clone(&self) -> InferenceConfigurationBuilder
Returns a copy 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 Default for InferenceConfigurationBuilder
impl Default for InferenceConfigurationBuilder
source§fn default() -> InferenceConfigurationBuilder
fn default() -> InferenceConfigurationBuilder
Returns the “default value” for a type. Read more
source§impl PartialEq for InferenceConfigurationBuilder
impl PartialEq for InferenceConfigurationBuilder
source§fn eq(&self, other: &InferenceConfigurationBuilder) -> bool
fn eq(&self, other: &InferenceConfigurationBuilder) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for InferenceConfigurationBuilder
Auto Trait Implementations§
impl RefUnwindSafe for InferenceConfigurationBuilder
impl Send for InferenceConfigurationBuilder
impl Sync for InferenceConfigurationBuilder
impl Unpin for InferenceConfigurationBuilder
impl UnwindSafe for InferenceConfigurationBuilder
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> 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>
Creates a shared type from an unshared type.