llamaedge 0.0.7

A library for interacting with LlamaEdge API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use llamaedge::{params::EmbeddingsParams, Client};

#[tokio::main]
async fn main() {
    const SERVER_BASE_URL: &str = "http://localhost:10086";

    let client = Client::new(SERVER_BASE_URL).unwrap();

    match client
        .embeddings("Hello, world!".into(), EmbeddingsParams::default())
        .await
    {
        Ok(embeddings) => println!("{:#?}", embeddings),
        Err(e) => println!("Error: {}", e),
    }
}