pub struct BoxedCompletionConstraintsForType<T> { /* private fields */ }
Expand description
A constraints for CreateDefaultCompletionConstraintsForType
that work with boxed TextCompletionModel
s.
Trait Implementations§
Source§impl<T> ModelConstraints for BoxedCompletionConstraintsForType<T>
impl<T> ModelConstraints for BoxedCompletionConstraintsForType<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
Auto Trait Implementations§
impl<T> Freeze for BoxedCompletionConstraintsForType<T>
impl<T> RefUnwindSafe for BoxedCompletionConstraintsForType<T>where
T: RefUnwindSafe,
impl<T> Send for BoxedCompletionConstraintsForType<T>where
T: Send,
impl<T> Sync for BoxedCompletionConstraintsForType<T>where
T: Sync,
impl<T> Unpin for BoxedCompletionConstraintsForType<T>where
T: Unpin,
impl<T> UnwindSafe for BoxedCompletionConstraintsForType<T>where
T: UnwindSafe,
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