pub struct ChatCompletionResponse {
pub id: Option<String>,
pub object: Option<String>,
pub created: Option<u64>,
pub model: String,
pub choices: Vec<Choice>,
pub usage: Option<Usage>,
pub provider: Option<String>,
pub system_fingerprint: Option<String>,
}Expand description
Chat-completions response.
Fields§
§id: Option<String>Generation id. Optional because some providers omit it on streaming chunks that only carry tool-call deltas.
object: Option<String>Wire object discriminator (e.g. "chat.completion").
created: Option<u64>Unix-seconds timestamp of generation.
model: StringModel that produced the response.
choices: Vec<Choice>Generated choices.
usage: Option<Usage>Token usage accounting, when reported by the provider.
provider: Option<String>Provider that served the request.
system_fingerprint: Option<String>Provider-specific build / fingerprint identifier.
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 (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 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
Source§impl PartialEq for ChatCompletionResponse
impl PartialEq for ChatCompletionResponse
Source§impl Serialize for ChatCompletionResponse
impl Serialize for ChatCompletionResponse
impl StructuralPartialEq for ChatCompletionResponse
Auto Trait Implementations§
impl Freeze for ChatCompletionResponse
impl RefUnwindSafe for ChatCompletionResponse
impl Send for ChatCompletionResponse
impl Sync for ChatCompletionResponse
impl Unpin for ChatCompletionResponse
impl UnsafeUnpin 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