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
//! # unia - Universal AI Client Library
//!
//! A small, pragmatic Rust library providing a provider-agnostic LLM client architecture
//! with a fully generic options system.
//!
//! ## Features
//! - Async-first, tokio compatible
//! - Provider-agnostic trait-based design
//! - Generic model and transport options
//! - Streaming support via Server-Sent Events
//! - Type-safe request/response models
//!
//! ## Architecture
//!
//! The library uses a factory-based design:
//!
//! 1. **Providers** act as factories to create Clients.
//! 2. **Clients** store authentication and configuration state.
//! 3. **Agents** wrap Clients to provide automatic tool execution loops.
//!
//! ### Core Types
//!
//! - [`Provider`](crate::providers::Provider): Factory trait for creating clients.
//! - [`Client`]: Trait for making requests to LLM providers.
//! - [`Agent`]: High-level orchestration for multi-turn conversations and tool use.
//! - [`ModelOptions`](crate::options::ModelOptions): Model behavior parameters (temperature, max_tokens, etc.)
//! - [`TransportOptions`](crate::options::TransportOptions): Transport configuration (timeout, proxy, etc.)
//! - [`Message`]: Individual conversation messages with role and content
//!
//! ## Example
//! ```no_run
//! use unia::client::Client;
//! use unia::model::{Message, Part};
//! use unia::providers::{OpenAI, Provider};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Create client using the factory
//! let client = OpenAI::create("your-api-key".to_string(), "gpt-5".to_string());
//!
//! // Create a message with text content
//! let messages = vec![
//! Message::User(vec![
//! Part::Text {
//! content: "Hello!".to_string(),
//! finished: true,
//! }
//! ])
//! ];
//!
//! // Send request
//! let response = client.request(messages, vec![]).await?;
//! println!("{:?}", response);
//! Ok(())
//! }
//! ```
pub use Agent;
pub use ;
pub use ;
pub use ;
pub use ;
// Re-export rmcp for convenience
pub use rmcp;