Skip to content

Commit 025023d

Browse files
authored
Merge pull request #12 from DenisPalnitsky/chatgpt-4o-support
Add support of chatgpt-4o-latest model
2 parents 2ad5811 + fdcd81a commit 025023d

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

tokenizer.go

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ package tokenizer
7474
//}
7575

7676
import (
77-
"strings"
7877
"errors"
78+
"strings"
7979

8080
"github.com/tiktoken-go/tokenizer/codec"
8181
)
@@ -144,11 +144,14 @@ const (
144144
)
145145

146146
var modelPrefixToEncoding map[Model]Encoding = map[Model]Encoding{
147-
"o1-": O200kBase,
148-
"gpt-4o-": O200kBase,
149-
"gpt-4-": Cl100kBase,
150-
"gpt-3.5-turbo-": Cl100kBase,
151-
"gpt-35-turbo-": Cl100kBase,
147+
"o1-": O200kBase,
148+
// chat
149+
"chatgpt-4o-": O200kBase,
150+
"gpt-4o-": O200kBase,
151+
"gpt-4-": Cl100kBase,
152+
"gpt-3.5-turbo-": Cl100kBase,
153+
"gpt-35-turbo-": Cl100kBase,
154+
// fine-tuned
152155
"ft:gpt-4": Cl100kBase,
153156
"ft:gpt-3.5-turbo": Cl100kBase,
154157
"ft:davinci-002": Cl100kBase,

0 commit comments

Comments
 (0)