-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlib.rs
More file actions
78 lines (70 loc) · 2.03 KB
/
Copy pathlib.rs
File metadata and controls
78 lines (70 loc) · 2.03 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// Copyright (c) 2026 vectorless developers
// SPDX-License-Identifier: Apache-2.0
#![allow(dead_code)]
//! # Vectorless
//!
//! An ultra-performant reasoning-native document intelligence engine for AI.
//!
//! It transforms documents into rich semantic trees and uses LLMs to
//! intelligently traverse the hierarchy — retrieving the most relevant content
//! through structural reasoning and deep contextual understanding.
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use vectorless::{EngineBuilder, IndexContext, QueryContext};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let client = EngineBuilder::new()
//! .with_key("sk-...")
//! .with_model("gpt-4o")
//! .build()
//! .await?;
//!
//! let result = client.index(IndexContext::from_path("./document.md")).await?;
//! let doc_id = result.doc_id().unwrap();
//!
//! let result = client.query(
//! QueryContext::new("What is this about?").with_doc_ids(vec![doc_id.to_string()])
//! ).await?;
//! println!("{}", result.content);
//!
//! Ok(())
//! }
//! ```
pub mod client;
mod config;
pub mod document;
pub mod error;
pub mod events;
pub mod graph;
mod index;
mod llm;
mod memo;
pub mod metrics;
mod retrieval;
mod storage;
mod throttle;
mod utils;
// Client API
pub use client::{
BuildError, ClientError, DocumentFormat, DocumentInfo, Engine, EngineBuilder, FailedItem,
IndexContext, IndexItem, IndexMode, IndexOptions, IndexResult, QueryContext, QueryResult,
QueryResultItem,
};
// Error types
pub use error::{Error, Result};
// Document types
pub use document::{
DocumentStructure, DocumentTree, NodeId, ReasoningIndexConfig, StructureNode, TocConfig,
TocEntry, TocNode, TocView, TreeNode,
};
// Graph types
pub use graph::DocumentGraph;
// Event types
pub use events::{EventEmitter, IndexEvent, QueryEvent, WorkspaceEvent};
// Runtime metrics reports
pub use metrics::{
IndexMetrics, LlmMetricsReport, MetricsReport, PilotMetricsReport, RetrievalMetricsReport,
};