pub struct ConversationChainBuilder { /* private fields */ }Expand description
ConversationChain Builder.
Convenience builder for ConversationChain.
Implementations§
Source§impl ConversationChainBuilder
impl ConversationChainBuilder
Sourcepub fn new<L>(llm: L) -> Self
pub fn new<L>(llm: L) -> Self
Create a new ConversationChainBuilder with the given chat model.
Sourcepub fn memory<Mem: BaseMemory + 'static>(self, memory: Mem) -> Self
pub fn memory<Mem: BaseMemory + 'static>(self, memory: Mem) -> Self
Set the conversation memory.
Sourcepub fn system_prompt(self, prompt: impl Into<String>) -> Self
pub fn system_prompt(self, prompt: impl Into<String>) -> Self
Set the system prompt.
Sourcepub fn output_key(self, key: impl Into<String>) -> Self
pub fn output_key(self, key: impl Into<String>) -> Self
Set the output key.
Sourcepub fn build(self) -> ConversationChain
pub fn build(self) -> ConversationChain
Build the final ConversationChain.
Auto Trait Implementations§
impl !RefUnwindSafe for ConversationChainBuilder
impl !UnwindSafe for ConversationChainBuilder
impl Freeze for ConversationChainBuilder
impl Send for ConversationChainBuilder
impl Sync for ConversationChainBuilder
impl Unpin for ConversationChainBuilder
impl UnsafeUnpin for ConversationChainBuilder
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