pub enum BetaChatMessage {
System {
content: String,
name: Option<String>,
},
User {
content: String,
name: Option<String>,
},
Assistant {
content: Option<String>,
name: Option<String>,
prefix: bool,
reasoning_content: Option<String>,
tool_calls: Option<Vec<ToolCall>>,
},
Tool {
content: String,
tool_call_id: String,
},
}Expand description
Beta chat message variants.
Variants§
System
Fields
User
Fields
Assistant
Fields
§
name: Option<String>An optional name for the participant. Provides the model information to differentiate between participants of the same role.
§
prefix: bool(Beta) Set this to true to force the model to start its answer by the content of the supplied prefix in this assistant message.
You must set base_url="https://api.deepseek.com/beta" to use this feature.
§
reasoning_content: Option<String>(Beta) Used for the thinking mode in the Chat Prefix Completion
feature as the input for the CoT in the last assistant message.
When using this feature, the prefix parameter must be set to true.
Tool
Trait Implementations§
Source§impl Clone for BetaChatMessage
impl Clone for BetaChatMessage
Source§fn clone(&self) -> BetaChatMessage
fn clone(&self) -> BetaChatMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BetaChatMessage
impl Debug for BetaChatMessage
Source§impl<'de> Deserialize<'de> for BetaChatMessage
impl<'de> Deserialize<'de> for BetaChatMessage
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 Eq for BetaChatMessage
Source§impl PartialEq for BetaChatMessage
impl PartialEq for BetaChatMessage
Source§fn eq(&self, other: &BetaChatMessage) -> bool
fn eq(&self, other: &BetaChatMessage) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for BetaChatMessage
impl Serialize for BetaChatMessage
impl StructuralPartialEq for BetaChatMessage
Auto Trait Implementations§
impl Freeze for BetaChatMessage
impl RefUnwindSafe for BetaChatMessage
impl Send for BetaChatMessage
impl Sync for BetaChatMessage
impl Unpin for BetaChatMessage
impl UnsafeUnpin for BetaChatMessage
impl UnwindSafe for BetaChatMessage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.