pub struct ChatCompletion {
pub id: String,
pub choices: Vec<Value>,
pub created: i64,
pub model: String,
pub object: String,
pub service_tier: Option<ChatCompletionServiceTier>,
pub system_fingerprint: Option<String>,
pub usage: Option<Value>,
}Expand description
Represents a chat completion response returned by model, based on the provided input.
Fields§
§id: StringA unique identifier for the chat completion.
choices: Vec<Value>A list of chat completion choices.
created: i64The Unix timestamp (in seconds) of when the chat completion was created.
model: StringThe model used for the chat completion.
object: StringThe object type, which is always chat.completion.
service_tier: Option<ChatCompletionServiceTier>Specifies the processing type used for serving the request.
system_fingerprint: Option<String>This fingerprint represents the backend configuration that the model runs with.
usage: Option<Value>Usage statistics for the completion request.
Trait Implementations§
Source§impl Clone for ChatCompletion
impl Clone for ChatCompletion
Source§fn clone(&self) -> ChatCompletion
fn clone(&self) -> ChatCompletion
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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
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 UnsafeUnpin 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