Unity integration for the OpenAI API (archived)
Top 82.8% on sourcepulse
This Unity integration provides a C# wrapper for the OpenAI API, enabling developers to easily incorporate AI-powered features like text generation and chat completions into their games and applications. It offers both Coroutine and asynchronous function implementations for seamless integration within Unity's workflow.
How It Works
The library wraps OpenAI API endpoints, including Completions
and Chat Completions
, as Coroutines and async
methods. This approach leverages Unity's execution model, allowing AI calls to be made without blocking the main thread, thus maintaining application responsiveness. The syntax closely mirrors the official OpenAI API documentation for ease of use.
Quick Start & Requirements
Window > Package Manager > Add package from git URL...
) using https://github.com/hexthedev/OpenAi-Api-Unity.git
.~/.openai/auth.json
file.Highlighted Details
POST /chat/completions
and POST /engines/{engine_id}/completions
.async
API call wrappers.Maintenance & Community
The project is officially archived and no longer maintained by the original author, who lacks time for PRs or repo management. Community contributions via Pull Requests are welcome, but unlikely to be merged.
Licensing & Compatibility
The repository does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.
Limitations & Caveats
This project is officially archived and unmaintained, with no further updates planned. Several API endpoints, such as streaming completions and file uploads, are not implemented or tested. Testing has been limited to Windows editor and play mode, with potential platform-specific issues in builds. Organization key functionality has not been tested.
1 year ago
1 week