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
38
39
40
41
42
43
44
45
46
47
48
49
50
//! # Polymathy
//! A high-performance web service that processes search queries, retrieves relevant content,
//! and performs semantic chunking and embedding operations.
//!
//! ## Overview
//!
//! Polymathy is a Rust library that provides functionality for:
//! - Processing search queries through SearxNG integration
//! - Retrieving and processing web content
//! - Performing semantic chunking of content
//! - Generating embeddings for content chunks
//! - Indexing content with vector similarity search
//!
//! ## Features
//!
//! - **Search Processing**: Handles search queries through SearxNG integration
//! - **Content Processing**: Chunks content and generates embeddings
//! - **Vector Indexing**: Manages similarity search using USearch
//! - **Concurrent Processing**: Processes multiple URLs simultaneously using Tokio
//! - **OpenAPI Documentation**: Built-in API documentation with multiple UI options
//!
//! ## Usage
//!
//! Add this to your `Cargo.toml`:
//! ```toml
//! [dependencies]
//! polymathy = { path = "." }
//! ```
//!
//! Then use it in your code:
//! ```rust
//! use polymathy::run;
//!
//! #[tokio::main]
//! async fn main() -> std::io::Result<()> {
//! run().await
//! }
//! ```
//!
//! ## Modules
//!
//! - [`search`]: Handles search query processing and data structures
//! - [`index`]: Manages vector indexing with USearch
//! - [`api`]: Defines API endpoints and server implementation
pub use run;