pub struct ModelSearchQuery {
pub query: String,
pub provider: Option<String>,
pub fuzzy: bool,
pub min_score: Option<f64>,
pub limit: Option<usize>,
pub min_context_length: Option<usize>,
pub max_context_length: Option<usize>,
pub min_output_tokens: Option<usize>,
pub max_output_tokens: Option<usize>,
pub capability_filter: Option<CapabilityFilter>,
}Expand description
Query for searching models by name or ID.
Fields§
§query: StringSearch text — model ID, display name, tag, or provider/model.
provider: Option<String>Restrict to one provider (canonical ID).
fuzzy: boolEnable fuzzy / similarity matching (default: exact + substring only).
min_score: Option<f64>Minimum score in [0.0, 1.0] (defaults: 0.80 exact mode, 0.55 fuzzy).
limit: Option<usize>Maximum number of results (default: 20).
min_context_length: Option<usize>Minimum input context window (tokens).
max_context_length: Option<usize>Maximum input context window (tokens).
min_output_tokens: Option<usize>Minimum max output tokens.
max_output_tokens: Option<usize>Maximum max output tokens.
capability_filter: Option<CapabilityFilter>Optional capability constraints (AND logic with name match).
Implementations§
Source§impl ModelSearchQuery
impl ModelSearchQuery
pub fn new(query: impl Into<String>) -> Self
pub fn fuzzy(self, enabled: bool) -> Self
pub fn with_provider(self, provider: impl Into<String>) -> Self
pub fn with_min_score(self, score: f64) -> Self
pub fn with_limit(self, limit: usize) -> Self
pub fn with_capability_filter(self, filter: CapabilityFilter) -> Self
pub fn with_min_context_length(self, tokens: usize) -> Self
pub fn with_max_context_length(self, tokens: usize) -> Self
pub fn with_min_output_tokens(self, tokens: usize) -> Self
pub fn with_max_output_tokens(self, tokens: usize) -> Self
Sourcepub fn effective_filter(&self) -> CapabilityFilter
pub fn effective_filter(&self) -> CapabilityFilter
Merge query-level length constraints with an optional capability filter.
Trait Implementations§
Source§impl Clone for ModelSearchQuery
impl Clone for ModelSearchQuery
Source§fn clone(&self) -> ModelSearchQuery
fn clone(&self) -> ModelSearchQuery
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 ModelSearchQuery
impl Debug for ModelSearchQuery
Source§impl Default for ModelSearchQuery
impl Default for ModelSearchQuery
Source§fn default() -> ModelSearchQuery
fn default() -> ModelSearchQuery
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ModelSearchQuery
impl<'de> Deserialize<'de> for ModelSearchQuery
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 ModelSearchQuery
impl RefUnwindSafe for ModelSearchQuery
impl Send for ModelSearchQuery
impl Sync for ModelSearchQuery
impl Unpin for ModelSearchQuery
impl UnsafeUnpin for ModelSearchQuery
impl UnwindSafe for ModelSearchQuery
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