com.openai.unity  by RageAgainstThePixel

Unity SDK for OpenAI API access

created 4 years ago
557 stars

Top 58.4% on sourcepulse

GitHubView on GitHub
Project Summary

This Unity package provides a non-official REST client for interacting with the OpenAI API, targeting game developers and interactive experience creators. It simplifies integrating powerful AI models like GPT, DALL-E, and Whisper into Unity projects, enabling features such as chatbots, content generation, and audio processing.

How It Works

The client is built upon the OpenAI-DotNet library, offering a comprehensive C# interface to OpenAI's extensive API endpoints. It leverages Unity's asynchronous operations and networking capabilities to handle API requests efficiently. The library supports various authentication methods, including API keys, Azure OpenAI, and Azure Active Directory, and provides structured access to models, assistants, threads, audio, image generation, and fine-tuning.

Quick Start & Requirements

  • Installation: Via Unity Package Manager and OpenUPM (openupm add com.openai.unity).
  • Prerequisites: Unity 2021.3 LTS or higher.
  • Dependencies: Requires manual addition of com.utilities.async, com.utilities.websockets, com.utilities.extensions, com.utilities.rest, com.utilities.audio, and com.utilities.encoder.wav via UPM or Git URL.
  • Documentation: https://rageagainstthepixel.github.io/OpenAI-DotNet/

Highlighted Details

  • Comprehensive support for OpenAI's latest APIs, including Assistants, Threads, and Vector Stores.
  • Realtime API for low-latency, multi-modal conversational experiences.
  • Vision capabilities for image analysis within chat completions.
  • Structured Outputs and JSON Mode for reliable data generation.
  • Built-in support for Azure OpenAI and Azure Active Directory authentication.

Maintenance & Community

The project is actively maintained by RageAgainstThePixel. Further community engagement details are not explicitly provided in the README.

Licensing & Compatibility

The library is independently developed and not affiliated with OpenAI. The license is not explicitly stated in the README, but it is distributed via OpenUPM, suggesting a permissive open-source license. Commercial use is likely permitted, but verification of the specific license is recommended.

Limitations & Caveats

This is a non-official library, and as such, OpenAI's API changes may require updates. Some features, like Assistants and Realtime API, are marked as Beta and subject to breaking changes. Dependency management for the utility packages needs careful attention during installation.

Health Check
Last commit

4 weeks ago

Responsiveness

1 day

Pull Requests (30d)
2
Issues (30d)
1
Star History
24 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.