File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -197,8 +197,9 @@ impl<C: Config> Client<C> {
197
197
let client = self . http_client . clone ( ) ;
198
198
199
199
backoff:: future:: retry ( self . backoff . clone ( ) , || async {
200
+ let request = request_maker ( ) . await . map_err ( backoff:: Error :: Permanent ) ?;
200
201
let response = client
201
- . execute ( request_maker ( ) . await ? )
202
+ . execute ( request )
202
203
. await
203
204
. map_err ( OpenAIError :: Reqwest )
204
205
. map_err ( backoff:: Error :: Permanent ) ?;
Original file line number Diff line number Diff line change @@ -723,7 +723,8 @@ pub struct ChatCompletionRequestMessage {
723
723
pub role : Role ,
724
724
/// The contents of the message.
725
725
/// `content` is required for all messages except assistant messages with function calls.
726
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
726
+ // DON'T SKIP: https://github.com/64bit/async-openai/issues/103
727
+ //#[serde(skip_serializing_if = "Option::is_none")]
727
728
pub content : Option < String > ,
728
729
/// The name of the author of this message. `name` is required if role is function,
729
730
/// and it should be the name of the function whose response is in the `content`.
You can’t perform that action at this time.
0 commit comments