8000 GitHub - OneLLM-dev/onellm-crate: The official rust crate for interacting with OneLLM
[go: up one dir, main page]

Skip to content

OneLLM-dev/onellm-crate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

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:#?}");
}

About

The official rust crate for interacting with OneLLM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0