pub struct LLMConfig {
pub temperature: Option<f32>,
pub max_tokens: Option<u32>,
pub top_p: Option<f32>,
pub top_k: Option<u32>,
pub frequency_penalty: Option<f32>,
pub presence_penalty: Option<f32>,
pub stop_sequences: Option<Vec<String>>,
pub timeout_seconds: Option<u64>,
pub reasoning: Option<bool>,
pub reasoning_effort: Option<String>,
pub reasoning_budget_tokens: Option<u32>,
pub extra: HashMap<String, Value>,
}Fields§
§temperature: Option<f32>§max_tokens: Option<u32>§top_p: Option<f32>§top_k: Option<u32>§frequency_penalty: Option<f32>§presence_penalty: Option<f32>§stop_sequences: Option<Vec<String>>§timeout_seconds: Option<u64>§reasoning: Option<bool>§reasoning_effort: Option<String>§reasoning_budget_tokens: Option<u32>§extra: HashMap<String, Value>Implementations§
Source§impl LLMConfig
impl LLMConfig
pub fn new() -> LLMConfig
pub fn with_temperature(self, temperature: f32) -> LLMConfig
pub fn with_max_tokens(self, max_tokens: u32) -> LLMConfig
pub fn with_top_p(self, top_p: f32) -> LLMConfig
pub fn with_top_k(self, top_k: u32) -> LLMConfig
pub fn with_stop_sequences(self, stop_sequences: Vec<String>) -> LLMConfig
pub fn with_extra(self, key: impl Into<String>, value: Value) -> LLMConfig
pub fn with_timeout_seconds(self, timeout: u64) -> LLMConfig
pub fn with_reasoning(self, enabled: bool) -> LLMConfig
pub fn with_reasoning_effort(self, effort: impl Into<String>) -> LLMConfig
pub fn with_reasoning_budget_tokens(self, budget: u32) -> LLMConfig
pub fn merge(self, other: &LLMConfig) -> LLMConfig
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LLMConfig
impl<'de> Deserialize<'de> for LLMConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LLMConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LLMConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for LLMConfig
impl Serialize for LLMConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for LLMConfig
impl RefUnwindSafe for LLMConfig
impl Send for LLMConfig
impl Sync for LLMConfig
impl Unpin for LLMConfig
impl UnsafeUnpin for LLMConfig
impl UnwindSafe for LLMConfig
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 moreCreates a shared type from an unshared type.