Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gpt-tokens

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gpt-tokens - npm Package Compare versions

Comparing version 1.3.11 to 1.3.12

13

dist/index.js

@@ -16,8 +16,9 @@ "use strict";

// Enabled when TiktokenModel support type is not included (like gpt-4o)
case 'o1-preview':
case "o1-preview-2024-09-12":
case "o1-mini":
case "o1-mini-2024-09-12":
jsTikTokenSupportModel = 'gpt-4o';
break;
// case 'o1-preview':
// case 'o1-preview-2024-09-12':
// case 'o1-mini':
// case 'o1-mini-2024-09-12':
// case 'chatgpt-4o-latest':
// jsTikTokenSupportModel = 'gpt-4o'
// break
default:

@@ -24,0 +25,0 @@ jsTikTokenSupportModel = model;

@@ -1,2 +0,2 @@

export type supportModelType = "gpt-3.5-turbo" | "gpt-3.5-turbo-16k" | "gpt-4" | "gpt-4-32k" | "gpt-4-turbo-preview" | "gpt-3.5-turbo-0301" | "gpt-3.5-turbo-0613" | "gpt-3.5-turbo-1106" | "gpt-3.5-turbo-0125" | "gpt-3.5-turbo-16k-0613" | "gpt-4-0314" | "gpt-4-0613" | "gpt-4-32k-0314" | "gpt-4-32k-0613" | "gpt-4-1106-preview" | "gpt-4-0125-preview" | "gpt-4-turbo-2024-04-09" | "gpt-4-turbo" | "gpt-4o" | "gpt-4o-2024-05-13" | "gpt-4o-2024-08-06" | "gpt-4o-mini" | "gpt-4o-mini-2024-07-18" | "o1-preview" | "o1-preview-2024-09-12" | "o1-mini" | "o1-mini-2024-09-12";
export type supportModelType = 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-4' | 'gpt-4-32k' | 'gpt-4-turbo-preview' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-16k-0613' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-4-1106-preview' | 'gpt-4-0125-preview' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'o1-preview' | 'o1-preview-2024-09-12' | 'o1-mini' | 'o1-mini-2024-09-12' | 'chatgpt-4o-latest';
/**

@@ -3,0 +3,0 @@ * Pricing

@@ -24,4 +24,5 @@ "use strict";

'gpt-4-turbo': 'gpt-4-turbo-2024-04-09',
'gpt-4o': 'gpt-4o-2024-05-13',
'gpt-4o': 'gpt-4o-2024-08-06',
'gpt-4o-mini': 'gpt-4o-mini-2024-07-18',
'chatgpt-4o-latest': 'gpt-4o-2024-05-13',
'o1-preview': 'o1-preview-2024-09-12',

@@ -36,4 +37,4 @@ 'o1-mini': 'o1-mini-2024-09-12',

Pricing.incrementalModels = {
'o1-preview-2024-09-12': [0.015, 0.06],
'o1-mini-2024-09-12': [0.003, 0.012],
'o1-preview-2024-09-12': [0.015, 0.06], // 2024-09-12
'o1-mini-2024-09-12': [0.003, 0.012], // 2024-09-12
'gpt-4o-2024-05-13': [0.005, 0.015], // 2024-05-13

@@ -40,0 +41,0 @@ 'gpt-4o-2024-08-06': [0.0025, 0.010], // 2024-08-06

{
"name": "gpt-tokens",
"version": "1.3.11",
"version": "1.3.12",
"description": "Calculate the token consumption and amount of openai gpt message",

@@ -35,3 +35,3 @@ "keywords": [

"decimal.js": "^10.4.3",
"js-tiktoken": "^1.0.14",
"js-tiktoken": "^1.0.15",
"openai-chat-tokens": "^0.2.8"

@@ -38,0 +38,0 @@ },

@@ -47,2 +47,3 @@ # gpt-tokens

* o1-mini-2024-09-12
* chatgpt-4o-latest

@@ -49,0 +50,0 @@ ### Fine Tune Models

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc