Struct langchain_rust::language_models::options::CallOptions
source · pub struct CallOptions {Show 16 fields
pub candidate_count: Option<usize>,
pub max_tokens: Option<u16>,
pub temperature: Option<f32>,
pub stop_words: Option<Vec<String>>,
pub streaming_func: Option<Arc<Mutex<dyn FnMut(String) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send>> + Send>>>,
pub top_k: Option<usize>,
pub top_p: Option<f32>,
pub seed: Option<usize>,
pub min_length: Option<usize>,
pub max_length: Option<usize>,
pub n: Option<usize>,
pub repetition_penalty: Option<f32>,
pub frequency_penalty: Option<f32>,
pub presence_penalty: Option<f32>,
pub functions: Option<Vec<FunctionDefinition>>,
pub function_call_behavior: Option<FunctionCallBehavior>,
}Fields§
§candidate_count: Option<usize>§max_tokens: Option<u16>§temperature: Option<f32>§stop_words: Option<Vec<String>>§streaming_func: Option<Arc<Mutex<dyn FnMut(String) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send>> + Send>>>§top_k: Option<usize>§top_p: Option<f32>§seed: Option<usize>§min_length: Option<usize>§max_length: Option<usize>§n: Option<usize>§repetition_penalty: Option<f32>§frequency_penalty: Option<f32>§presence_penalty: Option<f32>§functions: Option<Vec<FunctionDefinition>>§function_call_behavior: Option<FunctionCallBehavior>Implementations§
source§impl CallOptions
impl CallOptions
pub fn new() -> Self
pub fn with_max_tokens(self, max_tokens: u16) -> Self
pub fn with_candidate_count(self, candidate_count: usize) -> Self
pub fn with_temperature(self, temperature: f32) -> Self
pub fn with_stop_words(self, stop_words: Vec<String>) -> Self
pub fn with_streaming_func<F, Fut>(self, func: F) -> Self
pub fn with_top_k(self, top_k: usize) -> Self
pub fn with_top_p(self, top_p: f32) -> Self
pub fn with_seed(self, seed: usize) -> Self
pub fn with_min_length(self, min_length: usize) -> Self
pub fn with_max_length(self, max_length: usize) -> Self
pub fn with_n(self, n: usize) -> Self
pub fn with_repetition_penalty(self, repetition_penalty: f32) -> Self
pub fn with_frequency_penalty(self, frequency_penalty: f32) -> Self
pub fn with_presence_penalty(self, presence_penalty: f32) -> Self
pub fn with_functions(self, functions: Vec<FunctionDefinition>) -> Self
pub fn with_function_call_behavior(self, behavior: FunctionCallBehavior) -> Self
Trait Implementations§
source§impl Clone for CallOptions
impl Clone for CallOptions
source§fn clone(&self) -> CallOptions
fn clone(&self) -> CallOptions
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for CallOptions
impl Send for CallOptions
impl Sync for CallOptions
impl Unpin for CallOptions
impl !UnwindSafe for CallOptions
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