pub struct Session {
pub session_id: String,
pub messages: Vec<ChatCompletionRequestMessage>,
pub turn_count: i64,
pub turns: Vec<SessionTurn>,
}Expand description
A conversation restored from Floopy’s stored logs.
messages is chronological (oldest → newest) and is a drop-in for the
messages of a follow-up chat().create(...) call.
Fields§
§session_id: StringThe session id.
messages: Vec<ChatCompletionRequestMessage>Reconstructed messages, oldest first.
turn_count: i64Number of stored turns that contributed to messages.
turns: Vec<SessionTurn>Stored turns that contributed to messages.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Session
impl<'de> Deserialize<'de> for Session
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 Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
impl UnwindSafe for Session
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