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
11
use aionic::openai::{Image, OpenAI};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
    let image_prompt = "Create an image that represents the meaning of life?";

    let image_list = OpenAI::<Image>::new().create(image_prompt).await?;
    println!("Image list: {:?}", image_list);

    Ok(())
}