typesafe-ai 0.1.0

Sync and async Rust clients for the TypeSafe System One API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
mod support;

use std::{env, error::Error};

use typesafe_ai::ReqwestClient;

#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), Box<dyn Error>> {
    let client = ReqwestClient::new(env::var("TYPESAFE_API_KEY")?)?;
    let response = client.evaluate(&support::request()).await?;
    support::print_answers(&response);
    Ok(())
}