pub enum ContextFormat {
QAPairs,
List,
Sentence,
Custom(Box<dyn Fn(&[(String, ResponseFormat)]) -> String + Send + Sync>),
}Expand description
Configurable context formatting strategies
Variants§
QAPairs
Format: “Q: question A: answer Q: question A: answer …”
List
Format: “[question -> answer, question -> answer, …]”
Sentence
Format: “Previous questions and answers: question - answer; question - answer; …”
Custom(Box<dyn Fn(&[(String, ResponseFormat)]) -> String + Send + Sync>)
Custom format with formatting function
Trait Implementations§
Source§impl Default for ContextFormat
impl Default for ContextFormat
Source§fn default() -> ContextFormat
fn default() -> ContextFormat
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ContextFormat
impl !RefUnwindSafe for ContextFormat
impl Send for ContextFormat
impl Sync for ContextFormat
impl Unpin for ContextFormat
impl UnsafeUnpin for ContextFormat
impl !UnwindSafe for ContextFormat
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