glide-rs 0.1.0

A minimal EinStack client.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use glide_rs::lang::chat::ChatRequest;
use glide_rs::{Client, Result};

#[tokio::main]
async fn main() -> Result<()> {
    let client = Client::default();
    client.health().await?;

    let list = client.lang.list().await?;
    let router = list.routers.first().unwrap();
    let name = router["routerID"].as_str().unwrap();

    let request = ChatRequest::new("Hello!");
    let response = client.lang.chat(&name, request).await?;
    println!("response: {}", response.content());

    Ok(())
}