From 3589837b229aeace205f312aa839bf73154e2820 Mon Sep 17 00:00:00 2001 From: NullpointerW <58949721+NullpointerW@users.noreply.github.com> Date: Thu, 7 Sep 2023 18:52:47 +0800 Subject: [PATCH] Update OpenAPI file return struct (#486) * completionBatchingRequestSupport * lint fix * fix Run test fail * fix TestClientReturnsRequestBuilderErrors fail * fix Codecov check * ignore TestClientReturnsRequestBuilderErrors lint * fix lint again * lint again*2 * replace checkPromptType implementation * remove nil check * update file return struct --------- Co-authored-by: W <825708370@qq.com> --- files.go | 15 ++++++++------- files_api_test.go | 1 - 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/files.go b/files.go index ea1f50a73..8b933c362 100644 --- a/files.go +++ b/files.go @@ -17,13 +17,14 @@ type FileRequest struct { // File struct represents an OpenAPI file. type File struct { - Bytes int `json:"bytes"` - CreatedAt int64 `json:"created_at"` - ID string `json:"id"` - FileName string `json:"filename"` - Object string `json:"object"` - Owner string `json:"owner"` - Purpose string `json:"purpose"` + Bytes int `json:"bytes"` + CreatedAt int64 `json:"created_at"` + ID string `json:"id"` + FileName string `json:"filename"` + Object string `json:"object"` + Status string `json:"status"` + Purpose string `json:"purpose"` + StatusDetails string `json:"status_details"` } // FilesList is a list of files that belong to the user or organization. diff --git a/files_api_test.go b/files_api_test.go index f0a08764d..1cbc72894 100644 --- a/files_api_test.go +++ b/files_api_test.go @@ -64,7 +64,6 @@ func handleCreateFile(w http.ResponseWriter, r *http.Request) { Purpose: purpose, CreatedAt: time.Now().Unix(), Object: "test-objecct", - Owner: "test-owner", } resBytes, _ = json.Marshal(fileReq)