pub struct ChatCompletionResponse {
pub id: String,
pub choices: Vec<ChatCompletionChoice>,
pub created: usize,
pub model: ChatCompleteModel,
pub system_fingerprint: Option<String>,
pub object: String,
pub usage: ChatCompleteUsage,
}
Fields§
§id: String
A 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: usize
The Unix timestamp (in seconds) of when the chat completion was created.
model: ChatCompleteModel
The 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: String
The object type, which is always chat.completion.
usage: ChatCompleteUsage
Usage statistics for the completion request.
Trait Implementations§
Source§impl Clone for ChatCompletionResponse
impl Clone for ChatCompletionResponse
Source§fn clone(&self) -> ChatCompletionResponse
fn clone(&self) -> ChatCompletionResponse
Returns a duplicate 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 ChatCompletionResponse
impl Debug for ChatCompletionResponse
Source§impl<'de> Deserialize<'de> for ChatCompletionResponse
impl<'de> Deserialize<'de> for ChatCompletionResponse
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 ChatCompletionResponse
impl RefUnwindSafe for ChatCompletionResponse
impl Send for ChatCompletionResponse
impl Sync for ChatCompletionResponse
impl Unpin for ChatCompletionResponse
impl UnwindSafe for ChatCompletionResponse
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