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
//! The foundational abstractions everything else is built on.
//!
//! A [`Signature`] declares what you want the LM to do — input fields, output fields,
//! and an instruction. [`SignatureSchema`] is the Facet-derived metadata for those fields,
//! cached once per type and shared by the adapter and optimizer. [`Module`] is the trait
//! every prompting strategy implements — it's deliberately narrow (`forward` takes an
//! input, returns a predicted output) so that strategies are interchangeable.
//!
//! [`Predicted`] wraps a typed output with [`CallMetadata`] (raw response text, token
//! usage, per-field parse results). The error hierarchy — [`PredictError`], [`ParseError`],
//! [`LmError`] — distinguishes LM failures from parse failures so callers can handle
//! retries differently. [`LM`] is the language model client itself.
//!
//! Optimizer leaf discovery is internal (`visit_named_predictors_mut`) and currently
//! traverses struct fields plus `Option`, `Vec`, `HashMap<String, _>`, and `Box`.
//! `Rc`/`Arc` wrappers that contain `Predict` leaves are rejected with explicit
//! container errors.
//!
//! Most users import these through the crate root (`use dsir::*`). Module authors
//! who need fine-grained prompt control also use [`SignatureSchema`] and the adapter
//! building blocks directly.
pub
pub use PredictState;
pub use *;
pub use ;
pub use ;
pub use *;
pub use *;
pub use *;
pub use ;
pub use ;
pub use *;
pub use *;
pub use *;