-
Notifications
You must be signed in to change notification settings - Fork 709
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
226 additions
and
3 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
33 changes: 33 additions & 0 deletions
33
src/main/java/com/plexpt/chatgpt/entity/DeleteResponse.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,33 @@ | ||
package com.plexpt.chatgpt.entity; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import lombok.Data; | ||
|
||
/** | ||
* 删除对象时的响应 | ||
* A response when deleting an object | ||
*/ | ||
@Data | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class DeleteResponse { | ||
|
||
/** | ||
* 对象的ID | ||
* The id of the object. | ||
*/ | ||
private String id; | ||
|
||
/** | ||
* 删除的对象类型,例如 "file" 或 "model" | ||
* The type of object deleted, for example "file" or "model" | ||
*/ | ||
private String object; | ||
|
||
/** | ||
* 如果成功删除则为 true | ||
* True if successfully deleted | ||
*/ | ||
private boolean deleted; | ||
|
||
|
||
} |
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,70 @@ | ||
package com.plexpt.chatgpt.entity; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Data; | ||
|
||
/** | ||
* 上传到 OpenAI 的文件 | ||
* A file uploaded to OpenAI | ||
* <p> | ||
* https://beta.openai.com/docs/api-reference/files | ||
*/ | ||
@Data | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class FileResponse { | ||
|
||
/** | ||
* 文件的唯一ID | ||
* The unique id of this file. | ||
*/ | ||
private String id; | ||
|
||
/** | ||
* 返回的对象类型,应为 "file" | ||
* The type of object returned, should be "file". | ||
*/ | ||
private String object; | ||
|
||
/** | ||
* 文件大小(以字节为单位) | ||
* File size in bytes. | ||
*/ | ||
private Long bytes; | ||
|
||
/** | ||
* 创建时间(以秒为单位的纪元时间) | ||
* The creation time in epoch seconds. | ||
*/ | ||
@JsonProperty("created_at") | ||
private Long createdAt; | ||
|
||
/** | ||
* 文件名 | ||
* The name of the file. | ||
*/ | ||
private String filename; | ||
|
||
/** | ||
* 文件用途的描述 | ||
* Description of the file's purpose. | ||
*/ | ||
private String purpose; | ||
|
||
/** | ||
* 文件的当前状态,可以是 uploaded, processed, pending, error, deleting 或 deleted | ||
* The current status of the file, which can be either uploaded, processed, pending, error, deleting or deleted. | ||
*/ | ||
private String status; | ||
|
||
/** | ||
* 文件状态的附加详细信息 | ||
* 如果文件处于错误状态,这将包括描述错误的消息 | ||
* Additional details about the status of the file. | ||
* If the file is in the error state, this will include a message describing the error. | ||
*/ | ||
@JsonProperty("status_details") | ||
private String statusDetails; | ||
|
||
|
||
} |