@@ -26,8 +26,7 @@ use crate::{
2626 ChatCompletionRequestSystemMessageContent , ChatCompletionRequestToolMessage ,
2727 ChatCompletionRequestToolMessageContent , ChatCompletionRequestUserMessage ,
2828 ChatCompletionRequestUserMessageContent , ChatCompletionRequestUserMessageContentPart ,
29- ChatCompletionToolChoiceOption , FunctionName , ImageUrl , Prompt , Role ,
30- StopConfiguration ,
29+ FunctionName , ImageUrl , Prompt , Role , StopConfiguration ,
3130 } ,
3231 containers:: CreateContainerFileRequest ,
3332 embeddings:: EmbeddingInput ,
@@ -38,7 +37,7 @@ use crate::{
3837 } ,
3938 images:: { ImageBackground , ImageEditInput , ImageOutputFormat , ImageQuality , InputFidelity } ,
4039 moderations:: ModerationInput ,
41- responses:: { EasyInputContent , Role as ResponsesRole } ,
40+ responses:: EasyInputContent ,
4241 uploads:: AddUploadPartRequest ,
4342 videos:: { CreateVideoRequest , VideoSize } ,
4443 CreateMessageRequestContent , InputSource ,
@@ -223,50 +222,50 @@ impl From<PathBuf> for ImageEditInput {
223222// Arrays of path-like values
224223impl < const N : usize > From < [ & str ; N ] > for ImageEditInput {
225224 fn from ( value : [ & str ; N ] ) -> Self {
226- Self :: Images ( value. into_iter ( ) . map ( |v| ImageInput :: from ( v ) ) . collect ( ) )
225+ Self :: Images ( value. into_iter ( ) . map ( ImageInput :: from) . collect ( ) )
227226 }
228227}
229228
230229impl < const N : usize > From < [ String ; N ] > for ImageEditInput {
231230 fn from ( value : [ String ; N ] ) -> Self {
232- Self :: Images ( value. into_iter ( ) . map ( |v| ImageInput :: from ( v ) ) . collect ( ) )
231+ Self :: Images ( value. into_iter ( ) . map ( ImageInput :: from) . collect ( ) )
233232 }
234233}
235234
236235impl < const N : usize > From < [ & Path ; N ] > for ImageEditInput {
237236 fn from ( value : [ & Path ; N ] ) -> Self {
238- Self :: Images ( value. into_iter ( ) . map ( |v| ImageInput :: from ( v ) ) . collect ( ) )
237+ Self :: Images ( value. into_iter ( ) . map ( ImageInput :: from) . collect ( ) )
239238 }
240239}
241240
242241impl < const N : usize > From < [ PathBuf ; N ] > for ImageEditInput {
243242 fn from ( value : [ PathBuf ; N ] ) -> Self {
244- Self :: Images ( value. into_iter ( ) . map ( |v| ImageInput :: from ( v ) ) . collect ( ) )
243+ Self :: Images ( value. into_iter ( ) . map ( ImageInput :: from) . collect ( ) )
245244 }
246245}
247246
248247// Vectors of path-like values
249248impl < ' a > From < Vec < & ' a str > > for ImageEditInput {
250249 fn from ( value : Vec < & ' a str > ) -> Self {
251- Self :: Images ( value. into_iter ( ) . map ( |v| ImageInput :: from ( v ) ) . collect ( ) )
250+ Self :: Images ( value. into_iter ( ) . map ( ImageInput :: from) . collect ( ) )
252251 }
253252}
254253
255254impl From < Vec < String > > for ImageEditInput {
256255 fn from ( value : Vec < String > ) -> Self {
257- Self :: Images ( value. into_iter ( ) . map ( |v| ImageInput :: from ( v ) ) . collect ( ) )
256+ Self :: Images ( value. into_iter ( ) . map ( ImageInput :: from) . collect ( ) )
258257 }
259258}
260259
261260impl From < Vec < & Path > > for ImageEditInput {
262261 fn from ( value : Vec < & Path > ) -> Self {
263- Self :: Images ( value. into_iter ( ) . map ( |v| ImageInput :: from ( v ) ) . collect ( ) )
262+ Self :: Images ( value. into_iter ( ) . map ( ImageInput :: from) . collect ( ) )
264263 }
265264}
266265
267266impl From < Vec < PathBuf > > for ImageEditInput {
268267 fn from ( value : Vec < PathBuf > ) -> Self {
269- Self :: Images ( value. into_iter ( ) . map ( |v| ImageInput :: from ( v ) ) . collect ( ) )
268+ Self :: Images ( value. into_iter ( ) . map ( ImageInput :: from) . collect ( ) )
270269 }
271270}
272271
@@ -1327,12 +1326,6 @@ impl Default for EasyInputContent {
13271326 }
13281327}
13291328
1330- impl Default for ResponsesRole {
1331- fn default ( ) -> Self {
1332- Self :: User
1333- }
1334- }
1335-
13361329impl From < String > for EasyInputContent {
13371330 fn from ( value : String ) -> Self {
13381331 Self :: Text ( value)
0 commit comments