pub struct ChatCompletion {
pub id: String,
pub choices: Vec<CompletionChoice>,
pub created: u64,
pub model: String,
pub object: String,
pub usage: Option<CompletionUsage>,
}
Fields§
§id: String
A unique identifier for the chat completion.
choices: Vec<CompletionChoice>
A list of chat completion choices. Can be more than one
if n
is greater than 1.
created: u64
The Unix timestamp (in seconds) of when the chat completion was created.
model: String
The model used for the chat completion.
object: String
The object type, which is always chat.completion
usage: Option<CompletionUsage>
Trait Implementations§
Source§impl Debug for ChatCompletion
impl Debug for ChatCompletion
Source§impl<'de> Deserialize<'de> for ChatCompletion
impl<'de> Deserialize<'de> for ChatCompletion
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 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