glide-rs

Crates.ioglide-rs
lib.rsglide-rs
version0.1.0
sourcesrc
created_at2024-07-09 21:22:19.059809
updated_at2024-07-09 21:22:19.059809
descriptionA minimal EinStack client.
homepagehttps://www.einstack.ai/
repositoryhttps://github.com/EinStack/glide-rs
max_upload_size
id1297499
size79,508
Roman Glushko (roma-glushko)

documentation

https://docs.rs/glide-rs

README

Glide Logo

Glide Rust Client

🦀 An official Rust client for Glide, an open reliable fast model gateway.

Discord Glide Docs ArtifactHub
Github Action Crates Io Cargo Docs

Glide is under active development right now 🛠️

Give us a star ⭐ to support the project and watch 👀 our repositories not to miss any update

Features

  • streaming to enable WebSocket chat support.
  • native-tls to use system-native TLS. Enabled by default.
  • rustls-tls for TLS backed by rustls.

Installation

cargo add glide-rs

Usage

For a full example take a look at hello.rs.

use glide_rs::{Client, Result};
use glide_rs::lang::chat::ChatRequest;

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

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

    Ok(())
}
Commit count: 12

cargo fmt