qcli/provider/mod.rs
1//! Talking to a model provider in the Anthropic Messages shape.
2//!
3//! This module depends on nothing else in the crate: it will move into a crate shared with
4//! qcode, so it speaks in its own terms (a key, an endpoint, the pieces of a streamed reply) and
5//! leaves what a conversation means to the application.
6//!
7//! Two rules run through it. **The key lives apart:** it is read from the person's key file into
8//! a [`Key`], which cannot be printed, and it only ever travels in a header, so no address, error
9//! or log can carry it. **No test reaches a real provider:** tests talk to a server of their own
10//! on the loopback, and live tries are separate and ignored unless asked for.
11
12mod endpoint;
13mod error;
14#[cfg(test)]
15pub(crate) mod fake;
16mod key;
17#[cfg(test)]
18mod live;
19mod reply;
20#[cfg(test)]
21mod tests;
22
23pub use endpoint::Endpoint;
24pub use error::ProviderError;
25pub use key::{Key, KeyError};
26pub use reply::{Delta, Reply, Stop, UNPARSED};