gh_models 0.2.0

A Rust client for GitHub-hosted AI models, compatible with the models.github.ai chat completion API.
Documentation
//! # gh_models
//!
//! A Rust client for the GitHub Models API.
//! This crate provides a simple interface for sending chat completion requests
//! to GitHub-hosted AI models, similar to OpenAI's Python client.
//!
//! ## Example
//!
//! ```rust
//! use gh_models::{GHModels, types::ChatMessage};
//! use std::env;
//!
//! #[tokio::main]
//! async fn main() {
//!     let token = env::var("GITHUB_TOKEN").expect("Missing GITHUB_TOKEN");
//!     let client = GHModels::new(token);
//!
//!     let messages = vec![
//!         ChatMessage { role: "system".into(), content: "You are a helpful assistant.".into() },
//!         ChatMessage { role: "user".into(), content: "What is the capital of France?".into() },
//!     ];
//!
//!     let response = client.chat_completion("openai/gpt-4o", messages, 1.0, 4096, 1.0).await.unwrap();
//!     println!("{}", response.choices[0].message.content);
//! }
//! ```

pub mod client;
pub mod types;

pub use client::*;