pub struct KnowledgeBase {
pub storage: Storage,
/* private fields */
}Fields§
§storage: StorageImplementations§
Source§impl KnowledgeBase
impl KnowledgeBase
Source§impl KnowledgeBase
impl KnowledgeBase
pub fn add( &self, content: &str, kind: &str, trigger_desc: Option<&str>, anti_trigger_desc: Option<&str>, source: &str, skill_name: Option<&str>, ) -> Result<String>
pub fn spark( &self, content: &str, trigger_desc: Option<&str>, anti_trigger_desc: Option<&str>, ) -> Result<String>
pub fn mature_spark(&self, spark_id: &str, to: &str) -> Result<()>
pub fn promote_spark(&self, spark_id: &str, to: &str) -> Result<String>
pub fn drop_spark(&self, spark_id: &str, reason: &str) -> Result<()>
pub fn approve(&self, chunk_id: &str) -> Result<()>
pub fn archive(&self, chunk_id: &str, reason: &str) -> Result<()>
pub fn invalidate(&self, chunk_id: &str, reason: &str) -> Result<()>
pub fn restore(&self, chunk_id: &str) -> Result<()>
Source§impl KnowledgeBase
impl KnowledgeBase
Source§impl KnowledgeBase
impl KnowledgeBase
pub fn record( &self, trace_id: &str, query: Option<&str>, output: Option<&str>, output_summary: Option<&str>, outcome: Option<&str>, used: Option<&[String]>, feedback_up: Option<&[String]>, feedback_down: Option<&[String]>, nomination: Option<&str>, priority: i64, source: &str, ) -> Result<()>
pub fn record_detailed( &self, trace_id: &str, query: Option<&str>, output: Option<&str>, output_summary: Option<&str>, outcome: Option<&str>, used: Option<&[String]>, used_attribution: &str, used_complete: bool, feedback_up: Option<&[String]>, feedback_down: Option<&[String]>, feedback_kind: &str, feedback_actor: Option<&str>, feedback_reason: Option<&str>, nomination: Option<&str>, priority: i64, task_state: Option<&str>, source: &str, ) -> Result<()>
Source§impl KnowledgeBase
impl KnowledgeBase
pub fn open(db_path: impl AsRef<Path>) -> Result<Self>
pub fn open_with( db_path: impl AsRef<Path>, embedding: Option<Arc<dyn EmbeddingProvider>>, refiner: Option<Arc<dyn Refiner>>, distiller: Option<Arc<dyn Distiller>>, curator: Option<Arc<dyn Curator>>, sanitizer: Option<Arc<dyn Sanitizer>>, ) -> Result<Self>
Auto Trait Implementations§
impl !Freeze for KnowledgeBase
impl !RefUnwindSafe for KnowledgeBase
impl !Sync for KnowledgeBase
impl !UnwindSafe for KnowledgeBase
impl Send for KnowledgeBase
impl Unpin for KnowledgeBase
impl UnsafeUnpin for KnowledgeBase
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