Skip to content
This repository was archived by the owner on Jun 6, 2024. It is now read-only.

Commit 761350a

Browse files
authored
Add File status fields (#381)
Fixes #355
1 parent fe42958 commit 761350a

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

api/src/main/java/com/theokanning/openai/file/File.java

+12
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,16 @@ public class File {
4141
* Description of the file's purpose.
4242
*/
4343
String purpose;
44+
45+
/**
46+
* The current status of the file, which can be either uploaded, processed, pending, error, deleting or deleted.
47+
*/
48+
String status;
49+
50+
/**
51+
* Additional details about the status of the file.
52+
* If the file is in the error state, this will include a message describing the error.
53+
*/
54+
@JsonProperty("status_details")
55+
String statusDetails;
4456
}

api/src/test/resources/fixtures/File.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@
44
"bytes": 175,
55
"created_at": 1613677385,
66
"filename": "train.jsonl",
7-
"purpose": "search"
8-
}
7+
"purpose": "search",
8+
"status": "error",
9+
"status_details": "File is too large."
10+
}

0 commit comments

Comments
 (0)