-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding Image generation API - DALL E
- Loading branch information
1 parent
85bc750
commit dd80051
Showing
10 changed files
with
220 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
src/main/java/io/github/namankhurpia/Pojo/Image/ImageRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package io.github.namankhurpia.Pojo.Image; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.google.gson.annotations.SerializedName; | ||
import lombok.*; | ||
|
||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
@Data | ||
public class ImageRequest { | ||
|
||
/** | ||
* This input is your prompt which needs to be tested against moderations API | ||
*/ | ||
@NonNull | ||
@JsonProperty("prompt") | ||
@SerializedName("prompt") | ||
public String prompt; | ||
|
||
/** | ||
* Defaults to dall-e-2 | ||
* dall-e-3 | ||
* | ||
*/ | ||
@JsonProperty("model") | ||
@SerializedName("model") | ||
public String model; | ||
|
||
@JsonProperty("n") | ||
@SerializedName("n") | ||
Integer n; | ||
|
||
@JsonProperty("quality") | ||
@SerializedName("quality") | ||
String quality; | ||
|
||
@JsonProperty("response_format") | ||
@SerializedName("response_format") | ||
String response_format; | ||
|
||
@JsonProperty("size") | ||
@SerializedName("size") | ||
String size; | ||
|
||
@JsonProperty("style") | ||
@SerializedName("style") | ||
String style; | ||
|
||
@JsonProperty("user") | ||
@SerializedName("user") | ||
String user; | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/io/github/namankhurpia/Pojo/Image/ImageResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package io.github.namankhurpia.Pojo.Image; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.google.gson.annotations.SerializedName; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.List; | ||
|
||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
@Data | ||
public class ImageResponse { | ||
|
||
@JsonProperty("created") | ||
@SerializedName("created") | ||
public Integer created; | ||
|
||
@JsonProperty("data") | ||
@SerializedName("data") | ||
public List<ModelData> data; | ||
|
||
|
||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/io/github/namankhurpia/Pojo/Image/ModelData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package io.github.namankhurpia.Pojo.Image; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.google.gson.annotations.SerializedName; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
@Data | ||
public class ModelData { | ||
|
||
@JsonProperty("revised_prompt") | ||
@SerializedName("revised_prompt") | ||
public String revisedPrompt; | ||
|
||
@JsonProperty("url") | ||
@SerializedName("url") | ||
public String url; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters