@@ -27,9 +27,9 @@ use super::{
2727 ChatCompletionRequestUserMessageContentPart , ChatCompletionToolChoiceOption , CreateFileRequest ,
2828 CreateImageEditRequest , CreateImageVariationRequest , CreateMessageRequestContent ,
2929 CreateSpeechResponse , CreateTranscriptionRequest , CreateTranslationRequest , DallE2ImageSize ,
30- EmbeddingInput , FileInput , FilePurpose , FunctionName , Image , ImageInput , ImageModel ,
31- ImageResponseFormat , ImageSize , ImageUrl , ImagesResponse , ModerationInput , Prompt , Role , Stop ,
32- TimestampGranularity , FileExpiresAfterAnchor
30+ EmbeddingInput , FileExpiresAfterAnchor , FileInput , FilePurpose , FunctionName , Image ,
31+ ImageInput , ImageModel , ImageResponseFormat , ImageSize , ImageUrl , ImagesResponse ,
32+ ModerationInput , Prompt , Role , Stop , TimestampGranularity ,
3333} ;
3434
3535/// for `impl_from!(T, Enum)`, implements
@@ -985,9 +985,10 @@ impl AsyncTryFrom<CreateFileRequest> for reqwest::multipart::Form {
985985 let mut form = reqwest:: multipart:: Form :: new ( )
986986 . part ( "file" , file_part)
987987 . text ( "purpose" , request. purpose . to_string ( ) ) ;
988-
988+
989989 if let Some ( expires_after) = request. expires_after {
990- form = form. text ( "expires_after[anchor]" , expires_after. anchor . to_string ( ) )
990+ form = form
991+ . text ( "expires_after[anchor]" , expires_after. anchor . to_string ( ) )
991992 . text ( "expires_after[seconds]" , expires_after. seconds . to_string ( ) ) ;
992993 }
993994 Ok ( form)
0 commit comments