-
Notifications
You must be signed in to change notification settings - Fork 2
/
model.go
27 lines (24 loc) · 1.16 KB
/
model.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package gochatgptsdk
type ModelText struct {
Model string `json:"model"`
Prompt string `json:"prompt"`
MaxTokens int `json:"max_tokens,omitempty"`
Temperature int `json:"temperature,omitempty"`
TopP int `json:"top_p,omitempty"`
FrequencyPenalty int `json:"frequency_penalty,omitempty"`
PresencePenalty int `json:"presence_penalty,omitempty"`
}
type ModelImages struct {
Prompt string `json:"prompt"`
N int `json:"n,omitempty"` // default to 1
Size string `json:"size,omitempty"` // default 1024x1024
ResponseFormat string `json:"response_format,omitempty"` // url or b64_json
User string `json:"user,omitempty"`
}
type ModelImagesVariations struct {
Image string `json:"image"` // must be valid PNG file, less than 4MB, and square
N string `json:"n,omitempty"` // default to 1
Size string `json:"size,omitempty"` // default 1024x1024
ResponseFormat string `json:"response_format,omitempty"` // url or b64_json
User string `json:"user,omitempty"`
}