pub struct Delta {
pub role: Option<Role>,
pub content: Option<String>,
pub reasoning_content: Option<String>,
pub tool_calls: Option<Vec<ToolCall>>,
}Expand description
Message content in a completion response
Used for both streaming deltas and non-streaming response messages.
Fields§
§role: Option<Role>The role of the message author
content: Option<String>The content of the message
reasoning_content: Option<String>The reasoning content (for deepseek-reasoner model)
tool_calls: Option<Vec<ToolCall>>Tool calls made by the model
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Delta
impl<'de> Deserialize<'de> for Delta
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 Delta
impl RefUnwindSafe for Delta
impl Send for Delta
impl Sync for Delta
impl Unpin for Delta
impl UnsafeUnpin for Delta
impl UnwindSafe for Delta
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