Skip to content

Commit 5fedc36

Browse files
author
Dongri Jin
committed
v3.0.1
1 parent c7fbe2b commit 5fedc36

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "openai-api-rs"
3-
version = "3.0.0"
3+
version = "3.0.1"
44
edition = "2021"
55
authors = ["Dongri Jin <[email protected]>"]
66
license = "MIT"

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Check out the [docs.rs](https://docs.rs/openai-api-rs/).
77
Cargo.toml
88
```toml
99
[dependencies]
10-
openai-api-rs = "3.0.0"
10+
openai-api-rs = "3.0.1"
1111
```
1212

1313
## Usage
@@ -38,7 +38,8 @@ let req = ChatCompletionRequest::new(
3838
GPT4.to_string(),
3939
vec![chat_completion::ChatCompletionMessage {
4040
role: chat_completion::MessageRole::user,
41-
content: String::from("Hello OpenAI!"),
41+
content: chat_completion::Content::Text(String::from("Hello OpenAI!")),
42+
name: None,
4243
}],
4344
);
4445
```
@@ -62,7 +63,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
6263
GPT4.to_string(),
6364
vec![chat_completion::ChatCompletionMessage {
6465
role: chat_completion::MessageRole::user,
65-
content: String::from("What is Bitcoin?"),
66+
content: chat_completion::Content::Text(String::from("What is Bitcoin?")),
6667
name: None,
6768
}],
6869
);

0 commit comments

Comments
 (0)