Skip to content

Commit 4fe5772

Browse files
authored
Merge pull request #20 from otiai10/develop
add new model
2 parents ecfddf2 + e9d5643 commit 4fe5772

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

models.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,19 @@ const (
4343
// }}}
4444

4545
// {{{ https://platform.openai.com/docs/models/gpt-3-5
46-
GPT3_5Turbo = "gpt-3.5-turbo"
47-
GPT3_5Turbo_0301 = "gpt-3.5-turbo--0301"
46+
GPT3_5Turbo = "gpt-3.5-turbo"
47+
GPT3_5Turbo_0301 = "gpt-3.5-turbo-0301"
48+
GPT3_5Turbo_0613 = "gpt-3.5-turbo-0613"
49+
GPT3_5Turbo_16K = "gpt-3.5-turbo-16k"
50+
GPT3_5Turbo_16K_0613 = "gpt-3.5-turbo-16k-0613"
4851
// }}}
4952

5053
// {{{ https://platform.openai.com/docs/models/gpt-4
5154
GPT4 = "gpt-4"
52-
GPT4_0314 = "gpt-3-0314"
55+
GPT4_0314 = "gpt-4-0314"
56+
GPT4_0613 = "gpt-4-0613"
5357
GPT4_32K = "gpt-4-32k"
5458
GPT4_32K_0314 = "gpt-4-32k-0314"
59+
GPT4_32K_0613 = "gpt-4-32k-0613"
5560
// }}}
5661
)

testapp/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var (
2929
Run: func() (any, error) {
3030
client := openaigo.NewClient(OPENAI_API_KEY)
3131
request := openaigo.CompletionRequestBody{
32-
Model: "text-davinci-003",
32+
Model: openaigo.TextDavinci003,
3333
Prompt: []string{"Say this is a test"},
3434
}
3535
return client.Completion(nil, request)
@@ -112,7 +112,7 @@ var (
112112
}
113113
}
114114
request := openaigo.ChatCompletionRequestBody{
115-
Model: openaigo.GPT3_5Turbo,
115+
Model: openaigo.GPT3_5Turbo_0613,
116116
StreamCallback: calback,
117117
Messages: []openaigo.ChatMessage{
118118
{

0 commit comments

Comments
 (0)