Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 761350a

Browse filesBrowse files
authored
Add File status fields (TheoKanning#381)
Fixes TheoKanning#355
1 parent fe42958 commit 761350a
Copy full SHA for 761350a

File tree

Expand file treeCollapse file tree

2 files changed

+16
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+16
-2
lines changed

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

Copy file name to clipboardExpand all lines: api/src/main/java/com/theokanning/openai/file/File.java
+12Lines changed: 12 additions & 0 deletions
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

Copy file name to clipboardExpand all lines: api/src/test/resources/fixtures/File.json
+4-2Lines changed: 4 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.