pub struct BoxedTextCompletionModel { /* private fields */ }
Expand description
A boxed TextCompletionModel
.
Trait Implementations§
Source§impl Clone for BoxedTextCompletionModel
impl Clone for BoxedTextCompletionModel
Source§fn clone(&self) -> BoxedTextCompletionModel
fn clone(&self) -> BoxedTextCompletionModel
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl CreateTextCompletionSession for BoxedTextCompletionModel
impl CreateTextCompletionSession for BoxedTextCompletionModel
Source§impl TextCompletionModel for BoxedTextCompletionModel
impl TextCompletionModel for BoxedTextCompletionModel
Source§fn stream_text_with_callback<'a>(
&'a self,
session: &'a mut Self::Session,
text: &str,
sampler: GenerationParameters,
on_token: impl FnMut(String) -> Result<(), Self::Error> + Send + Sync + 'static,
) -> impl Future<Output = Result<(), Self::Error>> + Send + 'a
fn stream_text_with_callback<'a>( &'a self, session: &'a mut Self::Session, text: &str, sampler: GenerationParameters, on_token: impl FnMut(String) -> Result<(), Self::Error> + Send + Sync + 'static, ) -> impl Future<Output = Result<(), Self::Error>> + Send + 'a
Generate text with the given prompt. Read more
Auto Trait Implementations§
impl Freeze for BoxedTextCompletionModel
impl !RefUnwindSafe for BoxedTextCompletionModel
impl Send for BoxedTextCompletionModel
impl Sync for BoxedTextCompletionModel
impl Unpin for BoxedTextCompletionModel
impl !UnwindSafe for BoxedTextCompletionModel
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<M> TextCompletionModelExt for Mwhere
M: CreateTextCompletionSession,
impl<M> TextCompletionModelExt for Mwhere
M: CreateTextCompletionSession,
Source§fn complete(&self, text: impl ToString) -> TextCompletionBuilder<Self>where
Self: Clone,
fn complete(&self, text: impl ToString) -> TextCompletionBuilder<Self>where
Self: Clone,
Create a new text completion builder for this model. See
TextCompletionBuilder
for more details.Source§fn boxed_completion_model(self) -> BoxedTextCompletionModel
fn boxed_completion_model(self) -> BoxedTextCompletionModel
Erase the type of the text completion model. This can be used to make multiple implementations of
TextCompletionModel
compatible with the same type.Source§fn boxed_typed_completion_model<T>(
self,
) -> BoxedStructuredTextCompletionModel<T>where
Self: StructuredTextCompletionModel<Self::DefaultConstraints, Error: Send + Sync + Error + 'static, Session: TextCompletionSession<Error: Error + Send + Sync + 'static> + Clone + Send + Sync + 'static> + CreateDefaultCompletionConstraintsForType<T> + Sized + Send + Sync + 'static,
T: 'static,
fn boxed_typed_completion_model<T>(
self,
) -> BoxedStructuredTextCompletionModel<T>where
Self: StructuredTextCompletionModel<Self::DefaultConstraints, Error: Send + Sync + Error + 'static, Session: TextCompletionSession<Error: Error + Send + Sync + 'static> + Clone + Send + Sync + 'static> + CreateDefaultCompletionConstraintsForType<T> + Sized + Send + Sync + 'static,
T: 'static,
Erase the type of the structured text completion model. This can be used to make multiple implementations of
StructuredTextCompletionModel
compatible with the same type.