Skip to content

Commit

Permalink
udpate some type to optimize usage (sashabaranov#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
jooyyy authored Mar 9, 2023
1 parent 34e1e10 commit 11052c6
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions fine_tunes.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,24 @@ type FineTuneRequest struct {
}

type FineTune struct {
ID string `json:"id"`
Object string `json:"object"`
Model string `json:"model"`
CreatedAt int `json:"created_at"`
FineTunedModel string `json:"fine_tuned_model"`
Hyperparams FineTuneHyperParams `json:"hyperparams"`
OrganizationID string `json:"organization_id"`
ResultFiles []File `json:"result_files"`
Status string `json:"status"`
ValidationFiles []File `json:"validation_files"`
TrainingFiles []File `json:"training_files"`
UpdatedAt int `json:"updated_at"`
ID string `json:"id"`
Object string `json:"object"`
Model string `json:"model"`
CreatedAt int64 `json:"created_at"`
FineTuneEventList []FineTuneEvent `json:"events,omitempty"`
FineTunedModel string `json:"fine_tuned_model"`
HyperParams FineTuneHyperParams `json:"hyperparams"`
OrganizationID string `json:"organization_id"`
ResultFiles []File `json:"result_files"`
Status string `json:"status"`
ValidationFiles []File `json:"validation_files"`
TrainingFiles []File `json:"training_files"`
UpdatedAt int64 `json:"updated_at"`
}

type FineTuneEvent struct {
Object string `json:"object"`
CreatedAt int `json:"created_at"`
CreatedAt int64 `json:"created_at"`
Level string `json:"level"`
Message string `json:"message"`
}
Expand Down Expand Up @@ -84,7 +85,7 @@ func (c *Client) CreateFineTune(ctx context.Context, request FineTuneRequest) (r
return
}

// Cancel a fine-tune job.
// CancelFineTune cancel a fine-tune job.
func (c *Client) CancelFineTune(ctx context.Context, fineTuneID string) (response FineTune, err error) {
req, err := http.NewRequestWithContext(ctx, http.MethodPost, c.fullURL("/fine-tunes/"+fineTuneID+"/cancel"), nil)
if err != nil {
Expand Down

0 comments on commit 11052c6

Please sign in to comment.