pub struct ProxyRequestBuilder { /* private fields */ }Expand description
Fluent builder for ProxyRequest.
Implementations§
Source§impl ProxyRequestBuilder
impl ProxyRequestBuilder
pub fn new(model: impl Into<Model>) -> Self
pub fn max_tokens(self, max_tokens: i64) -> Self
pub fn temperature(self, temperature: f64) -> Self
pub fn message(self, role: MessageRole, content: impl Into<String>) -> Self
pub fn system(self, content: impl Into<String>) -> Self
pub fn user(self, content: impl Into<String>) -> Self
pub fn assistant(self, content: impl Into<String>) -> Self
pub fn messages(self, messages: Vec<ProxyMessage>) -> Self
pub fn metadata(self, metadata: HashMap<String, String>) -> Self
pub fn metadata_entry( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
pub fn response_format(self, response_format: ResponseFormat) -> Self
pub fn stop(self, stop: Vec<String>) -> Self
pub fn stop_sequences(self, stop_sequences: Vec<String>) -> Self
pub fn tools(self, tools: Vec<Tool>) -> Self
pub fn tool(self, tool: Tool) -> Self
pub fn function_tool( self, name: impl Into<String>, description: Option<String>, parameters: Option<Value>, ) -> Self
pub fn tool_choice(self, tool_choice: ToolChoice) -> Self
pub fn tool_choice_auto(self) -> Self
pub fn tool_choice_required(self) -> Self
pub fn tool_choice_none(self) -> Self
pub fn build(self) -> Result<ProxyRequest, Error>
Trait Implementations§
Source§impl Clone for ProxyRequestBuilder
impl Clone for ProxyRequestBuilder
Source§fn clone(&self) -> ProxyRequestBuilder
fn clone(&self) -> ProxyRequestBuilder
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 moreAuto Trait Implementations§
impl Freeze for ProxyRequestBuilder
impl RefUnwindSafe for ProxyRequestBuilder
impl Send for ProxyRequestBuilder
impl Sync for ProxyRequestBuilder
impl Unpin for ProxyRequestBuilder
impl UnwindSafe for ProxyRequestBuilder
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