onellm

Crates.ioonellm
lib.rsonellm
version1.0.3
created_at2025-07-10 06:16:05.095511+00
updated_at2025-08-13 10:01:45.892779+00
descriptionOfficial rust crate to communicate with the OneLLM API in rust
homepage
repositoryhttps://github.com/OneLLM-dev/onellm-crate.git
max_upload_size
id1745940
size52,500
(unsecretised)

documentation

README

OneLLM API Client

This is a Rust client for interacting with the OneLLM API.

Usage

Add this to your Cargo.toml:

onellm = "1.0.0"

Example

use onellm::input::Message;

mod input;
mod output;

#[tokio::main]
async fn main() {
    let output = input::APIInput::new(
        "https://api.deepseek.com/chat/completions".to_string(),
        input::Model::DeepSeekV3,
        vec![Message {
            role: "user".to_string(),
            content: "hi there!".to_string(),
        }],
        200,
    )
    .send(String::from("YOUR API KEY HERE"))
    .await
    .expect("Error obtaining result");
    println!("Output: {output:#?}");
}
Commit count: 0

cargo fmt