You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: completion.go
+7-25Lines changed: 7 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,12 @@ import (
4
4
"bytes"
5
5
"context"
6
6
"encoding/json"
7
-
"fmt"
8
7
"net/http"
9
8
)
10
9
11
10
// CompletionRequest represents a request structure for completion API
12
11
typeCompletionRequeststruct {
13
-
Model*string`json:"model,omitempty"`
12
+
Modelstring`json:"model"`
14
13
Promptstring`json:"prompt,omitempty"`
15
14
MaxTokensint`json:"max_tokens,omitempty"`
16
15
Temperaturefloat32`json:"temperature,omitempty"`
@@ -60,29 +59,12 @@ type CompletionResponse struct {
60
59
UsageCompletionUsage`json:"usage"`
61
60
}
62
61
63
-
// CreateCompletion — API call to create a completion. This is the main endpoint of the API. Returns new text as well as, if requested, the probabilities over each alternative token at each position.
0 commit comments