pub struct ChatBuilder<CP, Output = Unstructured>where
CP: CompletionProvider,{ /* private fields */ }Implementations§
Source§impl<CP> ChatBuilder<CP>where
CP: CompletionProvider,
impl<CP> ChatBuilder<CP>where
CP: CompletionProvider,
pub fn new() -> ChatBuilder<CP>
pub fn with_structured_output<T>(self) -> ChatBuilder<CP, Structured<T>>where
T: JsonSchema + DeserializeOwned,
pub fn with_embeddings(self) -> ChatBuilder<CP, Embedded>
Source§impl<CP, Output> ChatBuilder<CP, Output>where
CP: CompletionProvider,
impl<CP, Output> ChatBuilder<CP, Output>where
CP: CompletionProvider,
pub fn with_max_steps(self, max_steps: u16) -> ChatBuilder<CP, Output>
pub fn with_max_retries(self, max_retries: u16) -> ChatBuilder<CP, Output>
pub fn with_tools(self, tools: ToolCollection) -> ChatBuilder<CP, Output>
pub fn with_retry_strategy( self, retry_strategy: Box<dyn Fn(&mut Messages, Option<&Metadata>, CallbackRetryContext) -> Pin<Box<dyn Future<Output = ()> + Send>> + Sync + Send>, ) -> ChatBuilder<CP, Output>
pub fn with_model(self, model: CP) -> ChatBuilder<CP, Output>
pub fn with_options(self, options: ChatOptions) -> ChatBuilder<CP, Output>
pub fn build(self) -> Chat<CP, Output>
Trait Implementations§
Source§impl<CP> Default for ChatBuilder<CP>where
CP: CompletionProvider,
impl<CP> Default for ChatBuilder<CP>where
CP: CompletionProvider,
Source§fn default() -> ChatBuilder<CP>
fn default() -> ChatBuilder<CP>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<CP, Output> Freeze for ChatBuilder<CP, Output>where
CP: Freeze,
impl<CP, Output = Unstructured> !RefUnwindSafe for ChatBuilder<CP, Output>
impl<CP, Output> Send for ChatBuilder<CP, Output>where
Output: Send,
impl<CP, Output> Sync for ChatBuilder<CP, Output>where
Output: Sync,
impl<CP, Output> Unpin for ChatBuilder<CP, Output>
impl<CP, Output> UnsafeUnpin for ChatBuilder<CP, Output>where
CP: UnsafeUnpin,
impl<CP, Output = Unstructured> !UnwindSafe for ChatBuilder<CP, Output>
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