Serialized Form
-
Package com.unfbx.chatgpt.entity.billing
-
Class com.unfbx.chatgpt.entity.billing.CreditGrantsResponse extends Object implements Serializable
-
Serialized Fields
-
grants
Grants grants
余额明细 -
object
String object
-
totalAvailable
BigDecimal totalAvailable
总剩余金额:美元 -
totalGranted
BigDecimal totalGranted
总金额:美元 -
totalUsed
BigDecimal totalUsed
总使用金额:美元
-
-
-
-
Package com.unfbx.chatgpt.entity.chat
-
Class com.unfbx.chatgpt.entity.chat.BaseChatCompletion extends Object implements Serializable
-
Serialized Fields
-
frequencyPenalty
double frequencyPenalty
-2.0 ~~ 2.0 -
functionCall
Object functionCall
Deprecated.取值:null,auto或者自定义 functions没有值的时候默认为:null functions存在值得时候默认为:auto 也可以自定义已过时
- See Also:
BaseChatCompletion.toolChoice
-
functions
List<Functions> functions
Deprecated.已过时- See Also:
BaseChatCompletion.tools
-
logitBias
Map logitBias
-
maxTokens
Integer maxTokens
最大支持4096 -
model
@NonNull String model
-
n
Integer n
为每个提示生成的完成次数。 -
presencePenalty
double presencePenalty
-
responseFormat
ResponseFormat responseFormat
指定模型必须输出的格式的对象。- Since:
- 1.1.2
-
seed
Integer seed
- Since:
- 1.1.2
-
stop
List<String> stop
停止输出标识 -
stream
boolean stream
是否流式输出. default:false- See Also:
OpenAiStreamClient
-
temperature
double temperature
使用什么取样温度,0到2之间。较高的值(如0.8)将使输出更加随机,而较低的值(如0.2)将使输出更加集中和确定。We generally recommend altering this or but not both.top_p
-
toolChoice
Object toolChoice
取值:String或者ToolChoiceObj- Since:
- 1.1.2
- See Also:
当取值为String时:ToolChoice.Choice,当取值为ToolChoiceObj时:ToolChoiceObj
-
tools
List<Tools> tools
模型可能调用的工具列表。 当前版本仅支持:functions- Since:
- 1.1.2
-
topP
Double topP
使用温度采样的替代方法称为核心采样,其中模型考虑具有top_p概率质量的令牌的结果。因此,0.1 意味着只考虑包含前 10% 概率质量的代币。我们通常建议更改此设置,但不要同时更改两者。temperature
-
user
String user
用户唯一值,确保接口不被重复调用
-
-
-
Class com.unfbx.chatgpt.entity.chat.BaseMessage extends Object implements Serializable
-
Serialized Fields
-
functionCall
FunctionCall functionCall
Deprecated. -
name
String name
-
role
String role
目前支持四个中角色参考官网,进行情景输入: https://platform.openai.com/docs/guides/chat/introduction -
toolCallId
String toolCallId
- Since:
- 1.1.2
-
toolCalls
List<ToolCalls> toolCalls
The tool calls generated by the model, such as function calls.- Since:
- 1.1.2
-
-
-
Class com.unfbx.chatgpt.entity.chat.ChatChoice extends Object implements Serializable
-
Class com.unfbx.chatgpt.entity.chat.ChatCompletion extends BaseChatCompletion implements Serializable
-
Class com.unfbx.chatgpt.entity.chat.ChatCompletionResponse extends Object implements Serializable
-
Class com.unfbx.chatgpt.entity.chat.ChatCompletionWithPicture extends BaseChatCompletion implements Serializable
-
Serialized Fields
-
messages
List<MessagePicture> messages
问题描述
-
-
-
Class com.unfbx.chatgpt.entity.chat.Functions extends Object implements Serializable
-
Serialized Fields
-
description
String description
方法描述 -
name
String name
方法名称 -
parameters
Parameters parameters
方法参数 扩展参数可以继承Parameters自己实现,json格式的数据
-
-
-
Class com.unfbx.chatgpt.entity.chat.Message extends BaseMessage implements Serializable
-
Serialized Fields
-
content
String content
旧的content属性仅仅支持字符类型
-
-
-
Class com.unfbx.chatgpt.entity.chat.MessagePicture extends BaseMessage implements Serializable
-
Class com.unfbx.chatgpt.entity.chat.Parameters extends Object implements Serializable
-
-
Package com.unfbx.chatgpt.entity.chat.tool
-
Class com.unfbx.chatgpt.entity.chat.tool.ToolCallFunction extends Object implements Serializable
-
Class com.unfbx.chatgpt.entity.chat.tool.ToolCalls extends Object implements Serializable
-
Serialized Fields
-
function
ToolCallFunction function
-
id
String id
The ID of the tool call. -
type
String type
The type of the tool. Currently, only function is supported.
-
-
-
Class com.unfbx.chatgpt.entity.chat.tool.ToolChoice extends Object implements Serializable
-
Class com.unfbx.chatgpt.entity.chat.tool.Tools extends Object implements Serializable
-
Serialized Fields
-
function
ToolsFunction function
-
type
String type
目前只支持:function- See Also:
Tools.Type
-
-
-
Class com.unfbx.chatgpt.entity.chat.tool.ToolsFunction extends Object implements Serializable
-
Serialized Fields
-
description
String description
对函数功能的描述,模型使用它来选择何时以及如何调用该函数。 -
name
String name
要调用的函数的名称。必须是 a-z、A-Z、0-9,或包含下划线和破折号,最大长度为 64 -
parameters
Parameters parameters
函数接受的参数,描述为 JSON Schema 对象 扩展参数可以继承Parameters自己实现,json格式的数据
-
-
-
-
Package com.unfbx.chatgpt.entity.common
-
Class com.unfbx.chatgpt.entity.common.Choice extends Object implements Serializable
-
Class com.unfbx.chatgpt.entity.common.DeleteResponse extends Object implements Serializable
-
Class com.unfbx.chatgpt.entity.common.Logprobs extends Object implements Serializable
-
Class com.unfbx.chatgpt.entity.common.OpenAiResponse extends Object implements Serializable
-
Serialized Fields
-
data
List<T> data
-
error
OpenAiResponse.Error error
-
object
String object
-
-
-
Class com.unfbx.chatgpt.entity.common.Usage extends Object implements Serializable
-
Serialized Fields
-
completionTokens
long completionTokens
-
promptTokens
long promptTokens
-
totalTokens
long totalTokens
-
-
-
-
Package com.unfbx.chatgpt.entity.completions
-
Class com.unfbx.chatgpt.entity.completions.Completion extends Object implements Serializable
-
Serialized Fields
-
bestOf
Integer bestOf
-
echo
boolean echo
-
frequencyPenalty
double frequencyPenalty
-2.0 ~~ 2.0 -
logitBias
Map logitBias
-
logprobs
Integer logprobs
最大值:5 -
maxTokens
Integer maxTokens
最大支持4096 -
model
@NonNull String model
-
n
Integer n
为每个提示生成的完成次数。 -
presencePenalty
double presencePenalty
-
prompt
@NonNull String prompt
问题描述 -
seed
Integer seed
- Since:
- 1.1.2
-
stop
List<String> stop
-
stream
boolean stream
-
suffix
String suffix
完成输出后的后缀,用于格式化输出结果 -
temperature
double temperature
使用什么取样温度,0到2之间。较高的值(如0.8)将使输出更加随机,而较低的值(如0.2)将使输出更加集中和确定。We generally recommend altering this or but not both.top_p
-
topP
Double topP
使用温度采样的替代方法称为核心采样,其中模型考虑具有top_p概率质量的令牌的结果。因此,0.1 意味着只考虑包含前 10% 概率质量的代币。我们通常建议更改此设置,但不要同时更改两者。temperature
-
user
String user
用户唯一值,确保接口不被重复调用
-
-
-
Class com.unfbx.chatgpt.entity.completions.CompletionResponse extends OpenAiResponse implements Serializable
-
-
Package com.unfbx.chatgpt.entity.edits
-
Class com.unfbx.chatgpt.entity.edits.Edit extends Object implements Serializable
-
Serialized Fields
-
input
@NonNull String input
Deprecated. -
instruction
@NonNull String instruction
Deprecated.提示说明。告知模型如何修改。 -
model
@NonNull String model
Deprecated.编辑模型,目前支持两种 -
n
Integer n
Deprecated.为每个提示生成的完成次数。 -
temperature
double temperature
Deprecated.使用什么取样温度,0到2之间。较高的值(如0.8)将使输出更加随机,而较低的值(如0.2)将使输出更加集中和确定。 We generally recommend altering this or but not both.top_p -
topP
Double topP
Deprecated.使用温度采样的替代方法称为核心采样,其中模型考虑具有top_p概率质量的令牌的结果。因此,0.1 意味着只考虑包含前 10% 概率质量的代币。 我们通常建议更改此设置,但不要同时更改两者。temperature
-
-
-
Class com.unfbx.chatgpt.entity.edits.EditResponse extends Object implements Serializable
-
-
Package com.unfbx.chatgpt.entity.embeddings
-
Class com.unfbx.chatgpt.entity.embeddings.Embedding extends Object implements Serializable
-
Class com.unfbx.chatgpt.entity.embeddings.EmbeddingResponse extends Object implements Serializable
-
Class com.unfbx.chatgpt.entity.embeddings.Item extends Object implements Serializable
-
Serialized Fields
-
embedding
List<BigDecimal> embedding
-
index
Integer index
-
object
String object
-
-
-
-
Package com.unfbx.chatgpt.entity.engines
-
Package com.unfbx.chatgpt.entity.files
-
Class com.unfbx.chatgpt.entity.files.File extends Object implements Serializable
-
Class com.unfbx.chatgpt.entity.files.UploadFileResponse extends File implements Serializable
-
-
Package com.unfbx.chatgpt.entity.fineTune
-
Class com.unfbx.chatgpt.entity.fineTune.Event extends Object implements Serializable
-
Class com.unfbx.chatgpt.entity.fineTune.FineTune extends Object implements Serializable
-
Serialized Fields
-
batchSize
Integer batchSize
-
classificationBetas
List classificationBetas
-
classificationNClasses
Integer classificationNClasses
-
computeClassificationMetrics
boolean computeClassificationMetrics
-
learningRateMultiplier
Double learningRateMultiplier
-
model
String model
参考- See Also:
FineTune.Model
-
n_epochs
Integer n_epochs
-
promptLossWeight
Double promptLossWeight
-
suffix
String suffix
-
trainingFile
@NonNull String trainingFile
上传的文件ID -
validationFile
String validationFile
-
-
-
Class com.unfbx.chatgpt.entity.fineTune.FineTuneDeleteResponse extends Object implements Serializable
-
Class com.unfbx.chatgpt.entity.fineTune.FineTuneResponse extends Object implements Serializable
-
Serialized Fields
-
createdAt
long createdAt
-
events
List<Event> events
-
fineTunedModel
String fineTunedModel
-
hyperParams
HyperParam hyperParams
-
id
String id
-
model
String model
-
object
String object
-
organizationId
String organizationId
-
resultFiles
List resultFiles
-
status
String status
-
trainingFiles
List<TrainingFile> trainingFiles
-
updatedAt
long updatedAt
-
validationFiles
List validationFiles
-
-
-
Class com.unfbx.chatgpt.entity.fineTune.HyperParam extends Object implements Serializable
-
Class com.unfbx.chatgpt.entity.fineTune.TrainingFile extends Object implements Serializable
-
-
Package com.unfbx.chatgpt.entity.fineTune.job
-
Class com.unfbx.chatgpt.entity.fineTune.job.FineTuneJob extends Object implements Serializable
-
Serialized Fields
-
hyperParameters
HyperParameters hyperParameters
用于微调工作的参数 -
model
String model
参考- See Also:
FineTuneJob.Model
-
suffix
String suffix
-
trainingFile
String trainingFile
上传的文件ID -
validationFile
String validationFile
-
-
-
Class com.unfbx.chatgpt.entity.fineTune.job.FineTuneJobEvent extends Object implements Serializable
-
Class com.unfbx.chatgpt.entity.fineTune.job.FineTuneJobListResponse extends Object implements Serializable
-
Class com.unfbx.chatgpt.entity.fineTune.job.FineTuneJobResponse extends Object implements Serializable
-
Serialized Fields
-
createdAt
Long createdAt
-
data
String data
-
error
FineTuneError error
-
fineTunedModel
String fineTunedModel
-
finishedAt
Long finishedAt
-
hyperparameters
HyperParameters hyperparameters
-
id
String id
-
model
String model
-
object
String object
-
organizationId
String organizationId
-
resultFiles
List<String> resultFiles
-
status
String status
-
trainedTokens
Integer trainedTokens
-
trainingFile
String trainingFile
-
validationFile
String validationFile
-
-
-
Class com.unfbx.chatgpt.entity.fineTune.job.HyperParameters extends Object implements Serializable
-
-
Package com.unfbx.chatgpt.entity.images
-
Class com.unfbx.chatgpt.entity.images.Image extends Object implements Serializable
-
Serialized Fields
-
model
String model
支持dall-e-2、dall-e-3- See Also:
Image.Model
-
n
Integer n
为每个提示生成的个数,dall-e-3只能为1。 -
prompt
String prompt
提示词:dall-e-2支持1000字符、dall-e-3支持4000字符 -
quality
String quality
此参数仅仅dall-e-3,默认值:standard- See Also:
Image.Quality
-
responseFormat
String responseFormat
生成图片格式:url、b64_json- See Also:
ResponseFormat
-
size
String size
图片尺寸,默认值:1024x1024 dall-e-2支持:256x256, 512x512, or 1024x1024 dall-e-3支持:1024x1024, 1792x1024, or 1024x1792- See Also:
SizeEnum
-
style
String style
此参数仅仅dall-e-3,取值范围:vivid、natural 默认值:vivid- See Also:
Image.Style
-
user
String user
-
-
-
Class com.unfbx.chatgpt.entity.images.ImageEdit extends Object implements Serializable
-
Class com.unfbx.chatgpt.entity.images.ImageResponse extends Object implements Serializable
-
Class com.unfbx.chatgpt.entity.images.ImageVariations extends Object implements Serializable
-
Class com.unfbx.chatgpt.entity.images.Item extends Object implements Serializable
-
-
Package com.unfbx.chatgpt.entity.models
-
Class com.unfbx.chatgpt.entity.models.Model extends Object implements Serializable
-
Class com.unfbx.chatgpt.entity.models.ModelResponse extends Object implements Serializable
-
Class com.unfbx.chatgpt.entity.models.Permission extends Object implements Serializable
-
Serialized Fields
-
allowCreateEngine
boolean allowCreateEngine
-
allowFineTuning
boolean allowFineTuning
-
allowLogprobs
boolean allowLogprobs
-
allowSampling
boolean allowSampling
-
allowSearchIndices
boolean allowSearchIndices
-
allowView
boolean allowView
-
created
long created
-
group
Object group
不知道是什么类型的数据 -
id
String id
-
isBlocking
boolean isBlocking
-
object
String object
-
organization
String organization
-
-
-
-
Package com.unfbx.chatgpt.entity.moderations
-
Class com.unfbx.chatgpt.entity.moderations.Categories extends Object implements Serializable
-
Serialized Fields
-
harassment
boolean harassment
对任何目标表达、煽动或宣扬骚扰性语言的内容。 -
harassmentThreatening
boolean harassmentThreatening
骚扰内容还包括对任何目标的暴力或严重伤害。 -
hate
boolean hate
表达、煽动或宣扬基于种族、性别、民族、宗教、国籍、性取向、残疾状况或种姓的仇恨的内容。 -
hateThreatening
boolean hateThreatening
仇恨内容,还包括对目标群体的暴力或严重伤害。 -
selfHarm
boolean selfHarm
宣扬、鼓励或描绘自残行为(例如自杀、割伤和饮食失调)的内容。 -
selfHarmInstructions
boolean selfHarmInstructions
鼓励进行自残行为(例如自杀、割伤和饮食失调)的内容,或者提供有关如何实施此类行为的说明或建议的内容。 -
selfHarmIntent
boolean selfHarmIntent
说话者表示他们正在或打算进行自残行为的内容,例如自杀、割伤和饮食失调。 -
sexual
boolean sexual
旨在引起性兴奋的内容,例如对性活动的描述,或宣传性服务(不包括性教育和健康)的内容。 -
sexualMinors
boolean sexualMinors
包含未满 18 周岁的个人的色情内容。 -
violence
boolean violence
宣扬或美化暴力或歌颂他人遭受苦难或羞辱的内容。 -
violenceGraphic
boolean violenceGraphic
以极端血腥细节描绘死亡、暴力或严重身体伤害的暴力内容。
-
-
-
Class com.unfbx.chatgpt.entity.moderations.CategoryScores extends Object implements Serializable
-
Serialized Fields
-
harassment
BigDecimal harassment
对任何目标表达、煽动或宣扬骚扰性语言的内容。 -
harassmentThreatening
BigDecimal harassmentThreatening
骚扰内容还包括对任何目标的暴力或严重伤害。 -
hate
BigDecimal hate
-
hateThreatening
BigDecimal hateThreatening
-
selfHarm
BigDecimal selfHarm
-
selfHarmInstructions
BigDecimal selfHarmInstructions
鼓励进行自残行为(例如自杀、割伤和饮食失调)的内容,或者提供有关如何实施此类行为的说明或建议的内容。 -
selfHarmIntent
BigDecimal selfHarmIntent
说话者表示他们正在或打算进行自残行为的内容,例如自杀、割伤和饮食失调。 -
sexual
BigDecimal sexual
-
sexualMinors
BigDecimal sexualMinors
-
violence
BigDecimal violence
-
violenceGraphic
BigDecimal violenceGraphic
-
-
-
Class com.unfbx.chatgpt.entity.moderations.Moderation extends Object implements Serializable
-
Class com.unfbx.chatgpt.entity.moderations.ModerationResponse extends Object implements Serializable
-
Class com.unfbx.chatgpt.entity.moderations.Result extends Object implements Serializable
-
Serialized Fields
-
categories
Categories categories
-
categoryScores
CategoryScores categoryScores
-
flagged
boolean flagged
-
-
-
-
Package com.unfbx.chatgpt.entity.whisper
-
Class com.unfbx.chatgpt.entity.whisper.Transcriptions extends Whisper implements Serializable
-
Serialized Fields
-
language
String language
输入音频的语言,以 ISO-639-1 格式提供输入语言将提高准确性和延迟。 参考:ISO-639-1 -
model
String model
模型目前只支持这一种:WHISPER_1 -
prompt
String prompt
提示语,需要与语音语言匹配 -
responseFormat
String responseFormat
输出的格式,采用以下选项之一:json、text、srt、verbose_json 或 vtt。 默认值:json -
temperature
Double temperature
温度控制随机效果:0-1,值越大输出更加随机 默认值:0
-
-
-
Class com.unfbx.chatgpt.entity.whisper.Whisper extends Object implements Serializable
-
Class com.unfbx.chatgpt.entity.whisper.WhisperResponse extends Object implements Serializable
-
Serialized Fields
-
text
String text
-
-
-
-
Package com.unfbx.chatgpt.exception
-
Class com.unfbx.chatgpt.exception.BaseException extends RuntimeException implements Serializable
-
Serialized Fields
-
code
int code
-
msg
String msg
-
-
-