-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathmodels.go
60 lines (54 loc) · 2 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
package openaigo
type (
ModelData struct {
ID string `json:"id"`
Object ObjectType `json:"object"`
Created int64 `json:"created"`
OwnedBy string `json:"owned_by"`
Permission []ModelPermission `json:"permission"`
Root string `json:"root"`
Parent string `json:"parent"`
}
ModelPermission struct {
ID string `json:"id"`
Object ObjectType `json:"object"`
Created int64 `json:"created"`
AllowCreateEngine bool `json:"allow_create_engine"`
AllowSampling bool `json:"allow_sampling"`
AllowLogProbs bool `json:"allow_logprobs"`
AllowSearchIndices bool `json:"allow_search_indices"`
AllowView bool `json:"allow_view"`
AllowFineTuning bool `json:"allow_fine_tuning"`
Organization string `json:"organization"`
Group string `json:"group"`
IsBlocking bool `json:"is_blocking"`
}
)
type ModelsListResponse struct {
Data []ModelData `json:"data"`
Object ObjectType
}
type ModelRetrieveResponse ModelData
// https://beta.openai.com/docs/models/overview
const (
// {{{ https://platform.openai.com/docs/models/gpt-4
GPT4o = "gpt-4o"
GPT4o_20240513 = "gpt-4o-2024-05-13"
GPT4 = "gpt-4"
GPT4_0314 = "gpt-4-0314"
GPT4_0613 = "gpt-4-0613"
GPT4_32K = "gpt-4-32k"
GPT4_32K_0314 = "gpt-4-32k-0314"
GPT4_32K_0613 = "gpt-4-32k-0613"
// }}}
// {{{ https://platform.openai.com/docs/models/gpt-3-5
GPT3_5Turbo_0125 = "gpt-3.5-turbo-0125"
GPT3_5Turbo = "gpt-3.5-turbo"
GPT3_5Turbo_1106 = "gpt-3.5-turbo-1106"
GPT3_5Turbo_Instruct = "gpt-3.5-turbo-instruct"
GPT3_5Turbo_16K_0613 = "gpt-3.5-turbo-16k-0613" // @deprecated
GPT3_5Turbo_0613 = "gpt-3.5-turbo-0613" // @deprecated
GPT3_5Turbo_16K = "gpt-3.5-turbo-16k" // @deprecated
GPT3_5Turbo_0301 = "gpt-3.5-turbo-0301" // @deprecated
// }}}
)