pub struct StreamDelta {
pub role: Option<Role>,
pub content: Option<String>,
pub tool_calls: Option<Vec<ToolCall>>,
}Expand description
OpenAI流式响应的增量内容
Fields§
§role: Option<Role>§content: Option<String>§tool_calls: Option<Vec<ToolCall>>Trait Implementations§
Source§impl Clone for StreamDelta
impl Clone for StreamDelta
Source§fn clone(&self) -> StreamDelta
fn clone(&self) -> StreamDelta
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 Debug for StreamDelta
impl Debug for StreamDelta
Source§impl<'de> Deserialize<'de> for StreamDelta
impl<'de> Deserialize<'de> for StreamDelta
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
Source§impl PartialEq for StreamDelta
impl PartialEq for StreamDelta
Source§impl Serialize for StreamDelta
impl Serialize for StreamDelta
impl StructuralPartialEq for StreamDelta
Auto Trait Implementations§
impl Freeze for StreamDelta
impl RefUnwindSafe for StreamDelta
impl Send for StreamDelta
impl Sync for StreamDelta
impl Unpin for StreamDelta
impl UnwindSafe for StreamDelta
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