Another remote for gh:zotero-rag/zotero-rag
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore!: remove unnecessary `ModelProvider::contains` functions

-38
-38
zqa-rag/src/capabilities.rs
··· 41 41 pub fn as_str(&self) -> &'static str { 42 42 ProviderId::from(self).as_str() 43 43 } 44 - 45 - /// Returns whether the provider is contained in the list of providers. 46 - #[must_use] 47 - pub fn contains(provider: &str) -> bool { 48 - [ 49 - ModelProvider::Anthropic.as_str(), 50 - ModelProvider::Ollama.as_str(), 51 - ModelProvider::OpenAI.as_str(), 52 - ModelProvider::OpenRouter.as_str(), 53 - ModelProvider::Gemini.as_str(), 54 - ] 55 - .contains(&provider) 56 - } 57 44 } 58 45 59 46 /// Providers of embedding models. Structs corresponding to these should implement LanceDB's ··· 82 69 #[must_use] 83 70 pub fn as_str(&self) -> &'static str { 84 71 ProviderId::from(self).as_str() 85 - } 86 - 87 - /// Returns whether the provider is contained in the list of providers. 88 - #[must_use] 89 - pub fn contains(provider: &str) -> bool { 90 - [ 91 - EmbeddingProvider::Cohere.as_str(), 92 - EmbeddingProvider::OpenAI.as_str(), 93 - EmbeddingProvider::Ollama.as_str(), 94 - EmbeddingProvider::VoyageAI.as_str(), 95 - EmbeddingProvider::Gemini.as_str(), 96 - EmbeddingProvider::ZeroEntropy.as_str(), 97 - ] 98 - .contains(&provider) 99 72 } 100 73 101 74 /// Returns the recommended chunking strategy for this provider. ··· 255 228 #[must_use] 256 229 pub fn as_str(&self) -> &'static str { 257 230 ProviderId::from(self).as_str() 258 - } 259 - 260 - /// Returns whether the provider is contained in the list of providers. 261 - #[must_use] 262 - pub fn contains(provider: &str) -> bool { 263 - [ 264 - RerankerProvider::Cohere.as_str(), 265 - RerankerProvider::VoyageAI.as_str(), 266 - RerankerProvider::ZeroEntropy.as_str(), 267 - ] 268 - .contains(&provider) 269 231 } 270 232 } 271 233