@cellaware/utils 3.3.24 → 3.3.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/llm/cost.js CHANGED
@@ -3,6 +3,10 @@ export function getLLMCostPerToken(modelName) {
3
3
  let inputCost = 0.0;
4
4
  let outputCost = 0.0;
5
5
  switch (modelName) {
6
+ case 'o1':
7
+ inputCost = 0.015;
8
+ outputCost = 0.060;
9
+ break;
6
10
  case 'o1-preview':
7
11
  inputCost = 0.015;
8
12
  outputCost = 0.060;
@@ -1 +1 @@
1
- export type ModelName = 'o1-preview' | 'o1-mini' | 'gpt-4o' | 'gpt-4o-2024-08-06' | 'gpt-4o-mini' | 'gpt-4-turbo' | 'gpt-4' | 'gpt-4-32k' | 'gpt-3.5-turbo';
1
+ export type ModelName = 'o1' | 'o1-preview' | 'o1-mini' | 'gpt-4o' | 'gpt-4o-2024-08-06' | 'gpt-4o-mini' | 'gpt-4-turbo' | 'gpt-4' | 'gpt-4-32k' | 'gpt-3.5-turbo';
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Extracts `version` from `package.json` path.
3
+ */
4
+ export declare function getVersion(path: string): any;
@@ -0,0 +1,11 @@
1
+ import fs from 'fs';
2
+ /**
3
+ * Extracts `version` from `package.json` path.
4
+ */
5
+ export function getVersion(path) {
6
+ if (!fs.existsSync(path)) {
7
+ throw new Error(`VERSION: '${path}' not found`);
8
+ }
9
+ const content = JSON.parse(fs.readFileSync(path, 'utf8'));
10
+ return content.version;
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cellaware/utils",
3
- "version": "3.3.24",
3
+ "version": "3.3.26",
4
4
  "description": "Cellaware Utilities for Node.js",
5
5
  "author": "Cellaware Technologies",
6
6
  "type": "module",