aionic 0.1.7

AIonic: A unified, user-friendly Rust library for seamless integration with various public Language Model APIs, such as openAI
Documentation
1
2
3
4
5
6
7
8
9
10
use aionic::openai::{Moderation, OpenAI};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
    let resp = OpenAI::<Moderation>::new()
        .moderate("I want to kill you.")
        .await?;
    println!("Moderation: {:?}", resp);
    Ok(())
}