-
Notifications
You must be signed in to change notification settings - Fork 817
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 #116 from Grt1228/1.0.12
1.0.12 tokens计算优化、删除模型接口修改、语音接口更新支持官方最新参数
- Loading branch information
Showing
11 changed files
with
236 additions
and
77 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
43 changes: 43 additions & 0 deletions
43
src/main/java/com/unfbx/chatgpt/entity/whisper/Transcriptions.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,43 @@ | ||
package com.unfbx.chatgpt.entity.whisper; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.*; | ||
import lombok.experimental.FieldNameConstants; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@FieldNameConstants | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class Transcriptions extends Whisper { | ||
/** | ||
* 模型目前只支持这一种:WHISPER_1 | ||
*/ | ||
@Builder.Default | ||
private String model = Whisper.Model.WHISPER_1.getName(); | ||
/** | ||
* 提示语,需要与语音语言匹配 | ||
*/ | ||
private String prompt; | ||
/** | ||
* 输出的格式,采用以下选项之一:json、text、srt、verbose_json 或 vtt。 | ||
* 默认值:json | ||
*/ | ||
@JsonProperty("response_format") | ||
@Builder.Default | ||
private String responseFormat = ResponseFormat.JSON.getName(); | ||
/** | ||
* 温度控制随机效果:0-1,值越大输出更加随机 | ||
* 默认值:0 | ||
*/ | ||
@Builder.Default | ||
private Double temperature = 0d; | ||
/** | ||
* 输入音频的语言,以 ISO-639-1 格式提供输入语言将提高准确性和延迟。 | ||
* 参考:<a href=https://baike.baidu.com/item/ISO%20639-1/8292914>ISO-639-1</a> | ||
*/ | ||
private String language; | ||
|
||
} |
38 changes: 38 additions & 0 deletions
38
src/main/java/com/unfbx/chatgpt/entity/whisper/Translations.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,38 @@ | ||
package com.unfbx.chatgpt.entity.whisper; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.*; | ||
import lombok.experimental.FieldNameConstants; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@FieldNameConstants | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class Translations { | ||
/** | ||
* 模型目前只支持这一种:WHISPER_1 | ||
*/ | ||
@Builder.Default | ||
private String model = Whisper.Model.WHISPER_1.getName(); | ||
/** | ||
* 提示语,需要与语音语言匹配 | ||
*/ | ||
private String prompt; | ||
/** | ||
* 输出的格式,采用以下选项之一:json、text、srt、verbose_json 或 vtt。 | ||
* 默认值:json | ||
*/ | ||
@JsonProperty("response_format") | ||
@Builder.Default | ||
private String responseFormat = Whisper.ResponseFormat.JSON.getName(); | ||
/** | ||
* 温度控制随机效果:0-1,值越大输出更加随机 | ||
* 默认值:0 | ||
*/ | ||
@Builder.Default | ||
private double temperature = 0; | ||
|
||
} |
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
Oops, something went wrong.