AI in Rust

Provide a collection of third-party APIs that give public access to AI capabilities.

WARNING: this crate is NOT PRODUCTION ready.

Support List

OpenAI

Note: Updated on March 23rd, 2023.

| Category | Variant | Tested Models | Stream | | :--------------- | :------------- | :----------------------- | :----: | | Chat completions | - | gpt-3.5-turbo, gpt-3.5-turbo-0301, text-davinci-003, text-davinci-002, code-davinci-002[^note3] | yes | | Completions | - | gpt-3.5-turbo, gpt-3.5-turbo-0301, text-davinci-003 | yes | | Edits | - | text-davinci-edit-001, code-davinci-edit-001 | - | | Images | Generations | dall-e[^note1] | - | | Images | Edits | dall-e[^note1] | - | | Images | Variations | dall-e[^note1] | - | | Embeddings | - | text-embedding-ada-002[^note4] | - | | Audios | Transcriptions | whisper-1 | - | | Audios | Translation | whisper-1 | - | | Moderation | - | text-moderation-latest[^note2],
text-moderation-stable | - |

OpenAI's Fine Tunes endpoints are currently not supported.

Usage

Create a config.yml in your working directory, or root of this crate. Contents like this:

yaml openai: api_key: sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

And run examples, e.g.:

bash cargo run --example chat-completion