Skip to content

Commit 7977a70

Browse files
committed
remove omitempty tag from temperature fields (sashabaranov#333)
1 parent 61ba5f3 commit 7977a70

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

chat.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ type ChatCompletionRequest struct {
3434
Model string `json:"model"`
3535
Messages []ChatCompletionMessage `json:"messages"`
3636
MaxTokens int `json:"max_tokens,omitempty"`
37-
Temperature float32 `json:"temperature,omitempty"`
37+
Temperature float32 `json:"temperature"`
3838
TopP float32 `json:"top_p,omitempty"`
3939
N int `json:"n,omitempty"`
4040
Stream bool `json:"stream,omitempty"`

completion.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ type CompletionRequest struct {
9090
Prompt any `json:"prompt,omitempty"`
9191
Suffix string `json:"suffix,omitempty"`
9292
MaxTokens int `json:"max_tokens,omitempty"`
93-
Temperature float32 `json:"temperature,omitempty"`
93+
Temperature float32 `json:"temperature"`
9494
TopP float32 `json:"top_p,omitempty"`
9595
N int `json:"n,omitempty"`
9696
Stream bool `json:"stream,omitempty"`

edits.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type EditsRequest struct {
1212
Input string `json:"input,omitempty"`
1313
Instruction string `json:"instruction,omitempty"`
1414
N int `json:"n,omitempty"`
15-
Temperature float32 `json:"temperature,omitempty"`
15+
Temperature float32 `json:"temperature"`
1616
TopP float32 `json:"top_p,omitempty"`
1717
}
1818

0 commit comments

Comments
 (0)