names(pic1) (`actual`) doesn't fully contain all the values in "data" (`expected`).
* Missing from `actual`: "data"
* Present in `actual`:   "success", "message", "type"

pic1<-handle_openai$images$create(prompt = "A small bird flies over the ocean, heading towards the storm.")
expect_contains(object = names(pic1),expected = "data")
req <- request(pic1$data$url) %>%req_perform(path = pic_file1)
#For simple test,you need install 'png' package.
#Note that when a mask is not provided, OpenAI defaults to using areas of the uploaded image with a transparency of 0 as the modification area.
#The following test adds full image transparency of 0 (modifying the entire image) to pic1.
alpha_channel <- matrix(0, nrow = dim(pic1)[1], ncol = dim(pic1)[2])
pic3<-handle_openai$images$edit(image = pic_file2,prompt = "Please modify the bird in the picture to a flock of birds."
expect_contains(object = names(pic3),expected = "data")
request(pic3$data$url[1]) %>% req_perform(path = pic_file3_1)
request(pic3$data$url[2]) %>% req_perform(path = pic_file3_2)
expect_contains(object = names(pic4),expected = "data")
pic1<-handle_openai$images$create(prompt = "A small bird flies over the ocean, heading towards the storm.",verbosity = 4)
pic3<-handle_openai$images$edit(image = NULL,prompt = "Please modify the bird in the picture to a flock of birds."
pic3<-handle_openai$images$edit(image = pic_file2,mask="/tmp/sadasdasd",prompt = "Please modify the bird in the picture to a flock of birds."
pic3<-handle_openai$images$edit(image = pic_file2,mask=pic_file2,prompt = "Please modify the bird in the picture to a flock of birds."
pic3<-handle_openai$images$edit(image = pic_file2,mask=pic_file1,prompt = "Please modify the bird in the picture to a flock of birds."
pic4<-handle_openai$images$variation(image = pic_file1,n="2",size="256x256",verbosity = 4)

"A small bird flies over the ocean, heading towards the storm."
"Please modify the bird in the picture to a flock of birds."

Error in `request(pic1$data$url)`: `url` must be a single string, not `NULL`.