pub struct ChunkResponse {
pub id: String,
pub choices: Vec<Choice>,
pub created: u64,
pub model: String,
pub system_fingerprint: Option<String>,
pub object: String,
pub service_tier: Option<ServiceTier>,
pub usage: Option<Usage>,
}
Fields§
§id: String
A unique identifier for the completion.
choices: Vec<Choice>
§created: u64
The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.
model: String
The model used for 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.chunk”
service_tier: Option<ServiceTier>
The service tier used for processing the request. This field is only included if the service_tier parameter is specified in the request.
usage: Option<Usage>
Usage statistics for the completion request. Note that usage statistics are only included in the final chunk.
Trait Implementations§
Source§impl Clone for ChunkResponse
impl Clone for ChunkResponse
Source§fn clone(&self) -> ChunkResponse
fn clone(&self) -> ChunkResponse
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 ChunkResponse
impl Debug for ChunkResponse
Source§impl Default for ChunkResponse
impl Default for ChunkResponse
Source§fn default() -> ChunkResponse
fn default() -> ChunkResponse
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ChunkResponse
impl<'de> Deserialize<'de> for ChunkResponse
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 ChunkResponse
impl PartialEq for ChunkResponse
Source§impl Serialize for ChunkResponse
impl Serialize for ChunkResponse
impl StructuralPartialEq for ChunkResponse
Auto Trait Implementations§
impl Freeze for ChunkResponse
impl RefUnwindSafe for ChunkResponse
impl Send for ChunkResponse
impl Sync for ChunkResponse
impl Unpin for ChunkResponse
impl UnwindSafe for ChunkResponse
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