14 releases

1.0.0-alpha.16 Aug 27, 2024
1.0.0-alpha.15 Jul 15, 2024
1.0.0-alpha.14 Feb 22, 2024
1.0.0-alpha.13 Jul 2, 2023
0.4.1 Feb 24, 2017

#47 in Machine learning

Download history 502/week @ 2024-07-21 413/week @ 2024-07-28 641/week @ 2024-08-04 403/week @ 2024-08-11 495/week @ 2024-08-18 389/week @ 2024-08-25 309/week @ 2024-09-01 783/week @ 2024-09-08 355/week @ 2024-09-15 398/week @ 2024-09-22 374/week @ 2024-09-29 238/week @ 2024-10-06 293/week @ 2024-10-13 301/week @ 2024-10-20 438/week @ 2024-10-27 332/week @ 2024-11-03

1,380 downloads per month
Used in 9 crates (7 directly)

MIT license

73KB
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–19MB
~266K SLoC