@@ -6,16 +6,28 @@ import (
6
6
)
7
7
8
8
const (
9
- DAVINCI = "davinci"
10
- CURIE = "curie"
11
- BABBAGE = "babbage"
12
- ADA = "ada"
13
- CURIE_INSTRUCT_BETA = "curie-instruct-beta"
14
- DAVINCI_INSTRUCT_BETA = "davinci-instruct-beta"
9
+ DAVINCI = "davinci"
10
+ CURIE = "curie"
11
+ BABBAGE = "babbage"
12
+ ADA = "ada"
13
+ CURIE_INSTRUCT_BETA = "curie-instruct-beta"
14
+ DAVINCI_INSTRUCT_BETA = "davinci-instruct-beta"
15
+
16
+ // CURSING_FILTER_V6 Content filters moderate output and input to the api to
17
+ //avoid negative content generation
15
18
CURSING_FILTER_V6 = "cursing-filter-v6"
16
19
CONTENT_FILTER_DEV = "content-filter-dev"
17
20
CONTENT_FILTER_ALPHA_C4 = "content-filter-alpha-c4"
21
+
22
+ // DAVINCI_CODEX Codex engines for code generation.
23
+ //Davinci Codex is more capable, particularly for translating natural language to code
24
+ DAVINCI_CODEX = "davinci-codex"
25
+
26
+ // CUSHMAN_CODEX Cushman Codex is almost as capable, but slightly faster.
27
+ //This speed advantage may be preferable for real-time applications.
28
+ CUSHMAN_CODEX = "cushman-codex"
18
29
)
30
+
19
31
//
20
32
const (
21
33
getRequest = "GET"
@@ -111,9 +123,9 @@ func (r *FilesRequest) getRequestMeta(config RequestConfig) (string, string) {
111
123
}
112
124
113
125
// File models
114
- type FileRequest struct {
115
- File os.File `json:"file"`
116
- Purpose string `json:"purpose"`
126
+ type FileRequest struct {
127
+ File os.File `json:"file"`
128
+ Purpose string `json:"purpose"`
117
129
}
118
130
119
131
type FileResponse struct {
@@ -172,15 +184,15 @@ func (r *CompletionResponse) GetBody() Response {
172
184
}
173
185
174
186
//ContentFilterRequest Content filter model structures
175
- type ContentFilterRequest struct {
176
- Prompt string `json:"prompt"`
177
- MaxTokens int `json:"max_tokens"`
178
- Temperature float32 `json:"temperature,omitempty"`
179
- TopP float32 `json:"top_p,omitempty"`
180
- N int `json:"n,omitempty"`
181
- Logprobs int `json:"logprobs,omitempty"`
182
- PresencePenalty float32 `json:"presence_penalty,omitempty"`
183
- FrequencyPenalty float32 `json:"frequency_penalty,omitempty"`
187
+ type ContentFilterRequest struct {
188
+ Prompt string `json:"prompt"`
189
+ MaxTokens int `json:"max_tokens"`
190
+ Temperature float32 `json:"temperature,omitempty"`
191
+ TopP float32 `json:"top_p,omitempty"`
192
+ N int `json:"n,omitempty"`
193
+ Logprobs int `json:"logprobs,omitempty"`
194
+ PresencePenalty float32 `json:"presence_penalty,omitempty"`
195
+ FrequencyPenalty float32 `json:"frequency_penalty,omitempty"`
184
196
}
185
197
186
198
func (r * ContentFilterRequest ) attachResponse () Response {
0 commit comments