pub struct KnowledgeBaseConfig {
pub dimensions: usize,
pub storage_path: String,
pub learning_enabled: bool,
pub learning_rate: f32,
pub hnsw_m: usize,
pub hnsw_ef_construction: usize,
pub hnsw_ef_search: usize,
pub batch_size: usize,
}Expand description
Configuration for the knowledge base.
Fields§
§dimensions: usizeEmbedding dimension size.
storage_path: StringPath to storage file.
learning_enabled: boolEnable self-learning features.
learning_rate: f32Learning rate for GNN updates.
hnsw_m: usizeNumber of HNSW neighbors (M parameter).
hnsw_ef_construction: usizeHNSW ef_construction parameter.
hnsw_ef_search: usizeHNSW ef_search parameter.
batch_size: usizeBatch size for bulk operations.
Implementations§
Source§impl KnowledgeBaseConfig
impl KnowledgeBaseConfig
Sourcepub fn with_path(self, path: impl Into<String>) -> Self
pub fn with_path(self, path: impl Into<String>) -> Self
Create config with custom storage path.
Sourcepub fn with_dimensions(self, dims: usize) -> Self
pub fn with_dimensions(self, dims: usize) -> Self
Set embedding dimensions.
Sourcepub fn without_learning(self) -> Self
pub fn without_learning(self) -> Self
Disable learning features.
Trait Implementations§
Source§impl Clone for KnowledgeBaseConfig
impl Clone for KnowledgeBaseConfig
Source§fn clone(&self) -> KnowledgeBaseConfig
fn clone(&self) -> KnowledgeBaseConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 KnowledgeBaseConfig
impl Debug for KnowledgeBaseConfig
Source§impl Default for KnowledgeBaseConfig
impl Default for KnowledgeBaseConfig
Source§impl<'de> Deserialize<'de> for KnowledgeBaseConfig
impl<'de> Deserialize<'de> for KnowledgeBaseConfig
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 KnowledgeBaseConfig
impl RefUnwindSafe for KnowledgeBaseConfig
impl Send for KnowledgeBaseConfig
impl Sync for KnowledgeBaseConfig
impl Unpin for KnowledgeBaseConfig
impl UnsafeUnpin for KnowledgeBaseConfig
impl UnwindSafe for KnowledgeBaseConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request