Alchemind OpenAI
View SourceOpenAI provider implementation for the Alchemind project.
[!WARNING]
This project is currently in early development and should not be used in production environments.
Overview
This package implements the Alchemind interfaces for OpenAI's API, allowing you to interact with OpenAI models using the consistent Alchemind API. It provides access to OpenAI's chat completion, speech-to-text, and text-to-speech capabilities.
Under the hood, this package uses the rust crate async-openai.
Features
Feature | Support |
---|---|
Chat Completions | |
Create chat completion | ✅ |
Streaming | ✅ |
Audio | |
Create Speech | ✅ |
Create Transcription | ✅ |
Installation
The package can be installed by adding alchemind_openai
to your list of dependencies in mix.exs
:
def deps do
[
{:alchemind, "~> 0.1.0-rc1"},
{:alchemind_openai, "~> 0.1.0-rc.1"}
]
end
Development
You can run tests specifically for this package with:
cd apps/alchemind_openai
mix test
License
See the LICENSE file for details.
Release Process
This package utilizes precompiled Rust NIFs managed by rustler_precompiled
. The release process involves GitHub Actions for building the NIFs and a manual step for preparing the Hex package.
Steps:
- Push changes to mirror repository:
git subtree push --prefix=apps/alchemind_openai openai-mirror <branch_name>
- Wait for NIFs to be built
- Tag the release in the mirror repository
- Wait for NIFs to be built
- Run
mix rustler_precompiled.download Alchemind.OpenAI --all
to generate achecksum-*.exs
- Release package to Hex.pm via
mix hex.publish