pub struct ToolSearch { /* private fields */ }Expand description
Model-adaptive tool-search capability configuration.
ToolSearch::automatic activates the existing auto_tool_search
implementation: models with native hosted search use it, and every other
model uses the provider-agnostic client-side search capability. The default
activation threshold is owned by that implementation.
The optional threshold and never_defer values map directly to the
existing built-in configuration. never_defer affects the generic fallback;
hosted providers continue to honor the deferrability policy on each tool.
Implementations§
Source§impl ToolSearch
impl ToolSearch
Sourcepub fn automatic() -> Self
pub fn automatic() -> Self
Select hosted tool search when the model supports it and the generic client-side implementation otherwise.
Sourcepub fn threshold(self, threshold: usize) -> Self
pub fn threshold(self, threshold: usize) -> Self
Override the minimum total tool count at which schemas are deferred.
Sourcepub fn never_defer<I, S>(self, names: I) -> Self
pub fn never_defer<I, S>(self, names: I) -> Self
Keep these tools’ full schemas visible under the generic fallback.
Names are validated with the same model-facing rules as ordinary
function tools when AgentBuilder::build
runs.
Trait Implementations§
Source§impl Clone for ToolSearch
impl Clone for ToolSearch
Source§fn clone(&self) -> ToolSearch
fn clone(&self) -> ToolSearch
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ToolSearch
impl Debug for ToolSearch
Source§impl Default for ToolSearch
impl Default for ToolSearch
Source§fn default() -> ToolSearch
fn default() -> ToolSearch
impl Eq for ToolSearch
Source§impl IntoCapability for ToolSearch
impl IntoCapability for ToolSearch
Source§fn into_capability(self) -> CapabilitySpec
fn into_capability(self) -> CapabilitySpec
Source§impl PartialEq for ToolSearch
impl PartialEq for ToolSearch
impl StructuralPartialEq for ToolSearch
Auto Trait Implementations§
impl Freeze for ToolSearch
impl RefUnwindSafe for ToolSearch
impl Send for ToolSearch
impl Sync for ToolSearch
impl Unpin for ToolSearch
impl UnsafeUnpin for ToolSearch
impl UnwindSafe for ToolSearch
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request