Skip to content

Commit 59a93e3

Browse files
committed
Add support for 'gpt-4.1' models
Close #28
1 parent 714bfff commit 59a93e3

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/EncoderProvider.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,17 @@ final class EncoderProvider implements ResetInterface
5656
'o1-' => 'o200k_base',
5757
'o3-' => 'o200k_base',
5858
'chatgpt-4o-' => 'o200k_base',
59-
'gpt-4o-' => 'o200k_base',
6059
'gpt-4-' => 'cl100k_base',
60+
'gpt-4.1-' => 'o200k_base',
61+
'gpt-4o-' => 'o200k_base',
6162
'gpt-3.5-turbo-' => 'cl100k_base',
6263
];
6364
private const MODEL_TO_ENCODING = [
6465
'o1' => 'o200k_base',
6566
'o3' => 'o200k_base',
66-
'gpt-4o' => 'o200k_base',
6767
'gpt-4' => 'cl100k_base',
68+
'gpt-4.1' => 'o200k_base',
69+
'gpt-4o' => 'o200k_base',
6870
'gpt-3.5-turbo' => 'cl100k_base',
6971
'gpt-3.5' => 'cl100k_base',
7072
'davinci-002' => 'cl100k_base',

0 commit comments

Comments
 (0)