pub struct AppConfig {
pub embedding: Embedding,
pub reranker: Reranker,
}Expand description
Top-level application configuration containing both embedding and reranking settings.
This struct is designed to be deserialized from configuration files (JSON, YAML, TOML, etc.) and provides all necessary settings for both embedding and reranking services.
§Example
use seasoning::AppConfig;
use serde_json::json;
let config_json = json!({
"embedding": {
"url": "https://api.deepinfra.com/v1/openai",
"model": "Qwen/Qwen3-Embedding-0.6B",
"dialect": "deepinfra",
"timeout_seconds": 10,
"embedding_dim": 1024,
"requests_per_minute": 1000,
"max_concurrent_requests": 50,
"tokens_per_minute": 1000000
},
"reranker": {
"url": "https://api.deepinfra.com/v1",
"model": "Qwen/Qwen3-Reranker-0.6B",
"dialect": "deepinfra",
"timeout_seconds": 10,
"requests_per_minute": 1000,
"max_concurrent_requests": 50,
"tokens_per_minute": 1000000
}
});
let config: AppConfig = serde_json::from_value(config_json).unwrap();Fields§
§embedding: EmbeddingEmbedding service configuration
reranker: RerankerReranking service configuration
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AppConfig
impl<'de> Deserialize<'de> for AppConfig
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 AppConfig
impl RefUnwindSafe for AppConfig
impl Send for AppConfig
impl Sync for AppConfig
impl Unpin for AppConfig
impl UnsafeUnpin for AppConfig
impl UnwindSafe for AppConfig
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