pub struct AIEnhancer {
pub endpoint: String,
pub model: String,
pub threshold: f64,
pub batch_size: usize,
pub timeout: u64,
}Expand description
Enhances ScannedModule metadata using a local SLM.
Configuration is read from environment variables or constructor parameters:
APCORE_AI_ENABLED: Enable enhancement (default: false).APCORE_AI_ENDPOINT: OpenAI-compatible API URL.APCORE_AI_MODEL: Model name.APCORE_AI_THRESHOLD: Confidence threshold (0.0–1.0).APCORE_AI_BATCH_SIZE: Modules per API call.APCORE_AI_TIMEOUT: Timeout in seconds per API call.
Fields§
§endpoint: String§model: String§threshold: f64§batch_size: usize§timeout: u64Implementations§
Source§impl AIEnhancer
impl AIEnhancer
Sourcepub fn new(
endpoint: Option<String>,
model: Option<String>,
threshold: Option<f64>,
batch_size: Option<usize>,
timeout: Option<u64>,
) -> Result<Self, AIEnhancerError>
pub fn new( endpoint: Option<String>, model: Option<String>, threshold: Option<f64>, batch_size: Option<usize>, timeout: Option<u64>, ) -> Result<Self, AIEnhancerError>
Create a new AIEnhancer with optional overrides.
Falls back to environment variables, then defaults.
Sourcepub fn is_enabled() -> bool
pub fn is_enabled() -> bool
Check whether AI enhancement is enabled via environment.
Trait Implementations§
Source§impl Debug for AIEnhancer
impl Debug for AIEnhancer
Source§impl Enhancer for AIEnhancer
impl Enhancer for AIEnhancer
Source§fn enhance(&self, modules: Vec<ScannedModule>) -> Vec<ScannedModule>
fn enhance(&self, modules: Vec<ScannedModule>) -> Vec<ScannedModule>
Enhance a list of ScannedModules by filling metadata gaps.
Auto Trait Implementations§
impl Freeze for AIEnhancer
impl RefUnwindSafe for AIEnhancer
impl Send for AIEnhancer
impl Sync for AIEnhancer
impl Unpin for AIEnhancer
impl UnsafeUnpin for AIEnhancer
impl UnwindSafe for AIEnhancer
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