pub enum LlmProviderType {
OpenAI,
OpenAiCompatible,
Anthropic,
Mock,
}Expand description
LLM Provider 类型(v17 t02 拆分:协议按 provider 类型显式绑定)
openai:OpenAI Responses API 协议(base_url 可配——DeepSeek 等 支持 Responses 的服务通过 base_url 接入;默认官方端点)openai-compatible:chat/completions 协议(OpenAI 兼容端点: 阿里云/自建/无 /responses 的服务;v17 起 custom 并入此值)anthropic:Anthropic Messages API(不变)mock:本地模拟(测试/CI/无 Key 演示,不触网)
拆分原因:Responses 与 chat/completions 的请求/响应/SSE 差异大, 且不是所有 OpenAI 兼容端点都提供 /responses——按 provider 显式绑定 协议,避免“无脑默认切换“破坏兼容端点。
Variants§
Trait Implementations§
Source§impl Clone for LlmProviderType
impl Clone for LlmProviderType
Source§fn clone(&self) -> LlmProviderType
fn clone(&self) -> LlmProviderType
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 LlmProviderType
impl Debug for LlmProviderType
Source§impl<'de> Deserialize<'de> for LlmProviderType
impl<'de> Deserialize<'de> for LlmProviderType
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
impl Eq for LlmProviderType
Source§impl PartialEq for LlmProviderType
impl PartialEq for LlmProviderType
Source§impl Serialize for LlmProviderType
impl Serialize for LlmProviderType
impl StructuralPartialEq for LlmProviderType
Auto Trait Implementations§
impl Freeze for LlmProviderType
impl RefUnwindSafe for LlmProviderType
impl Send for LlmProviderType
impl Sync for LlmProviderType
impl Unpin for LlmProviderType
impl UnsafeUnpin for LlmProviderType
impl UnwindSafe for LlmProviderType
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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