pub struct ChatCompletionBuilder { /* private fields */ }Implementations§
Source§impl ChatCompletionBuilder
impl ChatCompletionBuilder
pub fn new(model: impl Into<String>) -> Self
pub fn message(self, role: Role, content: impl Into<String>) -> Self
pub fn system_message(self, content: impl Into<String>) -> Self
pub fn user_message(self, content: impl Into<String>) -> Self
pub fn assistant_message(self, content: impl Into<String>) -> Self
pub fn temperature(self, temp: f32) -> Self
pub fn top_p(self, top_p: f32) -> Self
pub fn max_tokens(self, max: u32) -> Self
pub fn stop(self, stop: Vec<String>) -> Self
pub fn stream(self, stream: bool) -> Self
pub fn tools(self, tools: Vec<Tool>) -> Self
pub fn response_format_json(self) -> Self
pub fn build(self) -> ChatCompletionRequest
Auto Trait Implementations§
impl Freeze for ChatCompletionBuilder
impl RefUnwindSafe for ChatCompletionBuilder
impl Send for ChatCompletionBuilder
impl Sync for ChatCompletionBuilder
impl Unpin for ChatCompletionBuilder
impl UnwindSafe for ChatCompletionBuilder
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