#![cfg_attr(docsrs, feature(doc_cfg))]
#![doc = include_str!("../README.md")]
#![warn(missing_docs)]
#![deny(rustdoc::broken_intra_doc_links)]
#![warn(clippy::all)]
#![warn(clippy::pedantic)]
#![allow(clippy::module_name_repetitions)]
#![allow(clippy::too_many_arguments)]
#![allow(clippy::must_use_candidate)]
#![allow(dead_code)]
pub mod agent;
pub mod document;
pub mod embeddings;
pub mod error;
pub mod memory;
pub mod pipeline;
pub mod retrieval_core;
pub mod storage;
pub mod streaming;
pub mod system;
pub mod tools;
#[path = "retrieval/mod.rs"]
pub mod retrieval_enhanced;
pub mod query;
pub mod reranking;
pub mod evaluation;
pub mod caching;
pub mod multimodal;
pub mod graph_retrieval;
pub mod incremental;
pub mod observability;
pub use agent::{AgentBuilder, AgentConfig, AgentResponse, ModelConfig, RragAgent, ToolCall};
pub use document::{ChunkingStrategy, Document, DocumentChunk, DocumentChunker, Metadata};
pub use embeddings::{
Embedding, EmbeddingBatch, EmbeddingProvider, EmbeddingRequest, EmbeddingService,
LocalEmbeddingProvider, MockEmbeddingService, OpenAIEmbeddingProvider,
};
pub use error::{ErrorSeverity, RragError, RragResult};
pub use memory::{
ConversationBufferMemory, ConversationMessage, ConversationSummaryMemory,
ConversationTokenBufferMemory, Memory, MemoryService, MessageRole,
};
pub use pipeline::{
DocumentChunkingStep, EmbeddingStep, Pipeline, PipelineConfig, PipelineContext, PipelineData,
PipelineStep, RagPipelineBuilder, RetrievalStep, TextOperation, TextPreprocessingStep,
};
pub use retrieval_core::{
InMemoryRetriever, RetrievalService, Retriever, SearchAlgorithm, SearchConfig, SearchQuery,
SearchResult,
};
pub use retrieval_enhanced::{
BM25Config, BM25Retriever, FusionStrategy, HybridConfig, HybridRetriever, RankFusion,
ReciprocalRankFusion, SemanticConfig, SemanticRetriever, TokenizerType, WeightedFusion,
};
pub use storage::{
FileStorage, InMemoryStorage, Storage, StorageEntry, StorageKey, StorageQuery, StorageService,
};
pub use streaming::{StreamToken, StreamingResponse, TokenStreamBuilder, TokenType};
pub use system::{
ChatResponse, HealthCheckResult, ProcessingResult, RragSystem, RragSystemBuilder,
RragSystemConfig, SearchResponse, SystemMetrics,
};
#[cfg(feature = "http")]
pub use tools::HttpTool;
pub use tools::{Calculator, EchoTool, Tool, ToolRegistry, ToolResult};
#[cfg(feature = "rsllm-client")]
pub use rsllm;
pub use graph_retrieval::{
EdgeType, Entity, EntityExtractor, EntityType, ExpansionResult, ExpansionStrategy,
GraphAlgorithms, GraphBuildConfig, GraphConfig, GraphConfigBuilder, GraphEdge, GraphIndex,
GraphMetrics, GraphNode, GraphQuery, GraphQueryResult, GraphRetrievalBuilder,
GraphRetrievalConfig, GraphRetriever, GraphStorage, KnowledgeGraph, NodeType, PageRankConfig,
PathFindingConfig, QueryExpander, RelationType, Relationship, TraversalConfig,
};
pub use incremental::{
AlertConfig, BatchConfig, BatchExecutor, BatchOperation, BatchProcessingStats, BatchProcessor,
BatchResult, ChangeDetectionConfig, ChangeDetector, ChangeResult, ChangeType,
ConflictResolution, ConsistencyReport, ContentDelta, DocumentChange, DocumentVersion,
EmbeddingUpdate, HealthMetrics, IncrementalIndexManager, IncrementalIndexingService,
IncrementalMetrics, IncrementalServiceBuilder, IncrementalServiceConfig, IndexManagerConfig,
IndexOperation, IndexUpdate, IndexUpdateStrategy, IndexingStats, IntegrityChecker,
IntegrityConfig, IntegrityError, MetricsCollector, MonitoringConfig, OperationLog,
PerformanceTracker, QueueManager, RecoveryResult, RollbackConfig, RollbackManager,
RollbackOperation, RollbackPoint, UpdateResult, ValidationResult, VectorBatch, VectorOperation,
VectorUpdateConfig, VectorUpdateManager, VersionConflict, VersionHistory, VersionManager,
VersionResolution, VersioningConfig,
};
pub use observability::{
AlertCondition, AlertManager, AlertNotification, AlertRule, AlertSeverity, BottleneckAnalysis,
ComponentStatus, DashboardConfig, DashboardServer, DataRetention, ExportFormat, ExportManager,
HealthChecker, HealthReport, HistoricalAnalyzer, LogAggregator, LogEntry, LogFilter, LogLevel,
LogQuery, Metric, MetricType, MetricValue, MetricsCollector as ObsMetricsCollector,
MetricsExporter, MetricsRegistry, ObservabilityBuilder, ObservabilityConfig,
ObservabilitySystem, PerformanceMonitor, PerformanceReport, ProfileData, Profiler,
RealtimeMetrics, ReportGenerator, RetentionPolicy, SearchAnalyzer, SystemMonitor,
UserActivityTracker, WebSocketManager,
};
pub mod prelude {
pub use crate::{
ChatResponse, HealthCheckResult, ProcessingResult, RragSystem, RragSystemBuilder,
RragSystemConfig, SearchResponse, SystemMetrics,
};
pub use crate::{
ChunkingStrategy, Document, DocumentChunk, DocumentChunker, Embedding, EmbeddingProvider,
EmbeddingService, ErrorSeverity, Metadata, RragError, RragResult,
};
pub use crate::{
InMemoryRetriever, MemoryService, RetrievalService, SearchConfig, SearchQuery,
SearchResult, StorageService,
};
pub use crate::{
AgentBuilder, AgentConfig, AgentResponse, Calculator, RragAgent, Tool, ToolRegistry,
ToolResult,
};
#[cfg(feature = "http")]
pub use crate::HttpTool;
pub use crate::{
ConversationBufferMemory, ConversationMessage, ConversationSummaryMemory,
ConversationTokenBufferMemory, Memory, MessageRole,
};
pub use crate::{StreamToken, StreamingResponse, TokenStreamBuilder, TokenType};
pub use crate::{
DocumentChunkingStep, EmbeddingStep, Pipeline, PipelineContext, PipelineData, PipelineStep,
RagPipelineBuilder, RetrievalStep, TextOperation, TextPreprocessingStep,
};
pub use crate::{
BM25Retriever, FusionStrategy, HybridConfig, HybridRetriever, RankFusion,
ReciprocalRankFusion, SemanticRetriever,
};
pub use crate::{
BatchProcessor, ChangeDetector, ChangeResult, ChangeType, IncrementalIndexManager,
IncrementalIndexingService, IncrementalServiceBuilder, IntegrityChecker, MetricsCollector,
RollbackManager, VectorUpdateManager, VersionManager,
};
pub use crate::{
EntityExtractor, GraphEdge, GraphNode, GraphRetrievalBuilder, GraphRetriever,
KnowledgeGraph, QueryExpander,
};
pub use crate::{AlertManager, HealthChecker, MetricsRegistry, ObservabilitySystem, Profiler};
pub use async_trait::async_trait;
pub use futures::{Stream, StreamExt};
pub use serde::{Deserialize, Serialize};
pub use tokio;
#[cfg(feature = "rsllm-client")]
pub use rsllm;
}
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub const NAME: &str = "RRAG";
pub const DESCRIPTION: &str =
"Rust RAG Framework - High-performance Retrieval-Augmented Generation";
pub const REPOSITORY: &str = "https://github.com/leval-ai/rrag";
pub const LICENSE: &str = "MIT";
pub const MSRV: &str = "1.70.0";