pub struct AzureOptions {
pub api_version: Option<String>,
pub deployment: Option<String>,
pub auth_mode: AzureAuthMode,
}Expand description
表示 Azure Provider 的可配置选项。
Fields§
§api_version: Option<String>Azure OpenAI api-version。
deployment: Option<String>默认 deployment 名称。
auth_mode: AzureAuthModeAzure 认证模式。
Implementations§
Source§impl AzureOptions
impl AzureOptions
Sourcepub fn api_version(self, api_version: impl Into<String>) -> Self
pub fn api_version(self, api_version: impl Into<String>) -> Self
设置 api-version。
Sourcepub fn deployment(self, deployment: impl Into<String>) -> Self
pub fn deployment(self, deployment: impl Into<String>) -> Self
设置默认 deployment。
Sourcepub fn bearer_auth(self) -> Self
pub fn bearer_auth(self) -> Self
切换为 Bearer Token 认证。
Sourcepub fn api_key_auth(self) -> Self
pub fn api_key_auth(self) -> Self
切换为 api-key 认证。
Trait Implementations§
Source§impl Clone for AzureOptions
impl Clone for AzureOptions
Source§fn clone(&self) -> AzureOptions
fn clone(&self) -> AzureOptions
Returns a duplicate 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 moreSource§impl Debug for AzureOptions
impl Debug for AzureOptions
Source§impl Default for AzureOptions
impl Default for AzureOptions
Source§fn default() -> AzureOptions
fn default() -> AzureOptions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AzureOptions
impl<'de> Deserialize<'de> for AzureOptions
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 PartialEq for AzureOptions
impl PartialEq for AzureOptions
Source§impl Serialize for AzureOptions
impl Serialize for AzureOptions
impl Eq for AzureOptions
impl StructuralPartialEq for AzureOptions
Auto Trait Implementations§
impl Freeze for AzureOptions
impl RefUnwindSafe for AzureOptions
impl Send for AzureOptions
impl Sync for AzureOptions
impl Unpin for AzureOptions
impl UnsafeUnpin for AzureOptions
impl UnwindSafe for AzureOptions
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<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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.