1 unstable release

0.1.2 Nov 22, 2025

#2659 in Asynchronous

Download history 25/week @ 2025-11-17 43/week @ 2025-12-01 42/week @ 2025-12-08 63/week @ 2025-12-15 77/week @ 2025-12-22 45/week @ 2025-12-29 33/week @ 2026-01-05 12/week @ 2026-01-12 47/week @ 2026-01-19 39/week @ 2026-01-26

146 downloads per month

MIT license

42KB
626 lines

OpenAI GPT SDK for Miyabi LLM

This crate provides OpenAI GPT API integration for the Miyabi LLM framework. It implements the LlmClient and LlmStreamingClient traits from miyabi-llm-core.

Features

  • GPT-4o, GPT-4o-mini, GPT-4 Turbo support
  • Tool/function calling
  • Streaming responses via SSE
  • Environment variable configuration

Example

use miyabi_llm_openai::OpenAIClient;
use miyabi_llm_core::{LlmClient, Message};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = OpenAIClient::from_env()?;
    let messages = vec![Message::user("Hello!")];
    let response = client.chat(messages).await?;
    println!("Response: {}", response);
    Ok(())
}

miyabi-llm-openai

Part of the Miyabi LLM ecosystem - Unified LLM interface for Rust.

Installation

cargo add miyabi-llm-openai

License

MIT

Dependencies

~8–23MB
~252K SLoC