All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xyz.felh.openai.image.BaseRequest Maven / Gradle / Ivy

There is a newer version: 4.0.2024102501
Show newest version
package xyz.felh.openai.image;

import com.alibaba.fastjson2.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import xyz.felh.openai.IOpenAiApiRequest;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;

@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder(toBuilder = true)
public abstract class BaseRequest implements IOpenAiApiRequest {

    /**
     * The model to use for image generation.
     * 

* string, Optional * Defaults to dall-e-2 *

* When creating edit image *

* The model to use for image generation. Only dall-e-2 is supported at this time. */ @JSONField(name = "model") @JsonProperty("model") private String model; /** * The number of images to generate. Must be between 1 and 10. For dall-e-3, only n=1 is supported. *

* integer or null, Optional *

* Defaults to 1 */ @JSONField(name = "n") @JsonProperty("n") private Integer n; /** * The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024 for dall-e-2. Must be one of 1024x1024, 1792x1024, or 1024x1792 for dall-e-3 *

* string or null, Optional *

* Defaults to 1024x1024 *

* See {@link ImageSize} */ @JSONField(name = "size") @JsonProperty("size") private ImageSize size; /** * The format in which the generated images are returned. Must be one of url or b64_json. *

* string or null, Optional *

* Defaults to url *

* See {@link ImageResponseFormat} */ @JSONField(name = "response_format") @JsonProperty("response_format") private ImageResponseFormat responseFormat; /** * A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. *

* Learn more. *

* string, Optional */ @JSONField(name = "user") @JsonProperty("user") private String user; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy