pub struct SessionBuilder<'a> { /* private fields */ }Expand description
Builder for LanguageModelSession.
Implementations§
Source§impl<'a> SessionBuilder<'a>
impl<'a> SessionBuilder<'a>
Sourcepub const fn model(self, model: &'a ConfiguredSystemLanguageModel) -> Self
pub const fn model(self, model: &'a ConfiguredSystemLanguageModel) -> Self
Use a configured system model.
Sourcepub fn instructions<I>(self, instructions: I) -> Result<Self, FMError>where
I: ToInstructions,
pub fn instructions<I>(self, instructions: I) -> Result<Self, FMError>where
I: ToInstructions,
Set system instructions.
Sourcepub fn transcript(self, transcript: Transcript) -> Self
pub fn transcript(self, transcript: Transcript) -> Self
Restore the session from a transcript.
Sourcepub fn tools(self, tools: impl IntoIterator<Item = Tool>) -> Self
pub fn tools(self, tools: impl IntoIterator<Item = Tool>) -> Self
Add many tools.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for SessionBuilder<'a>
impl<'a> !Send for SessionBuilder<'a>
impl<'a> !Sync for SessionBuilder<'a>
impl<'a> !UnwindSafe for SessionBuilder<'a>
impl<'a> Freeze for SessionBuilder<'a>
impl<'a> Unpin for SessionBuilder<'a>
impl<'a> UnsafeUnpin for SessionBuilder<'a>
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