pub struct SearchConfig {
pub provider: Option<SearchProvider>,
pub base_url: Option<String>,
pub api_key: Option<String>,
pub native: Option<bool>,
}Expand description
Web search provider configuration ([search] table in config.toml).
Fields§
§provider: Option<SearchProvider>Search provider. Default: keyless firecrawl.
base_url: Option<String>Optional search endpoint. With duckduckgo, this is a
DuckDuckGo-compatible HTML endpoint. With searxng, this is the trusted
SearXNG instance root or /search endpoint.
api_key: Option<String>Optional for Firecrawl; required for Tavily, Bocha, Metaso, Baidu, Volcengine, Sofya, Serply, DeepSeek, or SearchApi.
Metaso also falls back to the METASO_API_KEY env var.
Baidu also falls back to BAIDU_SEARCH_API_KEY env var.
Serply also falls back to the SERPLY_API_KEY env var.
SearchApi also falls back to the SEARCHAPI_API_KEY env var.
Volcengine also falls back to VOLCENGINE_API_KEY / VOLCENGINE_ARK_API_KEY / ARK_API_KEY env vars.
This slot is shared across providers. TAVILY_API_KEY is not
merged into it — Tavily reads its dedicated env at request time
(tavily_key_from) so pinning another provider never forwards a
Tavily key, and a tvly- value here can autodetect Tavily without a
disk write.
native: Option<bool>Whether the active route’s provider-native search runs ahead of the
search provider. Unset: native search leads only when no provider is
configured, so a pinned provider always wins; see
crate::config::Config::search_native.
Trait Implementations§
Source§impl Clone for SearchConfig
impl Clone for SearchConfig
Source§impl Debug for SearchConfig
impl Debug for SearchConfig
Source§impl Default for SearchConfig
impl Default for SearchConfig
Source§impl<'de> Deserialize<'de> for SearchConfig
impl<'de> Deserialize<'de> for SearchConfig
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>,
Auto Trait Implementations§
impl Forget for SearchConfig
impl Freeze for SearchConfig
impl Move for SearchConfig
impl RefUnwindSafe for SearchConfig
impl Send for SearchConfig
impl Sync for SearchConfig
impl Unpin for SearchConfig
impl UnsafeUnpin for SearchConfig
impl UnwindSafe for SearchConfig
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<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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.