pub struct ChatChunk {
pub content: String,
pub is_final: bool,
pub metadata: Option<ChatResultMetadata>,
}Expand description
A chunk of output from streaming.
Fields§
§content: StringThe content delta.
is_final: boolWhether this is the final chunk.
metadata: Option<ChatResultMetadata>Metadata (only present on final chunk).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ChatChunk
impl<'de> Deserialize<'de> for ChatChunk
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 ChatChunk
impl RefUnwindSafe for ChatChunk
impl Send for ChatChunk
impl Sync for ChatChunk
impl Unpin for ChatChunk
impl UnwindSafe for ChatChunk
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