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
//! # TypeSafe AI Rust SDK
//!
//! Rust SDK for [TypeSafe AI](https://typesafe.ai) — typed judgments from
//! System One models like Jev.
//!
//! ## Quickstart
//!
//! Set `TYPESAFE_API_KEY` in your environment, then:
//!
//! ```no_run
//! use typesafeai_sdk::{TypeSafeClient, noul, choice, score, Question};
//! use std::collections::HashMap;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let client = TypeSafeClient::from_env()?;
//!
//! let mut questions: HashMap<String, Question> = HashMap::new();
//! questions.insert("billing".to_string(), noul("Is this about billing?").into());
//!
//! let response = client.system_one("I was charged twice. Please help.", questions).await?;
//!
//! if let Some(answer) = response.noul("billing") {
//! println!("Billing probability: {}", answer.noul);
//! }
//! Ok(())
//! }
//! ```
//!
//! ## Primitives
//!
//! - [`noul`] — yes/no question → probability in `[0, 1]`
//! - [`choice`] — multiple-choice → label, probabilities, confidence
//! - [`score`] — rubric-based → numeric score, legend, probabilities, confidence
pub use ;
pub use ;
pub use ;
pub use RetryPolicy;
pub use ;
pub use BlockingClient;