pub struct Exchange<'a> {
pub user_text: &'a str,
pub assistant_reply: &'a str,
pub channel_id: Option<&'a str>,
pub already_stored: &'a [Fact],
pub nearby: &'a [Fact],
pub stated_at: DateTime<Utc>,
pub project: Option<(&'a ProjectNotes, &'a ProjectRef)>,
}Expand description
The exchange extraction reads, and where its facts are scoped.
Fields§
§user_text: &'a str§assistant_reply: &'a str§channel_id: Option<&'a str>§already_stored: &'a [Fact]Facts already written during this run (see owner_writes_during_run).
The model is shown them and must mark a proposal that restates one,
which is then not stored a second time. Empty for most runs.
nearby: &'a [Fact]Stored facts nearest the user’s message, as recall would show them in
this channel (never another scope’s). Shown beside already_stored
so a restatement or a correction is marked instead of stored again.
stated_at: DateTime<Utc>When the user’s message arrived: the evidence time of every fact proposed from it. A fact the owner deleted during this run is retired after it, so the retraction (“forget that my tea is oolong”) cannot store the fact it retracts.
project: Option<(&'a ProjectNotes, &'a ProjectRef)>The project the turn works in and where its notes are kept: what the
user says about the project goes to its notes instead of the store.
None on every other turn, which extracts exactly as before.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Forget for Exchange<'a>
impl<'a> Freeze for Exchange<'a>
impl<'a> Move for Exchange<'a>
impl<'a> RefUnwindSafe for Exchange<'a>
impl<'a> Send for Exchange<'a>
impl<'a> Sync for Exchange<'a>
impl<'a> Unpin for Exchange<'a>
impl<'a> UnsafeUnpin for Exchange<'a>where
&'a str: UnsafeUnpin,
&'a [Fact]: UnsafeUnpin,
NonZeroI32Inner: UnsafeUnpin,
Utc: UnsafeUnpin,
&'a ProjectNotes: UnsafeUnpin,
&'a ProjectRef: UnsafeUnpin,
impl<'a> UnwindSafe for Exchange<'a>where
&'a str: UnwindSafe,
&'a [Fact]: UnwindSafe,
NonZero<i32>: UnwindSafe,
Utc: UnwindSafe,
&'a ProjectNotes: UnwindSafe,
&'a ProjectRef: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more