Spaces:
Build error
Build error
use serde::{Deserialize, Serialize}; | |
pub struct InferenceConfig { | |
pub address: Option<String>, | |
pub timeout: u64, | |
pub token: Option<String>, | |
} | |
fn default_inference_timeout() -> u64 { | |
10 | |
} | |
impl InferenceConfig { | |
pub fn new(address: Option<String>) -> Self { | |
Self { | |
address, | |
timeout: default_inference_timeout(), | |
token: None, | |
} | |
} | |
} | |