File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " async-openai"
3
- version = " 0.28.3 "
3
+ version = " 0.28.4 "
4
4
authors = [" Himanshu Neema" ]
5
5
categories = [" api-bindings" , " web-programming" , " asynchronous" ]
6
6
keywords = [" openai" , " async" , " openapi" , " ai" ]
Original file line number Diff line number Diff line change 1
1
//! Errors originating from API calls, parsing responses, and reading-or-writing to the file system.
2
- use serde:: Deserialize ;
2
+ use serde:: { Deserialize , Serialize } ;
3
3
4
4
#[ derive( Debug , thiserror:: Error ) ]
5
5
pub enum OpenAIError {
@@ -28,7 +28,7 @@ pub enum OpenAIError {
28
28
}
29
29
30
30
/// OpenAI API returns error object on failure
31
- #[ derive( Debug , Deserialize , Clone ) ]
31
+ #[ derive( Debug , Serialize , Deserialize , Clone ) ]
32
32
pub struct ApiError {
33
33
pub message : String ,
34
34
pub r#type : Option < String > ,
Original file line number Diff line number Diff line change 103
103
//! ```
104
104
//! use async_openai::{Client, config::Config, config::OpenAIConfig};
105
105
//! unsafe { std::env::set_var("OPENAI_API_KEY", "only for doc test") }
106
- //!
106
+ //!
107
107
//! let openai_config = OpenAIConfig::default();
108
108
//! // You can use `std::sync::Arc` to wrap the config as well
109
109
//! let config = Box::new(openai_config) as Box<dyn Config>;
You can’t perform that action at this time.
0 commit comments