pub struct CreateChatCompletionStreamResponse {
pub id: String,
pub choices: Vec<ChatCompletionStreamChoice>,
pub created: i64,
pub model: String,
pub system_fingerprint: Option<String>,
pub object: String,
pub usage: Option<CompletionUsage>,
}Expand description
The response from streaming content generation
Fields§
§id: StringA unique identifier for the chat completion. Each chunk has the same ID.
choices: Vec<ChatCompletionStreamChoice>A list of chat completion choices. Can contain more than one element if n is greater than 1.
created: i64The Unix timestamp (in seconds) of when the chat completion was created.
model: StringThe model used to generate the completion.
system_fingerprint: Option<String>This fingerprint represents the backend configuration that the model runs with.
object: StringThe object type, which is always “chat.completion.chunk”.
usage: Option<CompletionUsage>Usage statistics for the completion request.
Trait Implementations§
Source§impl Clone for CreateChatCompletionStreamResponse
impl Clone for CreateChatCompletionStreamResponse
Source§fn clone(&self) -> CreateChatCompletionStreamResponse
fn clone(&self) -> CreateChatCompletionStreamResponse
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<'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
Auto Trait Implementations§
impl Freeze for CreateChatCompletionStreamResponse
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