pub enum StreamingCompletionChunk {
Response(Box<ResponseChunk>),
Delta(ItemChunk),
}Expand description
A streaming completion chunk. Streaming chunks can come in one of two forms:
- A response chunk (where the completed response will have the total token usage)
- An item chunk commonly referred to as a delta. In the completions API this would be referred to as the message delta.
Variants§
Response(Box<ResponseChunk>)
Delta(ItemChunk)
Trait Implementations§
Source§impl Clone for StreamingCompletionChunk
impl Clone for StreamingCompletionChunk
Source§fn clone(&self) -> StreamingCompletionChunk
fn clone(&self) -> StreamingCompletionChunk
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StreamingCompletionChunk
impl Debug for StreamingCompletionChunk
Source§impl<'de> Deserialize<'de> for StreamingCompletionChunk
impl<'de> Deserialize<'de> for StreamingCompletionChunk
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StreamingCompletionChunk, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StreamingCompletionChunk, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for StreamingCompletionChunk
impl Serialize for StreamingCompletionChunk
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for StreamingCompletionChunk
impl RefUnwindSafe for StreamingCompletionChunk
impl Send for StreamingCompletionChunk
impl Sync for StreamingCompletionChunk
impl Unpin for StreamingCompletionChunk
impl UnwindSafe for StreamingCompletionChunk
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)