pub struct ConversationTurn {
pub id: String,
pub timestamp_ms: u64,
pub role: String,
pub content: String,
pub tool_calls: Vec<ToolCallRecord>,
pub tags: Vec<String>,
pub metadata: HashMap<String, Value>,
}Expand description
A single conversation turn.
Fields§
§id: StringTurn ID (UUID).
timestamp_ms: u64Timestamp (milliseconds since epoch).
role: StringRole: “user”, “assistant”, or “system”.
content: StringContent text.
tool_calls: Vec<ToolCallRecord>Tool calls made in this turn.
Tags for search.
metadata: HashMap<String, Value>Arbitrary metadata.
Implementations§
Source§impl ConversationTurn
impl ConversationTurn
Adds tags.
Sourcepub fn with_tool_calls(self, calls: Vec<ToolCallRecord>) -> Self
pub fn with_tool_calls(self, calls: Vec<ToolCallRecord>) -> Self
Adds tool calls.
Trait Implementations§
Source§impl Clone for ConversationTurn
impl Clone for ConversationTurn
Source§fn clone(&self) -> ConversationTurn
fn clone(&self) -> ConversationTurn
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 ConversationTurn
impl Debug for ConversationTurn
Source§impl<'de> Deserialize<'de> for ConversationTurn
impl<'de> Deserialize<'de> for ConversationTurn
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 ConversationTurn
impl RefUnwindSafe for ConversationTurn
impl Send for ConversationTurn
impl Sync for ConversationTurn
impl Unpin for ConversationTurn
impl UnsafeUnpin for ConversationTurn
impl UnwindSafe for ConversationTurn
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