pub struct OpenAIChatRequest {
pub model: String,
pub messages: Vec<OpenAIMessage>,
pub temperature: Option<f32>,
pub max_tokens: Option<u32>,
pub top_p: Option<f32>,
pub frequency_penalty: Option<f32>,
pub presence_penalty: Option<f32>,
pub stop: Vec<String>,
pub stream: Option<bool>,
pub tools: Option<Vec<OpenAITool>>,
pub tool_choice: Option<Value>,
pub user: Option<String>,
}
Expand description
OpenAI chat completion request.
Fields§
§model: String
§messages: Vec<OpenAIMessage>
§temperature: Option<f32>
§max_tokens: Option<u32>
§top_p: Option<f32>
§frequency_penalty: Option<f32>
§presence_penalty: Option<f32>
§stop: Vec<String>
§stream: Option<bool>
§tools: Option<Vec<OpenAITool>>
§tool_choice: Option<Value>
§user: Option<String>
Trait Implementations§
Source§impl Clone for OpenAIChatRequest
impl Clone for OpenAIChatRequest
Source§fn clone(&self) -> OpenAIChatRequest
fn clone(&self) -> OpenAIChatRequest
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 OpenAIChatRequest
impl Debug for OpenAIChatRequest
Auto Trait Implementations§
impl Freeze for OpenAIChatRequest
impl RefUnwindSafe for OpenAIChatRequest
impl Send for OpenAIChatRequest
impl Sync for OpenAIChatRequest
impl Unpin for OpenAIChatRequest
impl UnwindSafe for OpenAIChatRequest
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