pub struct AzureConfig { /* private fields */ }
Expand description
Configuration for Azure OpenAI Service
Implementations§
Source§impl AzureConfig
impl AzureConfig
pub fn new() -> AzureConfig
pub fn with_api_version<S>(self, api_version: S) -> AzureConfig
pub fn with_deployment_id<S>(self, deployment_id: S) -> AzureConfig
Sourcepub fn with_api_key<S>(self, api_key: S) -> AzureConfig
pub fn with_api_key<S>(self, api_key: S) -> AzureConfig
To use a different API key different from default OPENAI_API_KEY env var
Sourcepub fn with_api_base<S>(self, api_base: S) -> AzureConfig
pub fn with_api_base<S>(self, api_base: S) -> AzureConfig
API base url in form of https://your-resource-name.openai.azure.com
Trait Implementations§
Source§impl Clone for AzureConfig
impl Clone for AzureConfig
Source§fn clone(&self) -> AzureConfig
fn clone(&self) -> AzureConfig
Returns a copy 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 Config for AzureConfig
impl Config for AzureConfig
Source§impl Debug for AzureConfig
impl Debug for AzureConfig
Source§impl Default for AzureConfig
impl Default for AzureConfig
Source§fn default() -> AzureConfig
fn default() -> AzureConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AzureConfigwhere
AzureConfig: Default,
impl<'de> Deserialize<'de> for AzureConfigwhere
AzureConfig: Default,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AzureConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AzureConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AzureConfig
impl RefUnwindSafe for AzureConfig
impl Send for AzureConfig
impl Sync for AzureConfig
impl Unpin for AzureConfig
impl UnwindSafe for AzureConfig
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 more