Skip to content

Commit

Permalink
Merge pull request #33 from yorinasub17/bug/chat-completion-temperatu…
Browse files Browse the repository at this point in the history
…rezero

Switch to using pointers for omitempty number fields in ChatCompletionRequest
  • Loading branch information
tylermann authored Mar 20, 2023
2 parents 8e4b506 + ba7d244 commit f4f8f0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ type ChatCompletionRequest struct {
Messages []ChatCompletionRequestMessage `json:"messages"`

// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic
Temperature float32 `json:"temperature,omitempty"`
Temperature *float32 `json:"temperature,omitempty"`

// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
TopP float32 `json:"top_p,omitempty"`
Expand Down

0 comments on commit f4f8f0f

Please sign in to comment.