openai-tokens-count
Version:
OpenAI tokens calculator with function calls, images, and messages in one call
25 lines • 908 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTilePrice = exports.getFixedPrice = exports.tileSize = exports.shortSideLimit = exports.longSideLimit = void 0;
exports.longSideLimit = 2048;
exports.shortSideLimit = 768;
exports.tileSize = 512;
const defaultFixedPrice = 85;
const defaultTilePrice = 170;
const customFixedPrices = new Map([
['gpt-4o-mini', 2833],
]);
const getFixedPrice = (chatModel) => {
var _a;
return (_a = customFixedPrices.get(chatModel)) !== null && _a !== void 0 ? _a : defaultFixedPrice;
};
exports.getFixedPrice = getFixedPrice;
const customTilePrices = new Map([
['gpt-4o-mini', 5667],
]);
const getTilePrice = (chatModel) => {
var _a;
return (_a = customTilePrices.get(chatModel)) !== null && _a !== void 0 ? _a : defaultTilePrice;
};
exports.getTilePrice = getTilePrice;
//# sourceMappingURL=vision-constants.js.map