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::{Embedding, OpenAI};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
    let mut client = OpenAI::<Embedding>::new();
    let embedding = client
        .embed("The food was delicious and the waiter...")
        .await?;
    println!("{:?}", embedding);
    Ok(())
}