pub struct BoxedStructuredTextCompletionModel<T> { /* private fields */ }
Expand description
A boxed BoxedStructuredTextCompletionModel
.
Trait Implementations§
Source§impl<T: Clone> Clone for BoxedStructuredTextCompletionModel<T>
impl<T: Clone> Clone for BoxedStructuredTextCompletionModel<T>
Source§fn clone(&self) -> BoxedStructuredTextCompletionModel<T>
fn clone(&self) -> BoxedStructuredTextCompletionModel<T>
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<T> CreateTextCompletionSession for BoxedStructuredTextCompletionModel<T>
impl<T> CreateTextCompletionSession for BoxedStructuredTextCompletionModel<T>
Source§impl<T> StructuredTextCompletionModel<BoxedCompletionConstraintsForType<T>> for BoxedStructuredTextCompletionModel<T>
impl<T> StructuredTextCompletionModel<BoxedCompletionConstraintsForType<T>> for BoxedStructuredTextCompletionModel<T>
Source§fn stream_text_with_callback_and_parser<'a>(
&'a self,
session: &'a mut Self::Session,
text: &str,
sampler: GenerationParameters,
parser: BoxedCompletionConstraintsForType<T>,
on_token: impl FnMut(String) -> Result<(), Self::Error> + Send + Sync + 'static,
) -> impl Future<Output = Result<T, Self::Error>> + Send + 'a
fn stream_text_with_callback_and_parser<'a>( &'a self, session: &'a mut Self::Session, text: &str, sampler: GenerationParameters, parser: BoxedCompletionConstraintsForType<T>, on_token: impl FnMut(String) -> Result<(), Self::Error> + Send + Sync + 'static, ) -> impl Future<Output = Result<T, Self::Error>> + Send + 'a
Generate text with the given prompt and the given constraints. Read more
Source§impl<T> TextCompletionModel for BoxedStructuredTextCompletionModel<T>
impl<T> TextCompletionModel for BoxedStructuredTextCompletionModel<T>
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<T> Freeze for BoxedStructuredTextCompletionModel<T>
impl<T> !RefUnwindSafe for BoxedStructuredTextCompletionModel<T>
impl<T> Send for BoxedStructuredTextCompletionModel<T>
impl<T> Sync for BoxedStructuredTextCompletionModel<T>
impl<T> Unpin for BoxedStructuredTextCompletionModel<T>
impl<T> !UnwindSafe for BoxedStructuredTextCompletionModel<T>
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.