pub struct RecallArgs {
pub query: String,
pub scope: RecallScope,
pub about: Option<String>,
pub attribute: Option<String>,
}Expand description
Arguments to recall_context.
Fields§
§query: StringWhat to look for, in the user’s own terms.
scope: RecallScopeWhich slice of memory to search.
Every value is spelled out here rather than on the variants because
per-variant descriptions do not reach the model: narrowing the
derived schema to the API’s subset flattens oneOf-of-enum down to a
bare {"enum": [...]}, and the doc comment on each variant goes with
it. This field’s description is the only text the model actually reads
about what the values mean, so it carries all of it.
Omit unless the question is explicitly about one slice — narrowing
wrongly excludes the answer outright rather than ranking it lower, and
plausible records from the chosen slice arrive in its place. recent:
only memories with a time attached — things that happened, plans,
promises, commitments. persistent: only timeless facts — identity,
preferences, relationships, routines; excludes everything that happened
and every promise. all: everything, and the right choice by default.
about: Option<String>Whose fact this is.
Use a value from the memory map in your instructions, or omit it. This narrows nothing away — a record that does not match is ranked lower, not removed — so a wrong guess costs about one result, while a right one is worth several. Guessing is better than omitting.
Distinct from who the question mentions: “where am I collecting
Priya’s cake” is a fact about the user that mentions Priya, so about
is the user.
attribute: Option<String>Which attribute of them — for example a coffee order, a barber, an allergy.
Use a value from the memory map in your instructions, or omit it. Same
soft behaviour as about, and the more useful of the two.
Trait Implementations§
Source§impl Debug for RecallArgs
impl Debug for RecallArgs
Source§impl<'de> Deserialize<'de> for RecallArgs
impl<'de> Deserialize<'de> for RecallArgs
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>,
Source§impl JsonSchema for RecallArgs
impl JsonSchema for RecallArgs
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for RecallArgs
impl RefUnwindSafe for RecallArgs
impl Send for RecallArgs
impl Sync for RecallArgs
impl Unpin for RecallArgs
impl UnwindSafe for RecallArgs
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
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].