pub struct RemoteAzureOpenAIProvider { /* private fields */ }Expand description
Remote provider that calls the Azure OpenAI Service for embedding and text generation.
Requires the AZURE_OPENAI_API_KEY environment variable (or a custom env
var name via the api_key_env option) and the resource_name option.
Implementations§
Trait Implementations§
Source§impl Default for RemoteAzureOpenAIProvider
impl Default for RemoteAzureOpenAIProvider
Source§impl ModelProvider for RemoteAzureOpenAIProvider
impl ModelProvider for RemoteAzureOpenAIProvider
Source§fn provider_id(&self) -> &'static str
fn provider_id(&self) -> &'static str
Unique identifier for this provider (e.g.
"local/candle", "remote/openai").Source§fn capabilities(&self) -> ProviderCapabilities
fn capabilities(&self) -> ProviderCapabilities
Return the set of tasks this provider supports.
Source§fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
spec: &'life1 ModelAliasSpec,
) -> Pin<Box<dyn Future<Output = Result<LoadedModelHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
spec: &'life1 ModelAliasSpec,
) -> Pin<Box<dyn Future<Output = Result<LoadedModelHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load (or connect to) a model described by
spec and return a type-erased
handle. Read moreAuto Trait Implementations§
impl !Freeze for RemoteAzureOpenAIProvider
impl !RefUnwindSafe for RemoteAzureOpenAIProvider
impl Send for RemoteAzureOpenAIProvider
impl Sync for RemoteAzureOpenAIProvider
impl Unpin for RemoteAzureOpenAIProvider
impl !UnwindSafe for RemoteAzureOpenAIProvider
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<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>
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