You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-2Lines changed: 16 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,32 +1,39 @@
1
1
# OpenAI API client library for Rust (unofficial)
2
+
2
3
The OpenAI API client Rust library provides convenient access to the OpenAI API from Rust applications.
3
4
4
5
Check out the [docs.rs](https://docs.rs/openai-api-rs/).
5
6
6
7
## Installation:
8
+
7
9
Cargo.toml
10
+
8
11
```toml
9
12
[dependencies]
10
-
openai-api-rs = "6.0.12"
13
+
openai-api-rs = "6.0.13"
11
14
```
12
15
13
16
## Usage
17
+
14
18
The library needs to be configured with your account's secret key, which is available on the [website](https://platform.openai.com/account/api-keys). We recommend setting it as an environment variable. Here's an example of initializing the library with the API key loaded from an environment variable and creating a completion:
15
19
16
20
### Set OPENAI_API_KEY or OPENROUTER_API_KEY to environment variable
0 commit comments