@@ -7,7 +7,7 @@ use crate::{
7
7
download:: { download_url, save_b64} ,
8
8
error:: OpenAIError ,
9
9
types:: InputSource ,
10
- util:: { create_all_dir, create_file_part} ,
10
+ util:: { create_all_dir, create_file_part, AsyncTryFrom } ,
11
11
} ;
12
12
13
13
use bytes:: Bytes ;
@@ -821,8 +821,7 @@ impl Default for ChatCompletionRequestToolMessageContent {
821
821
822
822
// start: types to multipart from
823
823
824
- #[ async_convert:: async_trait]
825
- impl async_convert:: TryFrom < CreateTranscriptionRequest > for reqwest:: multipart:: Form {
824
+ impl AsyncTryFrom < CreateTranscriptionRequest > for reqwest:: multipart:: Form {
826
825
type Error = OpenAIError ;
827
826
828
827
async fn try_from ( request : CreateTranscriptionRequest ) -> Result < Self , Self :: Error > {
@@ -858,8 +857,7 @@ impl async_convert::TryFrom<CreateTranscriptionRequest> for reqwest::multipart::
858
857
}
859
858
}
860
859
861
- #[ async_convert:: async_trait]
862
- impl async_convert:: TryFrom < CreateTranslationRequest > for reqwest:: multipart:: Form {
860
+ impl AsyncTryFrom < CreateTranslationRequest > for reqwest:: multipart:: Form {
863
861
type Error = OpenAIError ;
864
862
865
863
async fn try_from ( request : CreateTranslationRequest ) -> Result < Self , Self :: Error > {
@@ -884,8 +882,7 @@ impl async_convert::TryFrom<CreateTranslationRequest> for reqwest::multipart::Fo
884
882
}
885
883
}
886
884
887
- #[ async_convert:: async_trait]
888
- impl async_convert:: TryFrom < CreateImageEditRequest > for reqwest:: multipart:: Form {
885
+ impl AsyncTryFrom < CreateImageEditRequest > for reqwest:: multipart:: Form {
889
886
type Error = OpenAIError ;
890
887
891
888
async fn try_from ( request : CreateImageEditRequest ) -> Result < Self , Self :: Error > {
@@ -926,8 +923,7 @@ impl async_convert::TryFrom<CreateImageEditRequest> for reqwest::multipart::Form
926
923
}
927
924
}
928
925
929
- #[ async_convert:: async_trait]
930
- impl async_convert:: TryFrom < CreateImageVariationRequest > for reqwest:: multipart:: Form {
926
+ impl AsyncTryFrom < CreateImageVariationRequest > for reqwest:: multipart:: Form {
931
927
type Error = OpenAIError ;
932
928
933
929
async fn try_from ( request : CreateImageVariationRequest ) -> Result < Self , Self :: Error > {
@@ -961,8 +957,7 @@ impl async_convert::TryFrom<CreateImageVariationRequest> for reqwest::multipart:
961
957
}
962
958
}
963
959
964
- #[ async_convert:: async_trait]
965
- impl async_convert:: TryFrom < CreateFileRequest > for reqwest:: multipart:: Form {
960
+ impl AsyncTryFrom < CreateFileRequest > for reqwest:: multipart:: Form {
966
961
type Error = OpenAIError ;
967
962
968
963
async fn try_from ( request : CreateFileRequest ) -> Result < Self , Self :: Error > {
@@ -974,8 +969,7 @@ impl async_convert::TryFrom<CreateFileRequest> for reqwest::multipart::Form {
974
969
}
975
970
}
976
971
977
- #[ async_convert:: async_trait]
978
- impl async_convert:: TryFrom < AddUploadPartRequest > for reqwest:: multipart:: Form {
972
+ impl AsyncTryFrom < AddUploadPartRequest > for reqwest:: multipart:: Form {
979
973
type Error = OpenAIError ;
980
974
981
975
async fn try_from ( request : AddUploadPartRequest ) -> Result < Self , Self :: Error > {
0 commit comments