1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! Knowledge base for document storage and retrieval.
//!
//! This module provides a simple knowledge base API for storing and searching documents.
//! It's designed for RAG (Retrieval-Augmented Generation) pipelines.
//!
//! # Example
//!
//! ```
//! use liteforge::knowledge::{LocalKnowledgeBackend, Document, SearchOptions, KnowledgeClient};
//!
//! #[tokio::main]
//! async fn main() {
//! // Create a local backend
//! let backend = LocalKnowledgeBackend::new();
//!
//! // Upload documents
//! let docs = vec![
//! Document::new("1", "Rust is a systems programming language"),
//! Document::new("2", "Python is great for data science"),
//! ];
//! backend.upload(docs).await.unwrap();
//!
//! // Search for documents
//! let results = backend.search("rust programming", SearchOptions::new().limit(5)).await.unwrap();
//! for result in results {
//! println!("Found: {} (score: {:.2})", result.document.id, result.score);
//! }
//! }
//! ```
pub use ;
pub use LocalKnowledgeBackend;
pub use ;