66 "net/http"
77)
88
9+ // Deprecated: On August 22nd, 2023, OpenAI announced the deprecation of the /v1/fine-tunes API.
10+ // This API will be officially deprecated on January 4th, 2024.
11+ // OpenAI recommends to migrate to the new fine tuning API implemented in fine_tuning_job.go.
912type FineTuneRequest struct {
1013 TrainingFile string `json:"training_file"`
1114 ValidationFile string `json:"validation_file,omitempty"`
@@ -21,6 +24,9 @@ type FineTuneRequest struct {
2124 Suffix string `json:"suffix,omitempty"`
2225}
2326
27+ // Deprecated: On August 22nd, 2023, OpenAI announced the deprecation of the /v1/fine-tunes API.
28+ // This API will be officially deprecated on January 4th, 2024.
29+ // OpenAI recommends to migrate to the new fine tuning API implemented in fine_tuning_job.go.
2430type FineTune struct {
2531 ID string `json:"id"`
2632 Object string `json:"object"`
@@ -37,35 +43,54 @@ type FineTune struct {
3743 UpdatedAt int64 `json:"updated_at"`
3844}
3945
46+ // Deprecated: On August 22nd, 2023, OpenAI announced the deprecation of the /v1/fine-tunes API.
47+ // This API will be officially deprecated on January 4th, 2024.
48+ // OpenAI recommends to migrate to the new fine tuning API implemented in fine_tuning_job.go.
4049type FineTuneEvent struct {
4150 Object string `json:"object"`
4251 CreatedAt int64 `json:"created_at"`
4352 Level string `json:"level"`
4453 Message string `json:"message"`
4554}
4655
56+ // Deprecated: On August 22nd, 2023, OpenAI announced the deprecation of the /v1/fine-tunes API.
57+ // This API will be officially deprecated on January 4th, 2024.
58+ // OpenAI recommends to migrate to the new fine tuning API implemented in fine_tuning_job.go.
4759type FineTuneHyperParams struct {
4860 BatchSize int `json:"batch_size"`
4961 LearningRateMultiplier float64 `json:"learning_rate_multiplier"`
5062 Epochs int `json:"n_epochs"`
5163 PromptLossWeight float64 `json:"prompt_loss_weight"`
5264}
5365
66+ // Deprecated: On August 22nd, 2023, OpenAI announced the deprecation of the /v1/fine-tunes API.
67+ // This API will be officially deprecated on January 4th, 2024.
68+ // OpenAI recommends to migrate to the new fine tuning API implemented in fine_tuning_job.go.
5469type FineTuneList struct {
5570 Object string `json:"object"`
5671 Data []FineTune `json:"data"`
5772}
73+
74+ // Deprecated: On August 22nd, 2023, OpenAI announced the deprecation of the /v1/fine-tunes API.
75+ // This API will be officially deprecated on January 4th, 2024.
76+ // OpenAI recommends to migrate to the new fine tuning API implemented in fine_tuning_job.go.
5877type FineTuneEventList struct {
5978 Object string `json:"object"`
6079 Data []FineTuneEvent `json:"data"`
6180}
6281
82+ // Deprecated: On August 22nd, 2023, OpenAI announced the deprecation of the /v1/fine-tunes API.
83+ // This API will be officially deprecated on January 4th, 2024.
84+ // OpenAI recommends to migrate to the new fine tuning API implemented in fine_tuning_job.go.
6385type FineTuneDeleteResponse struct {
6486 ID string `json:"id"`
6587 Object string `json:"object"`
6688 Deleted bool `json:"deleted"`
6789}
6890
91+ // Deprecated: On August 22nd, 2023, OpenAI announced the deprecation of the /v1/fine-tunes API.
92+ // This API will be officially deprecated on January 4th, 2024.
93+ // OpenAI recommends to migrate to the new fine tuning API implemented in fine_tuning_job.go.
6994func (c * Client ) CreateFineTune (ctx context.Context , request FineTuneRequest ) (response FineTune , err error ) {
7095 urlSuffix := "/fine-tunes"
7196 req , err := c .newRequest (ctx , http .MethodPost , c .fullURL (urlSuffix ), withBody (request ))
@@ -78,6 +103,9 @@ func (c *Client) CreateFineTune(ctx context.Context, request FineTuneRequest) (r
78103}
79104
80105// CancelFineTune cancel a fine-tune job.
106+ // Deprecated: On August 22nd, 2023, OpenAI announced the deprecation of the /v1/fine-tunes API.
107+ // This API will be officially deprecated on January 4th, 2024.
108+ // OpenAI recommends to migrate to the new fine tuning API implemented in fine_tuning_job.go.
81109func (c * Client ) CancelFineTune (ctx context.Context , fineTuneID string ) (response FineTune , err error ) {
82110 req , err := c .newRequest (ctx , http .MethodPost , c .fullURL ("/fine-tunes/" + fineTuneID + "/cancel" ))
83111 if err != nil {
@@ -88,6 +116,9 @@ func (c *Client) CancelFineTune(ctx context.Context, fineTuneID string) (respons
88116 return
89117}
90118
119+ // Deprecated: On August 22nd, 2023, OpenAI announced the deprecation of the /v1/fine-tunes API.
120+ // This API will be officially deprecated on January 4th, 2024.
121+ // OpenAI recommends to migrate to the new fine tuning API implemented in fine_tuning_job.go.
91122func (c * Client ) ListFineTunes (ctx context.Context ) (response FineTuneList , err error ) {
92123 req , err := c .newRequest (ctx , http .MethodGet , c .fullURL ("/fine-tunes" ))
93124 if err != nil {
@@ -98,6 +129,9 @@ func (c *Client) ListFineTunes(ctx context.Context) (response FineTuneList, err
98129 return
99130}
100131
132+ // Deprecated: On August 22nd, 2023, OpenAI announced the deprecation of the /v1/fine-tunes API.
133+ // This API will be officially deprecated on January 4th, 2024.
134+ // OpenAI recommends to migrate to the new fine tuning API implemented in fine_tuning_job.go.
101135func (c * Client ) GetFineTune (ctx context.Context , fineTuneID string ) (response FineTune , err error ) {
102136 urlSuffix := fmt .Sprintf ("/fine-tunes/%s" , fineTuneID )
103137 req , err := c .newRequest (ctx , http .MethodGet , c .fullURL (urlSuffix ))
@@ -109,6 +143,9 @@ func (c *Client) GetFineTune(ctx context.Context, fineTuneID string) (response F
109143 return
110144}
111145
146+ // Deprecated: On August 22nd, 2023, OpenAI announced the deprecation of the /v1/fine-tunes API.
147+ // This API will be officially deprecated on January 4th, 2024.
148+ // OpenAI recommends to migrate to the new fine tuning API implemented in fine_tuning_job.go.
112149func (c * Client ) DeleteFineTune (ctx context.Context , fineTuneID string ) (response FineTuneDeleteResponse , err error ) {
113150 req , err := c .newRequest (ctx , http .MethodDelete , c .fullURL ("/fine-tunes/" + fineTuneID ))
114151 if err != nil {
@@ -119,6 +156,9 @@ func (c *Client) DeleteFineTune(ctx context.Context, fineTuneID string) (respons
119156 return
120157}
121158
159+ // Deprecated: On August 22nd, 2023, OpenAI announced the deprecation of the /v1/fine-tunes API.
160+ // This API will be officially deprecated on January 4th, 2024.
161+ // OpenAI recommends to migrate to the new fine tuning API implemented in fine_tuning_job.go.
122162func (c * Client ) ListFineTuneEvents (ctx context.Context , fineTuneID string ) (response FineTuneEventList , err error ) {
123163 req , err := c .newRequest (ctx , http .MethodGet , c .fullURL ("/fine-tunes/" + fineTuneID + "/events" ))
124164 if err != nil {
0 commit comments