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
79
80
81
//! Storage module for VK Teams Bot events and context
//!
//! This module provides database and vector storage capabilities for saving
//! and searching VK Teams events with support for multiple backends.
//!
//! # Features
//!
//! - **Relational storage**: PostgreSQL with full ACID compliance
//! - **Vector search**: pgvector for semantic similarity search
//! - **AI embeddings**: OpenAI and local models support
//! - **Event processing**: Automatic storage with configurable pipelines
//!
//! # Example
//!
//! ```rust,no_run
//! use vkteams_bot::{Bot, storage::{StorageManager, StorageConfig}};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let bot = Bot::new(/* config */);
//!
//! // Setup storage
//! let storage_config = StorageConfig {
//! database_url: "postgresql://localhost/vkteams".to_string(),
//! auto_migrate: true,
//! // ... other config
//! };
//!
//! let storage = StorageManager::new(&storage_config).await?;
//!
//! // Listen and store events automatically
//! bot.get_events_by_poll(|event| {
//! let storage = storage.clone();
//! async move {
//! storage.process_event(&event).await?;
//! println!("Stored event: {}", event.event_id);
//! Ok(())
//! }
//! }).await?;
//!
//! Ok(())
//! }
//! ```
// Temporarily disabled complex relational module
// TODO: Revisit later
// #[cfg(feature = "storage")]
// pub mod relational;
pub use StorageConfig;
pub use ;
pub use StorageManager;
pub use *;
pub use ;