pub struct Chat {Show 13 fields
pub model: String,
pub messages: Vec<Message>,
pub functions: Option<Vec<Function>>,
pub temperature: Option<f64>,
pub top_p: Option<f64>,
pub n: Option<i64>,
pub stream: Option<bool>,
pub stop: Option<String>,
pub max_tokens: Option<u64>,
pub presence_penalty: Option<f32>,
pub frequency_penalty: Option<f32>,
pub logit_bias: Option<HashMap<String, f32>>,
pub user: Option<String>,
}
Fields§
§model: String
§messages: Vec<Message>
§functions: Option<Vec<Function>>
§temperature: Option<f64>
§top_p: Option<f64>
§n: Option<i64>
§stream: Option<bool>
§stop: Option<String>
§max_tokens: Option<u64>
§presence_penalty: Option<f32>
§frequency_penalty: Option<f32>
§logit_bias: Option<HashMap<String, f32>>
§user: Option<String>
Implementations§
source§impl Chat
impl Chat
pub fn get_default_temperature() -> f64
pub fn get_default_max_tokens() -> u64
pub fn get_default_stream() -> bool
pub fn get_default_model() -> &'static str
Trait Implementations§
source§impl<'de> Deserialize<'de> for Chat
impl<'de> Deserialize<'de> for Chat
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for Chat
impl Send for Chat
impl Sync for Chat
impl Unpin for Chat
impl UnwindSafe for Chat
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