Struct oaapi::chat::ChatCompletionObject
source · pub struct ChatCompletionObject {
pub id: String,
pub choices: Vec<ChatCompletionChoice>,
pub created: u64,
pub model: ChatModel,
pub system_fingerprint: Option<String>,
pub object: String,
pub usage: Usage,
}Expand description
The chat completion object.
Fields§
§id: StringA unique identifier for the chat completion.
choices: Vec<ChatCompletionChoice>A list of chat completion choices. Can be more than one if n is greater than 1.
created: u64The Unix timestamp (in seconds) of when the chat completion was created.
model: ChatModelThe model used for the chat completion.
system_fingerprint: Option<String>This fingerprint represents the backend configuration that the model runs with.
Can be used in conjunction with the seed request parameter to understand when backend changes have been made that might impact determinism.
object: StringThe object type, which is always chat.completion.
usage: UsageUsage statistics for the completion request.
Trait Implementations§
source§impl Clone for ChatCompletionObject
impl Clone for ChatCompletionObject
source§fn clone(&self) -> ChatCompletionObject
fn clone(&self) -> ChatCompletionObject
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 ChatCompletionObject
impl Debug for ChatCompletionObject
source§impl<'de> Deserialize<'de> for ChatCompletionObject
impl<'de> Deserialize<'de> for ChatCompletionObject
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
source§impl Display for ChatCompletionObject
impl Display for ChatCompletionObject
source§impl PartialEq for ChatCompletionObject
impl PartialEq for ChatCompletionObject
source§fn eq(&self, other: &ChatCompletionObject) -> bool
fn eq(&self, other: &ChatCompletionObject) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for ChatCompletionObject
impl Serialize for ChatCompletionObject
impl StructuralPartialEq for ChatCompletionObject
Auto Trait Implementations§
impl RefUnwindSafe for ChatCompletionObject
impl Send for ChatCompletionObject
impl Sync for ChatCompletionObject
impl Unpin for ChatCompletionObject
impl UnwindSafe for ChatCompletionObject
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