Struct openai_rust::chat::ChatArguments
source · pub struct ChatArguments {
pub model: String,
pub messages: Vec<Message>,
pub temperature: Option<f32>,
pub top_p: Option<f32>,
pub n: Option<u32>,
pub stream: Option<bool>,
pub stop: Option<String>,
pub max_tokens: Option<u32>,
pub presence_penalty: Option<f32>,
pub frequency_penalty: Option<f32>,
pub user: Option<String>,
}
Expand description
Request arguments for chat completion.
See https://platform.openai.com/docs/api-reference/chat/create.
let args = openai_rust::chat::ChatArguments::new("gpt-3.5-turbo", vec![
openai_rust::chat::Message {
role: "user".to_owned(),
content: "Hello GPT!".to_owned(),
}
]);
Fields§
§model: String
§messages: Vec<Message>
§temperature: Option<f32>
§top_p: Option<f32>
§n: Option<u32>
§stream: Option<bool>
§stop: Option<String>
§max_tokens: Option<u32>
§presence_penalty: Option<f32>
§frequency_penalty: Option<f32>
§user: Option<String>
Implementations§
source§impl ChatArguments
impl ChatArguments
Trait Implementations§
source§impl Clone for ChatArguments
impl Clone for ChatArguments
source§fn clone(&self) -> ChatArguments
fn clone(&self) -> ChatArguments
Returns a copy 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 more