pub struct PriorExchange {
pub user: String,
pub assistant: Option<String>,
}Expand description
An exchange that already happened in this conversation.
The assistant’s side is optional because the interesting histories are the ones that end badly: a question nobody answered, a turn that died. A corpus that could only describe well-formed pairs could not seed the conversation a user is actually annoyed about.
Fields§
§user: StringWhat the person said.
assistant: Option<String>What the assistant answered, when it answered.
Trait Implementations§
Source§impl Clone for PriorExchange
impl Clone for PriorExchange
Source§impl Debug for PriorExchange
impl Debug for PriorExchange
Source§impl<'de> Deserialize<'de> for PriorExchange
impl<'de> Deserialize<'de> for PriorExchange
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 PriorExchange
Source§impl PartialEq for PriorExchange
impl PartialEq for PriorExchange
Source§impl Serialize for PriorExchange
impl Serialize for PriorExchange
impl StructuralPartialEq for PriorExchange
Auto Trait Implementations§
impl Freeze for PriorExchange
impl RefUnwindSafe for PriorExchange
impl Send for PriorExchange
impl Sync for PriorExchange
impl Unpin for PriorExchange
impl UnsafeUnpin for PriorExchange
impl UnwindSafe for PriorExchange
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.