Renderer for OpenAI's harmony response format
New!
Top 14.0% on SourcePulse
This repository provides the openai-harmony
library, a Rust-backed tool for formatting and parsing conversations for OpenAI's open-weight models (gpt-oss). It ensures consistent, loss-free token sequences for structured outputs, tool calling, and multi-channel reasoning, primarily targeting developers building custom inference solutions for these models.
How It Works
The core logic resides in Rust, leveraging tiktoken
for tokenization and pyo3
for Python bindings. This approach ensures high performance for rendering and parsing conversation structures, mimicking the OpenAI Responses API. The library supports multiple channels (e.g., analysis
, commentary
, final
) and structured tool calls within a unified format.
Quick Start & Requirements
pip install openai-harmony
Highlighted Details
Maintenance & Community
The project is maintained by OpenAI. Development is primarily in Rust with Python bindings.
Licensing & Compatibility
The repository does not explicitly state a license in the provided README snippet. Compatibility for commercial use or closed-source linking is not specified.
Limitations & Caveats
The README implies that gpt-oss models must be used with the Harmony format to function correctly. No specific limitations or known issues are detailed.
3 days ago
Inactive