mirror of
https://github.com/mii443/openai-api-rs.git
synced 2025-08-22 23:25:39 +00:00
v3.0.1
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "openai-api-rs"
|
||||
version = "3.0.0"
|
||||
version = "3.0.1"
|
||||
edition = "2021"
|
||||
authors = ["Dongri Jin <dongrify@gmail.com>"]
|
||||
license = "MIT"
|
||||
|
@ -7,7 +7,7 @@ Check out the [docs.rs](https://docs.rs/openai-api-rs/).
|
||||
Cargo.toml
|
||||
```toml
|
||||
[dependencies]
|
||||
openai-api-rs = "3.0.0"
|
||||
openai-api-rs = "3.0.1"
|
||||
```
|
||||
|
||||
## Usage
|
||||
@ -38,7 +38,8 @@ let req = ChatCompletionRequest::new(
|
||||
GPT4.to_string(),
|
||||
vec![chat_completion::ChatCompletionMessage {
|
||||
role: chat_completion::MessageRole::user,
|
||||
content: String::from("Hello OpenAI!"),
|
||||
content: chat_completion::Content::Text(String::from("Hello OpenAI!")),
|
||||
name: None,
|
||||
}],
|
||||
);
|
||||
```
|
||||
@ -62,7 +63,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
GPT4.to_string(),
|
||||
vec![chat_completion::ChatCompletionMessage {
|
||||
role: chat_completion::MessageRole::user,
|
||||
content: String::from("What is Bitcoin?"),
|
||||
content: chat_completion::Content::Text(String::from("What is Bitcoin?")),
|
||||
name: None,
|
||||
}],
|
||||
);
|
||||
|
Reference in New Issue
Block a user