pub struct WebSearchPolicy {
pub enabled: bool,
pub provider: String,
pub default_count: u8,
pub cache_ttl_secs: u64,
pub expand_default: bool,
}Expand description
Per-agent / per-binding web-search policy. Mirrors the YAML shape
described in docs/src/ops/web-search.md. Lives here (not in the
nexo-web-search crate) so the policy stays a pure-config view
disconnected from HTTP / SQLite concerns.
Fields§
§enabled: bool§provider: String"auto" (default) lets the router auto-detect by credential;
"brave" / "tavily" / "duckduckgo" / "perplexity" pin
the provider. Empty string is treated as "auto".
default_count: u8Default count arg when the LLM omits it. Clamped 1..=10 by
the router.
cache_ttl_secs: u64Cache TTL in seconds. 0 disables.
expand_default: boolDefault value of the expand arg. When true, the router
fills body on the top hits via the LinkExtractor
(no-op when link understanding is off).
Trait Implementations§
Source§impl Clone for WebSearchPolicy
impl Clone for WebSearchPolicy
Source§fn clone(&self) -> WebSearchPolicy
fn clone(&self) -> WebSearchPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WebSearchPolicy
impl Debug for WebSearchPolicy
Source§impl Default for WebSearchPolicy
impl Default for WebSearchPolicy
Source§impl<'de> Deserialize<'de> for WebSearchPolicy
impl<'de> Deserialize<'de> for WebSearchPolicy
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 WebSearchPolicy
impl RefUnwindSafe for WebSearchPolicy
impl Send for WebSearchPolicy
impl Sync for WebSearchPolicy
impl Unpin for WebSearchPolicy
impl UnsafeUnpin for WebSearchPolicy
impl UnwindSafe for WebSearchPolicy
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
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<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>
Converts
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>
Converts
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