Skip to content

Commit

Permalink
Add Suffix to CompletionRequest for insert mode (sashabaranov#36)
Browse files Browse the repository at this point in the history
Add "Suffix" to "CompletionRequest" to support the new insert mode.

Insert mode info: https://openai.com/blog/gpt-3-edit-insert/
New Completion Request API Reference: https://beta.openai.com/docs/api-reference/completions/create#completions/create-prompt
  • Loading branch information
zacherystuart authored Dec 2, 2022
1 parent 3697bf4 commit 0f9f4aa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const (
type CompletionRequest struct {
Model string `json:"model"`
Prompt string `json:"prompt,omitempty"`
Suffix string `json:"suffix,omitempty"`
MaxTokens int `json:"max_tokens,omitempty"`
Temperature float32 `json:"temperature,omitempty"`
TopP float32 `json:"top_p,omitempty"`
Expand Down

0 comments on commit 0f9f4aa

Please sign in to comment.