pub struct CreateChatCompletionStreamResponse {
pub id: String,
pub choices: Vec<ChatChoiceStream>,
pub created: u32,
pub model: String,
pub system_fingerprint: Option<String>,
pub object: String,
}
Expand description
Represents a streamed chunk of a chat completion response returned by model, based on the provided input.
Fields§
§id: String
A unique identifier for the chat completion. Each chunk has the same ID.
choices: Vec<ChatChoiceStream>
A list of chat completion choices. Can be more than one if n
is greater than 1.
created: u32
The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.
model: String
The model to generate the 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
.
Trait Implementations§
source§impl Clone for CreateChatCompletionStreamResponse
impl Clone for CreateChatCompletionStreamResponse
source§fn clone(&self) -> CreateChatCompletionStreamResponse
fn clone(&self) -> CreateChatCompletionStreamResponse
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<'de> Deserialize<'de> for CreateChatCompletionStreamResponse
impl<'de> Deserialize<'de> for CreateChatCompletionStreamResponse
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 CreateChatCompletionStreamResponse
impl PartialEq for CreateChatCompletionStreamResponse
source§fn eq(&self, other: &CreateChatCompletionStreamResponse) -> bool
fn eq(&self, other: &CreateChatCompletionStreamResponse) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CreateChatCompletionStreamResponse
Auto Trait Implementations§
impl RefUnwindSafe for CreateChatCompletionStreamResponse
impl Send for CreateChatCompletionStreamResponse
impl Sync for CreateChatCompletionStreamResponse
impl Unpin for CreateChatCompletionStreamResponse
impl UnwindSafe for CreateChatCompletionStreamResponse
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