pub struct ChatCompletionRequestBuilder { /* private fields */ }
Implementations§
Source§impl ChatCompletionRequestBuilder
impl ChatCompletionRequestBuilder
pub fn with_reponse_format(self, format: ResponseType) -> Self
pub fn with_model(self, model: impl Into<String>) -> Self
pub fn with_messages(self, messages: impl IntoIterator<Item = Message>) -> Self
pub fn add_message(self, msg: Message) -> Self
pub fn with_tool(self, tool: impl Into<ToolCall>) -> Self
pub fn with_tools<T>(self, tools: impl IntoIterator<Item = T>) -> Self
pub fn add_tool(self, tool: impl Into<ToolCall>) -> Self
pub fn with_max_tokens(self, max_tokens: u64) -> Self
pub fn with_temperature(self, temperature: f64) -> Self
pub fn with_n(self, n: u64) -> Self
pub fn with_stream(self, stream: bool) -> Self
pub fn with_stop(self, rhs: Stop) -> Self
pub fn add_stop(self, rhs: Stop) -> Self
pub fn with_frequency_penalty(self, frequency_penalty: f64) -> Self
pub fn build(self) -> Result<ChatCompletionRequest>
Trait Implementations§
Source§impl Clone for ChatCompletionRequestBuilder
impl Clone for ChatCompletionRequestBuilder
Source§fn clone(&self) -> ChatCompletionRequestBuilder
fn clone(&self) -> ChatCompletionRequestBuilder
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 ChatCompletionRequestBuilder
impl Debug for ChatCompletionRequestBuilder
Source§impl Default for ChatCompletionRequestBuilder
impl Default for ChatCompletionRequestBuilder
Source§fn default() -> Self
fn default() -> Self
Return ChatCompletionRequestBuilder { model: Default::default(), messages: Default::default(), tools: Default::default(), max_tokens: Default::default(), temperature: Default::default(), top_p: Default::default(), n: Default::default(), stream: Default::default(), stop: Default::default(), frequency_penalty: Default::default(), response_format: Default::default() }
Auto Trait Implementations§
impl Freeze for ChatCompletionRequestBuilder
impl RefUnwindSafe for ChatCompletionRequestBuilder
impl Send for ChatCompletionRequestBuilder
impl Sync for ChatCompletionRequestBuilder
impl Unpin for ChatCompletionRequestBuilder
impl UnwindSafe for ChatCompletionRequestBuilder
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