#[non_exhaustive]pub struct SessionContextOptions {
pub summary: bool,
pub limit_to_session: bool,
pub tokens: Option<u32>,
pub peer_target: Option<String>,
pub peer_perspective: Option<String>,
pub search_query: Option<String>,
pub search_top_k: Option<u32>,
pub search_max_distance: Option<f64>,
pub include_most_frequent: Option<bool>,
pub max_conclusions: Option<u32>,
}Expand description
Options for Session::context_with_options.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.summary: boolWhether to include the session summary.
limit_to_session: boolWhether to limit representation context to this session only.
tokens: Option<u32>Maximum number of tokens to include in the context.
peer_target: Option<String>A peer ID to get context for.
peer_perspective: Option<String>A peer ID to get context from the perspective of.
search_query: Option<String>A query string used to fetch semantically relevant conclusions.
search_top_k: Option<u32>Number of semantically relevant facts to return when searching.
search_max_distance: Option<f64>Maximum semantic distance for search results (0.0–1.0).
include_most_frequent: Option<bool>Whether to include the most frequent conclusions.
max_conclusions: Option<u32>Maximum number of conclusions to include.
Implementations§
Source§impl SessionContextOptions
impl SessionContextOptions
Sourcepub fn builder() -> SessionContextOptionsBuilder
pub fn builder() -> SessionContextOptionsBuilder
Create an instance of SessionContextOptions using the builder syntax
Source§impl SessionContextOptions
impl SessionContextOptions
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Validate cross-field constraints.
Enforces that peer_perspective and search_query each require
peer_target, that range-bounded numeric fields are in range, and that
tokens (when set) is non-zero.
Note: search_top_k and search_max_distance only take effect together
with search_query, and max_conclusions together with
include_most_frequent. They are intentionally NOT hard-rejected when
their companion is absent: the server ignores them in that case, and
rejecting locally would couple this client to server-side semantics that
may relax over time. Setting them without their companion is therefore a
no-op rather than an error.
Trait Implementations§
Source§impl Clone for SessionContextOptions
impl Clone for SessionContextOptions
Source§fn clone(&self) -> SessionContextOptions
fn clone(&self) -> SessionContextOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more