pub struct CompleteRequestBuilder { /* private fields */ }Expand description
Builder for CompleteRequest.
Implementations§
Source§impl CompleteRequestBuilder
impl CompleteRequestBuilder
Sourcepub fn prompt<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn prompt<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
The prompt to complete.
Sourcepub fn max_tokens_to_sample<VALUE: Into<usize>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn max_tokens_to_sample<VALUE: Into<usize>>( &mut self, value: VALUE, ) -> &mut Self
The number of tokens to sample.
Sourcepub fn stop_sequences<VALUE: Into<Vec<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn stop_sequences<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self
The stop sequences to use.
Sourcepub fn stream<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn stream<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Whether to incrementally stream the response.
Sourcepub fn build(&self) -> Result<CompleteRequest, AnthropicError>
pub fn build(&self) -> Result<CompleteRequest, AnthropicError>
Trait Implementations§
Source§impl Clone for CompleteRequestBuilder
impl Clone for CompleteRequestBuilder
Source§fn clone(&self) -> CompleteRequestBuilder
fn clone(&self) -> CompleteRequestBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompleteRequestBuilder
impl Debug for CompleteRequestBuilder
Auto Trait Implementations§
impl Freeze for CompleteRequestBuilder
impl RefUnwindSafe for CompleteRequestBuilder
impl Send for CompleteRequestBuilder
impl Sync for CompleteRequestBuilder
impl Unpin for CompleteRequestBuilder
impl UnwindSafe for CompleteRequestBuilder
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