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
//! # AgentAI Core
//!
//! Shared building blocks of the [AgentAI](https://crates.io/crates/agentai) crates.
//!
//! - [`message`] and [`prompt`]: the conversation types (`Message`, `Part`, `Media`,
//! `ToolOutput`, `Prompt`, ...), re-exported by `agentai`.
//! - [`history`]: [`HistoryProcessor`](history::HistoryProcessor) changes the messages sent to
//! the model, [`HistoryPruning`](history::HistoryPruning) removes media and reasoning from
//! finished turns.
//! - [`mime`]: one table of MIME types and file extensions ([`mime::extension`],
//! [`mime::from_path`], [`mime::with_extension`]), also behind `Media::extension` and
//! `Media::file_name`.
//! - [`base64`]: [`base64::encode`] and [`base64::decode`], the encoding of `Media` bytes and
//! data URLs (`Media::to_url`).
//! - [`storage`]: [`MediaStorage`](storage::MediaStorage) (`MediaRead` + `MediaSave`), a
//! blob storage for images and other files, with [`MemoryStorage`](storage::MemoryStorage).
//! - HTTP: the [`HttpClient`] trait hides the HTTP stack, so crates such as `agentai-image` send
//! their requests without depending on a particular client. [`ReqwestClient`] implements it
//! with `reqwest`; another environment (for example WebAssembly) can provide its own.
//! With the `test-support` feature, `mock::MockHttp` records requests and answers with
//! prepared responses, for tests of providers.
//! - [`tls`]: the TLS backend is chosen with the `rustls-ring` (default), `rustls-aws-lc` and
//! `native-tls` features.
//!
//! ## Features
compile_error!;
pub use *;