Add OpenAI o1

This commit is contained in:
Cohee
2024-09-13 19:44:12 +03:00
parent 854541f4ba
commit 6d79cc015a
6 changed files with 48 additions and 10 deletions

View File

@@ -350,6 +350,10 @@ function getWebTokenizersChunks(tokenizer, ids) {
* @returns {string} Tokenizer model to use
*/
function getTokenizerModel(requestModel) {
if (requestModel.includes('o1-preview') || requestModel.includes('o1-mini')) {
return 'gpt-4o';
}
if (requestModel.includes('gpt-4o')) {
return 'gpt-4o';
}