pub struct ProviderModelId<'builder, 'id> { /* private fields */ }
Implementations§
Source§impl<'builder> ProviderModelId<'builder, '_>
impl<'builder> ProviderModelId<'builder, '_>
pub fn image_generation( self, ) -> Result<Box<dyn ImageGenerationModelDyn + 'builder>, ClientBuildError>
Available on crate feature
image
only.Source§impl<'builder> ProviderModelId<'builder, '_>
impl<'builder> ProviderModelId<'builder, '_>
pub fn audio_generation( self, ) -> Result<Box<dyn AudioGenerationModelDyn + 'builder>, ClientBuildError>
Available on crate feature
audio
only.Source§impl<'builder> ProviderModelId<'builder, '_>
impl<'builder> ProviderModelId<'builder, '_>
pub fn completion( self, ) -> Result<BoxCompletionModel<'builder>, ClientBuildError>
pub fn agent(self) -> Result<BoxAgentBuilder<'builder>, ClientBuildError>
pub fn embedding(self) -> Result<BoxEmbeddingModel<'builder>, ClientBuildError>
pub fn transcription( self, ) -> Result<BoxTranscriptionModel<'builder>, ClientBuildError>
Sourcepub async fn stream_completion(
self,
request: CompletionRequest,
) -> Result<StreamingCompletionResponse<()>, ClientBuildError>
pub async fn stream_completion( self, request: CompletionRequest, ) -> Result<StreamingCompletionResponse<()>, ClientBuildError>
Sourcepub async fn stream_prompt(
self,
prompt: impl Into<Message> + Send,
) -> Result<StreamingCompletionResponse<()>, ClientBuildError>
pub async fn stream_prompt( self, prompt: impl Into<Message> + Send, ) -> Result<StreamingCompletionResponse<()>, ClientBuildError>
Sourcepub async fn stream_chat(
self,
prompt: impl Into<Message> + Send,
chat_history: Vec<Message>,
) -> Result<StreamingCompletionResponse<()>, ClientBuildError>
pub async fn stream_chat( self, prompt: impl Into<Message> + Send, chat_history: Vec<Message>, ) -> Result<StreamingCompletionResponse<()>, ClientBuildError>
Auto Trait Implementations§
impl<'builder, 'id> Freeze for ProviderModelId<'builder, 'id>
impl<'builder, 'id> RefUnwindSafe for ProviderModelId<'builder, 'id>
impl<'builder, 'id> !Send for ProviderModelId<'builder, 'id>
impl<'builder, 'id> !Sync for ProviderModelId<'builder, 'id>
impl<'builder, 'id> Unpin for ProviderModelId<'builder, 'id>
impl<'builder, 'id> UnwindSafe for ProviderModelId<'builder, 'id>
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> 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> 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