pub struct ChatCompletion {
pub model: String,
pub messages: Vec<Message>,
pub temperature: f32,
}
Expand description
Represents the payload for a chat completion request, including the model, messages, and temperature.
§Fields
model
: The identifier of the language model to be used (e.g., “gpt-4”).message
: The collection of messages in the conversation.temperature
: The randomness level for the model’s output (higher values lead to more varied responses).
Fields§
§model: String
§messages: Vec<Message>
§temperature: f32
Trait Implementations§
source§impl Clone for ChatCompletion
impl Clone for ChatCompletion
source§fn clone(&self) -> ChatCompletion
fn clone(&self) -> ChatCompletion
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 moresource§impl Debug for ChatCompletion
impl Debug for ChatCompletion
Auto Trait Implementations§
impl Freeze for ChatCompletion
impl RefUnwindSafe for ChatCompletion
impl Send for ChatCompletion
impl Sync for ChatCompletion
impl Unpin for ChatCompletion
impl UnwindSafe for ChatCompletion
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)