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.9 to 1.3.10

1

dist/index.d.ts

@@ -10,2 +10,3 @@ import { Tiktoken } from 'js-tiktoken';

}
export { TokenPrice };
export declare class GPTTokens extends TokenPrice {

@@ -12,0 +13,0 @@ protected static modelEncodingCache: {

3

dist/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GPTTokens = void 0;
exports.GPTTokens = exports.TokenPrice = void 0;
const js_tiktoken_1 = require("js-tiktoken");
const openai_chat_tokens_1 = require("openai-chat-tokens");
const tokenPrice_1 = require("./tokenPrice");
Object.defineProperty(exports, "TokenPrice", { enumerable: true, get: function () { return tokenPrice_1.TokenPrice; } });
class GPTTokens extends tokenPrice_1.TokenPrice {

@@ -8,0 +9,0 @@ static getEncodingForModelCached(model) {

@@ -33,16 +33,16 @@ "use strict";

Pricing.incrementalModels = {
'gpt-4o-2024-05-13': [0.005, 0.015],
'gpt-4o-2024-08-06': [0.0025, 0.010],
'gpt-4o-mini-2024-07-18': [0.00015, 0.0006],
'gpt-4-turbo-2024-04-09': [0.01, 0.03],
'gpt-4-0314': [0.03, 0.06],
'gpt-4-32k-0314': [0.06, 0.12],
'gpt-4-0613': [0.03, 0.06, 0.0080],
'gpt-4-32k-0613': [0.06, 0.12],
'gpt-4-1106-preview': [0.01, 0.03],
'gpt-4-0125-preview': [0.01, 0.03],
'gpt-3.5-turbo-0301': [0.0015, 0.0020],
'gpt-3.5-turbo-0613': [0.0015, 0.0020, 0.0080],
'gpt-3.5-turbo-16k-0613': [0.0030, 0.0040],
'gpt-3.5-turbo-1106': [0.0010, 0.0020, 0.0080],
'gpt-4o-2024-05-13': [0.005, 0.015], // 2024-05-13
'gpt-4o-2024-08-06': [0.0025, 0.010], // 2024-08-06
'gpt-4o-mini-2024-07-18': [0.00015, 0.0006], // 2024-07-18
'gpt-4-turbo-2024-04-09': [0.01, 0.03], // 2024-04-09
'gpt-4-0314': [0.03, 0.06], // 2023-03-14
'gpt-4-32k-0314': [0.06, 0.12], // 2023-03-14
'gpt-4-0613': [0.03, 0.06, 0.0080], // 2023-06-13 (Fine-tuning experimental)
'gpt-4-32k-0613': [0.06, 0.12], // 2023-06-13
'gpt-4-1106-preview': [0.01, 0.03], // 2023-11-06
'gpt-4-0125-preview': [0.01, 0.03], // 2024-01-25
'gpt-3.5-turbo-0301': [0.0015, 0.0020], // 2023-03-01
'gpt-3.5-turbo-0613': [0.0015, 0.0020, 0.0080], // 2023-06-13
'gpt-3.5-turbo-16k-0613': [0.0030, 0.0040], // 2023-06-13
'gpt-3.5-turbo-1106': [0.0010, 0.0020, 0.0080], // 2023-11-06 (Fine-tuning recommended)
'gpt-3.5-turbo-0125': [0.0005, 0.0015], // 2024-01-25 (Fine-tuning is coming soon)

@@ -49,0 +49,0 @@ };

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

@@ -5,0 +5,0 @@ "keywords": [

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