@common_ch/common 1.0.275 → 1.0.277

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.
@@ -6,7 +6,7 @@ function calculateCostChat(model, promptTokens, completionTokens) {
6
6
  const pricing = pricingTable_1.pricingTableChat[model];
7
7
  if (!pricing)
8
8
  throw new Error(`No pricing found for model: ${model}`);
9
- const cost = (promptTokens / 1000000) * pricing.prompt +
10
- (completionTokens / 1000000) * pricing.completion;
9
+ const cost = (promptTokens / 1000) * pricing.prompt +
10
+ (completionTokens / 1000) * pricing.completion;
11
11
  return parseFloat(cost.toFixed(6));
12
12
  }
@@ -1,4 +1,4 @@
1
- type EstimateResult = {
1
+ export type EstimateResult = {
2
2
  file: string;
3
3
  mimeType: string;
4
4
  sizeMB: number;
@@ -9,4 +9,3 @@ type EstimateResult = {
9
9
  export declare function estimateUploadCost(filePath: string, mimeType: string, storagePricePerGBPerDay?: number): EstimateResult | {
10
10
  error: string;
11
11
  };
12
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@common_ch/common",
3
- "version": "1.0.275",
3
+ "version": "1.0.277",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "files": [