pub struct LLMConfig {
pub model: String,
pub max_tokens: u32,
pub temperature: f32,
pub stream: bool,
pub context_window: u32,
pub retry_attempts: u32,
pub retry_delay_ms: u64,
pub timeout_seconds: u64,
}
Expand description
LLM模型配置
Fields§
§model: String
使用的模型
max_tokens: u32
最大_tokens
temperature: f32
温度
stream: bool
是否流式输出
context_window: u32
上下文窗口大小
retry_attempts: u32
重试次数
retry_delay_ms: u64
重试间隔(毫秒)
timeout_seconds: u64
超时时间(秒)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LLMConfig
impl<'de> Deserialize<'de> for LLMConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&LLMConfig> for RetryConfig
impl From<&LLMConfig> for RetryConfig
Auto Trait Implementations§
impl Freeze for LLMConfig
impl RefUnwindSafe for LLMConfig
impl Send for LLMConfig
impl Sync for LLMConfig
impl Unpin 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