-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from sashirestela/18-use-with-lombok-annotation
Immutable request objects using Lombok @with
- Loading branch information
Showing
8 changed files
with
110 additions
and
114 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
170 changes: 68 additions & 102 deletions
170
src/main/java/io/github/sashirestela/openai/OpenAI.java
Large diffs are not rendered by default.
Oops, something went wrong.
28 changes: 25 additions & 3 deletions
28
src/main/java/io/github/sashirestela/openai/domain/audio/AudioTranscribeRequest.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 |
---|---|---|
@@ -1,16 +1,38 @@ | ||
package io.github.sashirestela.openai.domain.audio; | ||
|
||
import java.nio.file.Path; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonInclude.Include; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.experimental.SuperBuilder; | ||
import lombok.NonNull; | ||
import lombok.With; | ||
|
||
@Getter | ||
@SuperBuilder | ||
public class AudioTranscribeRequest extends AudioTranslateRequest { | ||
@Builder | ||
public class AudioTranscribeRequest { | ||
|
||
@NonNull | ||
protected Path file; | ||
|
||
@NonNull | ||
protected String model; | ||
|
||
@JsonInclude(Include.NON_NULL) | ||
protected String prompt; | ||
|
||
@JsonInclude(Include.NON_NULL) | ||
protected Double temperature; | ||
|
||
@JsonInclude(Include.NON_NULL) | ||
private String language; | ||
|
||
@With | ||
@JsonInclude(Include.NON_NULL) | ||
@JsonProperty("response_format") | ||
protected AudioRespFmt responseFormat; | ||
|
||
} |
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