Skip to content

Commit

Permalink
specify [@key "object"] for autogenerated types
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismamo1 committed Mar 11, 2023
1 parent ff55d58 commit 2fbe9ab
Show file tree
Hide file tree
Showing 19 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/models/create_answer_response.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*)

type t = {
_object: string option [@default None];
_object: string option [@default None] [@key "object"];
model: string option [@default None];
search_model: string option [@default None];
completion: string option [@default None];
Expand Down
2 changes: 1 addition & 1 deletion src/models/create_chat_completion_response.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

type t = {
id: string;
_object: string;
_object: string [@key "object"];
created: int32;
model: string;
choices: Create_chat_completion_response_choices.t list;
Expand Down
2 changes: 1 addition & 1 deletion src/models/create_classification_response.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*)

type t = {
_object: string option [@default None];
_object: string option [@default None] [@key "object"];
model: string option [@default None];
search_model: string option [@default None];
completion: string option [@default None];
Expand Down
2 changes: 1 addition & 1 deletion src/models/create_completion_response.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

type t = {
id: string;
_object: string;
_object: string [@key "object"];
created: int32;
model: string;
choices: Create_completion_response_choices.t list;
Expand Down
2 changes: 1 addition & 1 deletion src/models/create_edit_response.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*)

type t = {
_object: string;
_object: string [@key "object"];
created: int32;
choices: Create_completion_response_choices.t list;
usage: Create_completion_response_usage.t;
Expand Down
2 changes: 1 addition & 1 deletion src/models/create_embedding_response.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*)

type t = {
_object: string;
_object: string [@key "object"];
model: string;
data: Create_embedding_response_data.t list;
usage: Create_embedding_response_usage.t;
Expand Down
2 changes: 1 addition & 1 deletion src/models/create_embedding_response_data.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

type t = {
index: int32;
_object: string;
_object: string [@key "object"];
embedding: float list;
} [@@deriving yojson { strict = false }, show ];;

Expand Down
2 changes: 1 addition & 1 deletion src/models/create_search_response.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*)

type t = {
_object: string option [@default None];
_object: string option [@default None] [@key "object"];
model: string option [@default None];
data: Create_search_response_data.t list;
} [@@deriving yojson { strict = false }, show ];;
Expand Down
2 changes: 1 addition & 1 deletion src/models/create_search_response_data.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*)

type t = {
_object: string option [@default None];
_object: string option [@default None] [@key "object"];
document: int32 option [@default None];
score: float option [@default None];
} [@@deriving yojson { strict = false }, show ];;
Expand Down
2 changes: 1 addition & 1 deletion src/models/delete_file_response.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

type t = {
id: string;
_object: string;
_object: string [@key "object"];
deleted: bool;
} [@@deriving yojson { strict = false }, show ];;

Expand Down
2 changes: 1 addition & 1 deletion src/models/delete_model_response.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

type t = {
id: string;
_object: string;
_object: string [@key "object"];
deleted: bool;
} [@@deriving yojson { strict = false }, show ];;

Expand Down
4 changes: 2 additions & 2 deletions src/models/fine_tune.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

type t = {
id: string;
_object: string;
_object: string [@key "object"];
created_at: int32;
updated_at: int32;
model: string;
Expand All @@ -21,7 +21,7 @@ type t = {
events: Fine_tune_event.t list;
} [@@deriving yojson { strict = false }, show ];;

let create (id : string) (_object : string) (created_at : int32) (updated_at : int32) (model : string) (fine_tuned_model : stringoption) (organization_id : string) (status : string) (hyperparams : Yojson.Safe.t) (training_files : Open_ai_file.t list) (validation_files : Open_ai_file.t list) (result_files : Open_ai_file.t list) : t = {
let create (id : string) (_object : string) (created_at : int32) (updated_at : int32) (model : string) (fine_tuned_model : string option) (organization_id : string) (status : string) (hyperparams : Yojson.Safe.t) (training_files : Open_ai_file.t list) (validation_files : Open_ai_file.t list) (result_files : Open_ai_file.t list) : t = {
id = id;
_object = _object;
created_at = created_at;
Expand Down
2 changes: 1 addition & 1 deletion src/models/fine_tune_event.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*)

type t = {
_object: string;
_object: string [@key "object"];
created_at: int32;
level: string;
message: string;
Expand Down
2 changes: 1 addition & 1 deletion src/models/list_engines_response.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*)

type t = {
_object: string;
_object: string [@key "object"];
data: Engine.t list;
} [@@deriving yojson { strict = false }, show ];;

Expand Down
2 changes: 1 addition & 1 deletion src/models/list_files_response.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*)

type t = {
_object: string;
_object: string [@key "object"];
data: Open_ai_file.t list;
} [@@deriving yojson { strict = false }, show ];;

Expand Down
2 changes: 1 addition & 1 deletion src/models/list_fine_tune_events_response.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*)

type t = {
_object: string;
_object: string [@key "object"];
data: Fine_tune_event.t list;
} [@@deriving yojson { strict = false }, show ];;

Expand Down
2 changes: 1 addition & 1 deletion src/models/list_fine_tunes_response.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*)

type t = {
_object: string;
_object: string [@key "object"];
data: Fine_tune.t list;
} [@@deriving yojson { strict = false }, show ];;

Expand Down
2 changes: 1 addition & 1 deletion src/models/list_models_response.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*)

type t = {
_object: string;
_object: string [@key "object"];
data: Model.t list;
} [@@deriving yojson { strict = false }, show ];;

Expand Down
2 changes: 1 addition & 1 deletion src/models/open_ai_file.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

type t = {
id: string;
_object: string;
_object: string [@key "object"];
bytes: int32;
created_at: int32;
filename: string;
Expand Down

0 comments on commit 2fbe9ab

Please sign in to comment.