pub struct CreateChatCompletionStreamResponse {
pub id: String,
pub choices: Vec<ChatChoiceStream>,
pub created: u32,
pub model: String,
pub service_tier: Option<ServiceTierResponse>,
pub system_fingerprint: Option<String>,
pub object: String,
pub usage: Option<CompletionUsage>,
}Expand description
Streaming chat completion response with extended choices.
service_tier, system_fingerprint, and usage are optional in the
spec and omitted (not serialized as null) when absent. Note: with
stream_options.include_usage, OpenAI emits "usage": null on every
chunk before the final one; callers needing that exact shape must
inject the key at the HTTP boundary.
Fields§
§id: String§choices: Vec<ChatChoiceStream>§created: u32§model: String§service_tier: Option<ServiceTierResponse>§system_fingerprint: Option<String>§object: String§usage: Option<CompletionUsage>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 (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<'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
impl StructuralPartialEq for CreateChatCompletionStreamResponse
Auto Trait Implementations§
impl Freeze for CreateChatCompletionStreamResponse
impl RefUnwindSafe for CreateChatCompletionStreamResponse
impl Send for CreateChatCompletionStreamResponse
impl Sync for CreateChatCompletionStreamResponse
impl Unpin for CreateChatCompletionStreamResponse
impl UnsafeUnpin 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