2023-01-06 12:36:47 -05:00
|
|
|
package com.theokanning.openai.image;
|
|
|
|
|
2023-01-06 12:46:06 -05:00
|
|
|
|
|
|
|
import org.checkerframework.checker.nullness.qual.NonNull;
|
2023-01-06 12:36:47 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* A request for OpenAi to edit an image based on a prompt
|
|
|
|
* All fields except prompt are optional
|
|
|
|
*
|
|
|
|
* https://beta.openai.com/docs/api-reference/images/create-edit
|
|
|
|
*/
|
|
|
|
|
|
|
|
public class CreateImageEditRequest {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A text description of the desired image(s). The maximum length in 1000 characters.
|
|
|
|
*/
|
|
|
|
@NonNull
|
|
|
|
String prompt;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The number of images to generate. Must be between 1 and 10. Defaults to 1.
|
|
|
|
*/
|
|
|
|
Integer n;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The size of the generated images. Must be one of "256x256", "512x512", or "1024x1024". Defaults to "1024x1024".
|
|
|
|
*/
|
|
|
|
String size;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The format in which the generated images are returned. Must be one of url or b64_json. Defaults to url.
|
|
|
|
*/
|
|
|
|
String responseFormat;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.
|
|
|
|
*/
|
|
|
|
String user;
|
|
|
|
|
|
|
|
public String getPrompt() {
|
|
|
|
return prompt;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setPrompt(String prompt) {
|
|
|
|
this.prompt = prompt;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Integer getN() {
|
|
|
|
return n;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setN(Integer n) {
|
|
|
|
this.n = n;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getSize() {
|
|
|
|
return size;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setSize(String size) {
|
|
|
|
this.size = size;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getResponseFormat() {
|
|
|
|
return responseFormat;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setResponseFormat(String responseFormat) {
|
|
|
|
this.responseFormat = responseFormat;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getUser() {
|
|
|
|
return user;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setUser(String user) {
|
|
|
|
this.user = user;
|
|
|
|
}
|
|
|
|
}
|