12 releases

1.0.0-alpha.14 Feb 22, 2024
1.0.0-alpha.13 Jul 2, 2023
1.0.0-alpha.12 Jun 23, 2023
1.0.0-alpha.8 Mar 28, 2023
0.4.1 Feb 24, 2017

#42 in Machine learning

Download history 421/week @ 2024-01-02 286/week @ 2024-01-09 335/week @ 2024-01-16 417/week @ 2024-01-23 266/week @ 2024-01-30 310/week @ 2024-02-06 754/week @ 2024-02-13 659/week @ 2024-02-20 537/week @ 2024-02-27 376/week @ 2024-03-05 359/week @ 2024-03-12 351/week @ 2024-03-19 467/week @ 2024-03-26 495/week @ 2024-04-02 446/week @ 2024-04-09 1109/week @ 2024-04-16

2,622 downloads per month
Used in 8 crates (6 directly)

MIT license

69KB
1.5K SLoC

openai

crates.io Rust workflow

An unofficial Rust library for the OpenAI API.

Warning

There may be breaking changes between versions while in alpha. See Implementation Progress.

Core Principles

  • Modularity
  • Library, not a wrapper
  • Idiomatic Rust
  • Environmental variables should be the prioritized method of authentication, but not the only way to do things

Examples

Examples can be found in the examples directory.

As the package is still a work in progress and there may be breaking changes, examples are not available for all the crate's functionality.

Currently, there are examples for the completions module and the chat module. For other modules, refer to the tests submodules for some reference.

Implementation Progress

██████████ Models

████████░░ Completions (Function calling is supported)

████████░░ Chat

██████████ Edits

░░░░░░░░░░ Images

█████████░ Embeddings

░░░░░░░░░░ Audio

███████░░░ Files

░░░░░░░░░░ Fine-tunes

██████████ Moderations

Contributing

All contributions are welcome. Unit tests are encouraged.

Fork Notice

This package was initially developed by Valentine Briese. As the original repo was archived, this is a fork and continuation of the project.

Dependencies

~8–22MB
~325K SLoC