pub struct ConversationRecord {
pub id: String,
pub scope: ConversationScope,
pub role: String,
pub content: Value,
pub name: Option<String>,
pub tool_call_id: Option<String>,
pub sequence: i64,
pub created_at_ms: i64,
pub metadata: Value,
}Expand description
One durable conversation message.
content is a Value rather than a String because assistant turns carry
structured tool calls. Storing the real shape avoids a lossy round-trip
through a stringified envelope.
Fields§
§id: StringCaller supplied id. Used for idempotent append: re-sending the same id is a no-op, so a retry after a timeout cannot duplicate a turn.
scope: ConversationScope§role: Stringuser, assistant, tool, system, or event.
content: Value§name: Option<String>§tool_call_id: Option<String>§sequence: i64Monotonic order within a conversation. This value is assigned by the service; caller-provided values are ignored on the normal append path.
created_at_ms: i64§metadata: ValueTrait Implementations§
Source§impl Clone for ConversationRecord
impl Clone for ConversationRecord
Source§fn clone(&self) -> ConversationRecord
fn clone(&self) -> ConversationRecord
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 ConversationRecord
impl Debug for ConversationRecord
Source§impl<'de> Deserialize<'de> for ConversationRecord
impl<'de> Deserialize<'de> for ConversationRecord
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 ConversationRecord
impl PartialEq for ConversationRecord
Source§impl Serialize for ConversationRecord
impl Serialize for ConversationRecord
impl StructuralPartialEq for ConversationRecord
Auto Trait Implementations§
impl Freeze for ConversationRecord
impl RefUnwindSafe for ConversationRecord
impl Send for ConversationRecord
impl Sync for ConversationRecord
impl Unpin for ConversationRecord
impl UnsafeUnpin for ConversationRecord
impl UnwindSafe for ConversationRecord
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