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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
//! Omniference - A multi-protocol inference engine with provider adapters
//!
//! This library provides a unified interface for interacting with various AI model providers
//! such as Ollama, OpenAI, and others through a common API.
//!
//! ## Architecture
//!
//! The library is organized in layers:
//!
//! - **Core**: Router, adapters, and types (pure inference logic)
//! - **Service**: Provider management and model resolution
//! - **Interface**: HTTP APIs, Discord bot, CLI, etc.
//! - **Application**: Full server or embeddable components
//!
//! ## Features
//!
//! - **Multi-provider support**: Ollama, OpenAI, and extensible architecture for more providers
//! - **Streaming support**: Real-time streaming responses from AI models
//! - **OpenAI-compatible API**: Drop-in replacement for OpenAI's API
//! - **Multiple interfaces**: HTTP server, Discord bot, CLI, library usage
//! - **Async/await**: Built on Tokio for high-performance async operations
//! - **Type-safe**: Strong typing throughout the library
//!
//! ## Quick Start (Library Usage)
//!
//! ```rust
//! use omniference::{OmniferenceEngine, types::{ProviderConfig, ProviderKind, ProviderEndpoint}};
//! use std::sync::Arc;
//!
//! #[tokio::main]
//! async fn main() -> anyhow::Result<()> {
//! // Create engine
//! let mut engine = OmniferenceEngine::new();
//!
//! // Register provider
//! engine.register_provider(ProviderConfig {
//! name: "ollama".to_string(),
//! endpoint: ProviderEndpoint {
//! kind: ProviderKind::Ollama,
//! base_url: "http://localhost:11434".to_string(),
//! api_key: None,
//! extra_headers: std::collections::BTreeMap::new(),
//! timeout: Some(30000),
//! },
//! enabled: true,
//! }).await;
//!
//! // Create chat request
//! let request = omniference::types::ChatRequestIR {
//!
//! // ... request details
//! };
//!
//! // Execute chat
//! let stream = engine.chat(request).await?;
//!
//! // Process stream...
//!
//!
//! Ok(())
//! }
//! ```
//!
//!
//!
// Core modules
// Service layer
// Interface layers
// Provider adapters
// High-level API
// Re-export common types and functions for convenience
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;