pub struct LlmSection {
pub provider: LlmProviderType,
pub model: String,
pub base_url: Option<String>,
pub api_key: Option<String>,
pub api_key_env: String,
}Expand description
LLM 提供商配置(v30:字段级 serde 默认=Default 阵营——缺键即用 默认可用组合,项目级配置可只写想覆盖的键)
Fields§
§provider: LlmProviderType§model: String§base_url: Option<String>§api_key: Option<String>直接指定 API Key(优先级高于 api_key_env)
api_key_env: String从环境变量读取 API Key(当 api_key 为 None 时使用)
Trait Implementations§
Source§impl Clone for LlmSection
impl Clone for LlmSection
Source§fn clone(&self) -> LlmSection
fn clone(&self) -> LlmSection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LlmSection
impl Debug for LlmSection
Source§impl Default for LlmSection
impl Default for LlmSection
Source§impl<'de> Deserialize<'de> for LlmSection
impl<'de> Deserialize<'de> for LlmSection
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
Auto Trait Implementations§
impl Freeze for LlmSection
impl RefUnwindSafe for LlmSection
impl Send for LlmSection
impl Sync for LlmSection
impl Unpin for LlmSection
impl UnsafeUnpin for LlmSection
impl UnwindSafe for LlmSection
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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