-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmodels.go
206 lines (178 loc) · 7.28 KB
/
models.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
package openai
/*
$ op run -- sh -c 'curl -v https://api.openai.com/v1/models -H "Authorization: Bearer $OPENAI_API_KEY"' | jq -r '.data[].id'
babbage
ada
text-davinci-002
davinci
text-embedding-ada-002
babbage-code-search-code
text-similarity-babbage-001
text-davinci-001
curie-instruct-beta
babbage-code-search-text
babbage-similarity
text-davinci-003
code-davinci-002
curie-search-query
code-search-babbage-text-001
code-cushman-001
code-search-babbage-code-001
text-ada-001
text-similarity-ada-001
text-davinci-insert-002
ada-code-search-code
ada-similarity
code-search-ada-text-001
text-search-ada-query-001
text-curie-001
text-davinci-edit-001
davinci-search-document
ada-code-search-text
text-search-ada-doc-001
code-davinci-edit-001
davinci-instruct-beta
text-babbage-001
text-similarity-curie-001
code-search-ada-code-001
ada-search-query
text-search-davinci-query-001
curie-similarity
davinci-search-query
text-davinci-insert-001
babbage-search-document
ada-search-document
curie
text-search-babbage-doc-001
text-search-curie-doc-001
text-search-curie-query-001
babbage-search-query
text-search-davinci-doc-001
text-search-babbage-query-001
curie-search-document
text-similarity-davinci-001
audio-transcribe-001
davinci-similarity
cushman:2020-05-03
ada:2020-05-03
babbage:2020-05-03
curie:2020-05-03
davinci:2020-05-03
if-davinci-v2
if-curie-v2
if-davinci:3.0.0
davinci-if:3.0.0
davinci-instruct-beta:2.0.0
text-ada:001
text-davinci:001
text-curie:001
text-babbage:001
*/
// Model is a known OpenAI model identifier.
type Model = string
// https://beta.openai.com/docs/models/finding-the-right-model
const (
// ModelAda is the Ada model.
//
// Ada is usually the fastest model and can perform tasks like parsing text, address correction and certain kinds of classification
// tasks that don’t require too much nuance. Ada’s performance can often be improved by providing more context.
//
// Good at: Parsing text, simple classification, address correction, keywords
//
// Note: Any task performed by a faster model like Ada can be performed by a more powerful model like Curie or Davinci.
//
// https://beta.openai.com/docs/models/ada
ModelAda Model = "ada"
// ModelBabbage is the Babbage model.
//
// Babbage can perform straightforward tasks like simple classification. It’s also quite capable when it comes to Semantic Search
// ranking how well documents match up with search queries.
//
// Good at: Moderate classification, semantic search classification
//
// https://beta.openai.com/docs/models/babbage
ModelBabbage Model = "babbage"
// ModelCurie is the Curie model.
//
// Curie is extremely powerful, yet very fast. While Davinci is stronger when it comes to analyzing complicated text, Curie is q
// uite capable for many nuanced tasks like sentiment classification and summarization. Curie is also quite good at answering
// questions and performing Q&A and as a general service chatbot.
//
// Good at: Language translation, complex classification, text sentiment, summarization
//
// https://beta.openai.com/docs/models/curie
ModelCurie Model = "curie"
// ModelDavinci is the Davinci model.
//
// Davinci is the most capable model family and can perform any task the other models can perform and often with less instruction.
// For applications requiring a lot of understanding of the content, like summarization for a specific audience and creative content
// generation, Davinci is going to produce the best results. These increased capabilities require more compute resources, so Davinci
// costs more per API call and is not as fast as the other models.
//
// Another area where Davinci shines is in understanding the intent of text. Davinci is quite good at solving many kinds of logic problems
// and explaining the motives of characters. Davinci has been able to solve some of the most challenging AI problems involving cause and effect.
//
// Good at: Complex intent, cause and effect, summarization for audience
//
// https://beta.openai.com/docs/models/davinci
ModelDavinci Model = "davinci"
// https://beta.openai.com/docs/models/gpt-3
// Most capable GPT-3 model. Can do any task the other models can do, often with higher quality, longer output and better instruction-following.
// Also supports inserting completions within text.
ModelTextDavinciEdit003 Model = "text-davinci-003"
// Very capable, but faster and lower cost than Davinci.
ModelTextCurie001 Model = "text-curie-001"
// Capable of straightforward tasks, very fast, and lower cost.
ModelBabbage001 Model = "text-babbage-001"
// Capable of very simple tasks, usually the fastest model in the GPT-3 series, and lowest cost.
ModelAda001 Model = "text-ada-001"
// https://beta.openai.com/docs/models/codex
// Most capable Codex model. Particularly good at translating natural language to code. In addition to completing code, also supports inserting completions within code.
ModelCodeDavinci002 Model = "code-davinci-002"
// Almost as capable as Davinci Codex, but slightly faster. This speed advantage may make it preferable for real-time applications.
ModelCodeCushman001 Model = "code-cushman-001"
// Used for the CreateEdit API endpoint.
ModelTextDavinciEdit001 Model = "text-davinci-edit-001"
ModelCodeDavinciEdit001 Model = "code-davinci-edit-001"
// https://platform.openai.com/docs/guides/embeddings/embedding-models
ModelTextEmbeddingAda001 Model = "text-embedding-ada-001"
// This is the previously recommend model for nearly all embedding use cases.
//
// https://openai.com/blog/new-and-improved-embedding-model
ModelTextEmbeddingAda002 Model = "text-embedding-ada-002"
// These models are the latest and greatest for embedding use cases.
//
// https://openai.com/blog/new-embedding-models-and-api-updates
ModelTextEmbedding3Small Model = "text-embedding-3-small"
ModelTextEmbedding3Large Model = "text-embedding-3-large"
// https://platform.openai.com/docs/api-reference/chat/create#chat/create-model
ModelGPT35Turbo Model = "gpt-3.5-turbo"
ModelGPT35Turbo0301 Model = "gpt-3.5-turbo-0301"
ModelGPT35Turbo0613 Model = "gpt-3.5-turbo-0613"
ModelGPT35Turbo1106 Model = "gpt-3.5-turbo-1106"
ModelGPT35Turbo16k Model = "gpt-3.5-turbo-16k"
ModelGPT35Turbo16k0613 Model = "gpt-3.5-turbo-16k-0613"
ModelGPT35TurboInstruct Model = "gpt-3.5-turbo-instruct"
ModelGPT35TurboInstruct0914 Model = "gpt-3.5-turbo-instruct-0914"
ModelGPT35Turbo0125 Model = "gpt-3.5-turbo-0125"
ModelGPT4 Model = "gpt-4"
ModelGPT40314 Model = "gpt-4-0314"
ModelGPT40613 Model = "gpt-4-0613"
ModelGPT432K Model = "gpt-4-32k"
ModelGPT432K0314 Model = "gpt-4-32k-0314"
ModelGPT41106Previw Model = "gpt-4-1106-preview"
ModelGPT4VisionPreview Model = "gpt-4-vision-preview"
ModelGPT40125Preview Model = "gpt-4-0125-preview"
ModelGPT4TurboPreview Model = "gpt-4-turbo-preview"
ModelWhisper1 Model = "whisper-1"
ModelTTS1 Model = "tts-1"
ModelTTS11106 Model = "tts-1-1106"
ModelTTS1HD Model = "tts-1-hd"
ModelTTS1HD1106 Model = "tts-1-hd-1106"
ModelTextModeration007 Model = "text-moderation-007"
ModelTextModerationLatest Model = "text-moderation-latest"
ModelTextModerationStable Model = "text-moderation-stable"
ModelDallE2 Model = "dall-e-2"
ModelDallE3 Model = "dall-e-3"
// TODO: add more "known" models.
)