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
use llamaedge::Client;

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

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

    let file_path = "tests/assets/paris.txt";
    match client.rag_chunk_file(file_path, 1024).await {
        Ok(chunks_response) => println!("{:#?}", chunks_response),
        Err(e) => println!("Error: {}", e),
    }
}