Struct AzureOpenAiBuilder
pub struct AzureOpenAiBuilder { /* private fields */ }Expand description
Typed builder for AzureOpenAiModelProvider.
alias is the only positional argument. resource_name and
deployment_name — the two halves of Azure’s deployment URL — are
set via labelled chain methods and are both required at
Self::build time. Credential, API-version override, and
reasoning effort have sensible defaults.
Implementations§
Source§impl AzureOpenAiBuilder
impl AzureOpenAiBuilder
Sourcepub fn resource_name(self, resource: &str) -> Self
pub fn resource_name(self, resource: &str) -> Self
The <resource> half of Azure’s deployment URL
https://<resource>.openai.azure.com/…. Required.
Sourcepub fn deployment_name(self, deployment: &str) -> Self
pub fn deployment_name(self, deployment: &str) -> Self
The <deployment> half of Azure’s deployment URL
…/openai/deployments/<deployment>. Required.
Sourcepub fn credential(self, credential: Option<&str>) -> Self
pub fn credential(self, credential: Option<&str>) -> Self
Explicit API key. Empty / whitespace-only values are treated as “no credential” (matching the trimming behaviour of the original positional constructor).
Sourcepub fn api_version(self, version: Option<&str>) -> Self
pub fn api_version(self, version: Option<&str>) -> Self
Override the Azure OpenAI api-version query string. Defaults to
DEFAULT_API_VERSION when unset.
Sourcepub fn reasoning_effort(self, effort: Option<String>) -> Self
pub fn reasoning_effort(self, effort: Option<String>) -> Self
Reasoning effort passed through for GPT-5 / o-series routing.
Sourcepub fn build(self) -> AzureOpenAiModelProvider
pub fn build(self) -> AzureOpenAiModelProvider
§Panics
Panics if Self::resource_name or Self::deployment_name
was not called — Azure needs both to construct the deployment
URL and there is no sensible default for either.
Auto Trait Implementations§
impl Freeze for AzureOpenAiBuilder
impl RefUnwindSafe for AzureOpenAiBuilder
impl Send for AzureOpenAiBuilder
impl Sync for AzureOpenAiBuilder
impl Unpin for AzureOpenAiBuilder
impl UnsafeUnpin for AzureOpenAiBuilder
impl UnwindSafe for AzureOpenAiBuilder
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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