pub struct AzureProvider { /* private fields */ }Expand description
Azure OpenAI provider implementation. Azure OpenAI provider
Uses Azure-specific endpoint format: https://{resource}.openai.azure.com/openai/deployments/{deployment}/chat/completions
Supports the following environment variables:
- AZURE_OPENAI_API_KEY: API key for authentication
Azure OpenAI provider
Configuration is resolved at runtime from:
- auth.json (for api_key)
- settings.toml (for resource_name, deployment_name via custom_provider)
- StreamOptions (for request-time override)
Implementations§
Source§impl AzureProvider
impl AzureProvider
Trait Implementations§
Source§impl Clone for AzureProvider
impl Clone for AzureProvider
Source§fn clone(&self) -> AzureProvider
fn clone(&self) -> AzureProvider
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 Default for AzureProvider
impl Default for AzureProvider
Source§impl Provider for AzureProvider
impl Provider for AzureProvider
Source§fn stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
model: &'life1 Model,
context: &'life2 Context,
options: Option<StreamOptions>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = ProviderEvent> + Send>>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
model: &'life1 Model,
context: &'life2 Context,
options: Option<StreamOptions>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = ProviderEvent> + Send>>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Stream assistant message events
Auto Trait Implementations§
impl Freeze for AzureProvider
impl !RefUnwindSafe for AzureProvider
impl Send for AzureProvider
impl Sync for AzureProvider
impl Unpin for AzureProvider
impl UnsafeUnpin for AzureProvider
impl !UnwindSafe for AzureProvider
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