Skip to content

Commit

Permalink
remove omitempty tag from temperature fields (sashabaranov#333)
Browse files Browse the repository at this point in the history
  • Loading branch information
vvatanabe committed May 31, 2023
1 parent 61ba5f3 commit 7977a70
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type ChatCompletionRequest struct {
Model string `json:"model"`
Messages []ChatCompletionMessage `json:"messages"`
MaxTokens int `json:"max_tokens,omitempty"`
Temperature float32 `json:"temperature,omitempty"`
Temperature float32 `json:"temperature"`
TopP float32 `json:"top_p,omitempty"`
N int `json:"n,omitempty"`
Stream bool `json:"stream,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ type CompletionRequest struct {
Prompt any `json:"prompt,omitempty"`
Suffix string `json:"suffix,omitempty"`
MaxTokens int `json:"max_tokens,omitempty"`
Temperature float32 `json:"temperature,omitempty"`
Temperature float32 `json:"temperature"`
TopP float32 `json:"top_p,omitempty"`
N int `json:"n,omitempty"`
Stream bool `json:"stream,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion edits.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type EditsRequest struct {
Input string `json:"input,omitempty"`
Instruction string `json:"instruction,omitempty"`
N int `json:"n,omitempty"`
Temperature float32 `json:"temperature,omitempty"`
Temperature float32 `json:"temperature"`
TopP float32 `json:"top_p,omitempty"`
}

Expand Down

0 comments on commit 7977a70

Please sign in to comment.