File tree 2 files changed +18
-3
lines changed
2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ type FineTuningJob struct {
24
24
}
25
25
26
26
type Hyperparameters struct {
27
- Epochs int `json:"n_epochs"`
27
+ Epochs any `json:"n_epochs,omitempty "`
28
28
}
29
29
30
30
type FineTuningJobRequest struct {
Original file line number Diff line number Diff line change @@ -21,8 +21,23 @@ func TestFineTuningJob(t *testing.T) {
21
21
server .RegisterHandler (
22
22
"/v1/fine_tuning/jobs" ,
23
23
func (w http.ResponseWriter , r * http.Request ) {
24
- var resBytes []byte
25
- resBytes , _ = json .Marshal (FineTuningJob {})
24
+ resBytes , _ := json .Marshal (FineTuningJob {
25
+ Object : "fine_tuning.job" ,
26
+ ID : testFineTuninigJobID ,
27
+ Model : "davinci-002" ,
28
+ CreatedAt : 1692661014 ,
29
+ FinishedAt : 1692661190 ,
30
+ FineTunedModel : "ft:davinci-002:my-org:custom_suffix:7q8mpxmy" ,
31
+ OrganizationID : "org-123" ,
32
+ ResultFiles : []string {"file-abc123" },
33
+ Status : "succeeded" ,
34
+ ValidationFile : "" ,
35
+ TrainingFile : "file-abc123" ,
36
+ Hyperparameters : Hyperparameters {
37
+ Epochs : "auto" ,
38
+ },
39
+ TrainedTokens : 5768 ,
40
+ })
26
41
fmt .Fprintln (w , string (resBytes ))
27
42
},
28
43
)
You can’t perform that action at this time.
0 commit comments