pub struct RequestBodyBuilder { /* private fields */ }
Implementations§
Source§impl RequestBodyBuilder
impl RequestBodyBuilder
pub fn new() -> Self
pub fn model(self, model: impl Into<String>) -> Self
pub fn messages(self, messages: Vec<Message>) -> Self
pub fn push_user_message(self, message: impl Into<String>) -> Self
pub fn push_system_message(self, message: impl Into<String>) -> Self
pub fn prepend_system_message(self, message: impl Into<String>) -> Self
pub fn frequency_penalty(self, frequency_penalty: f32) -> Self
pub fn logit_bias(self, logit_bias: HashMap<String, Value>) -> Self
pub fn logprobs(self, logprobs: bool) -> Self
pub fn top_logprobs(self, top_logprobs: u8) -> Self
pub fn max_completion_tokens(self, max_completion_tokens: u32) -> Self
pub fn reasoning_effort(self, reasoning_effort: ReasoningEffort) -> Self
pub fn n(self, n: u8) -> Self
pub fn presence_penalty(self, presence_penalty: f32) -> Self
pub fn response_format(self, response_format: ResponseFormat) -> Self
pub fn seed(self, seed: i64) -> Self
pub fn stop(self, stop: Stop) -> Self
pub fn stream(self, stream: bool) -> Self
pub fn temperature(self, temperature: f32) -> Self
pub fn top_p(self, top_p: f32) -> Self
pub fn tools(self, tools: Vec<Tool>) -> Self
pub fn tool_choice(self, tool_choice: ToolChoice) -> Self
pub fn user(self, user: impl Into<String>) -> Self
pub fn store(self, store: bool) -> Self
pub fn metadata(self, metadata: HashMap<String, Value>) -> Self
pub fn parallel_tool_calls(self, parallel_tool_calls: bool) -> Self
pub fn modalities(self, modalities: Vec<String>) -> Self
pub fn prediction(self, prediction: PredictionConfig) -> Self
pub fn audio(self, audio: AudioConfig) -> Self
pub fn service_tier(self, service_tier: String) -> Self
pub fn stream_options(self, stream_options: StreamOptions) -> Self
pub fn web_search_options(self, web_search_options: WebSearchOptions) -> Self
pub fn build(self) -> RequestBody
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RequestBodyBuilder
impl RefUnwindSafe for RequestBodyBuilder
impl Send for RequestBodyBuilder
impl Sync for RequestBodyBuilder
impl Unpin for RequestBodyBuilder
impl UnwindSafe for RequestBodyBuilder
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