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 ComposeSchema for CreateChatCompletionStreamResponse
Available on crate feature protocol-schema only.
impl ComposeSchema for CreateChatCompletionStreamResponse
Available on crate feature
protocol-schema only.Source§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
Source§impl ToSchema for CreateChatCompletionStreamResponse
Available on crate feature protocol-schema only.
impl ToSchema for CreateChatCompletionStreamResponse
Available on crate feature
protocol-schema only.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