AudioTranscriptionParameters allowed for uploading in-memory bytes using AudioTranscriptionFile, but none of the other endpoints exposing files did.
This PR fixes that by renaming AudioTranscriptionFile to FileUpload and switching the other endpoints over to using it.
This was actually a side-effect of the actual change I wanted to make, which was to make it possible to build the crate with reqwest but without tokio. This achieves that by isolating the tokio-using code to FileUpload::File and conditionally compiling that.
AudioTranscriptionParameters
allowed for uploading in-memory bytes usingAudioTranscriptionFile
, but none of the other endpoints exposing files did.This PR fixes that by renaming
AudioTranscriptionFile
toFileUpload
and switching the other endpoints over to using it.This was actually a side-effect of the actual change I wanted to make, which was to make it possible to build the crate with
reqwest
but withouttokio
. This achieves that by isolating thetokio
-using code toFileUpload::File
and conditionally compiling that.This compiles with:
cargo clippy
cargo clippy --no-default-features
cargo clippy --no-default-features -F reqwest