@cellaware/utils 5.0.1 → 5.0.3

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.
@@ -1,9 +1,9 @@
1
1
  import { Readable } from "stream";
2
2
  export declare const AZURE_HEADER_FUNCTION_KEY = "x-functions-key";
3
3
  export declare const AZURE_HEADER_PRINCIPAL = "x-ms-client-principal";
4
- export declare function functionFetchJson(url: string, method: string, key: string, principal: string, body?: any): Promise<any>;
5
- export declare function functionFetchJsonWithText(url: string, method: string, key: string, principal: string, text: string): Promise<any>;
6
- export declare function functionFetchText(url: string, method: string, key: string, principal: string, body?: any): Promise<any>;
4
+ export declare function functionFetchJson(url: string, method: string, key: string, principal: string, body?: any): Promise<Response>;
5
+ export declare function functionFetchJsonWithText(url: string, method: string, key: string, principal: string, text: string): Promise<Response>;
6
+ export declare function functionFetchText(url: string, method: string, key: string, principal: string, body?: any): Promise<Response>;
7
7
  export declare function functionStreamJson(url: string, method: string, key: string, principal: string, body: any, errorBody: any): Promise<{
8
8
  headers: {
9
9
  "Content-Type": string;
@@ -1,5 +1,5 @@
1
- export declare function chatwmsFunctionFetch(path: string, method: string, principal: string, body?: any): Promise<any>;
2
- export declare function chatwmsFunctionFetchText(path: string, method: string, principal: string, body?: any): Promise<any>;
1
+ export declare function chatwmsFunctionFetch(path: string, method: string, principal: string, body?: any): Promise<Response>;
2
+ export declare function chatwmsFunctionFetchText(path: string, method: string, principal: string, body?: any): Promise<Response>;
3
3
  export declare function chatwmsFunctionStream(path: string, method: string, principal: string, body?: any): Promise<{
4
4
  headers: {
5
5
  "Content-Type": string;
@@ -8,9 +8,9 @@ export declare function chatwmsFunctionStream(path: string, method: string, prin
8
8
  };
9
9
  body: import("stream").Readable;
10
10
  }>;
11
- export declare function chatwmsGatewayFunctionFetch(url: string, method: string, key: string, principal: string, body?: any): Promise<any>;
12
- export declare function chatwmsGatewayFunctionFetchWithText(url: string, method: string, key: string, principal: string, text: string): Promise<any>;
13
- export declare function chatwmsGatewayFunctionFetchText(url: string, method: string, key: string, principal: string, body?: any): Promise<any>;
11
+ export declare function chatwmsGatewayFunctionFetch(url: string, method: string, key: string, principal: string, body?: any): Promise<Response>;
12
+ export declare function chatwmsGatewayFunctionFetchWithText(url: string, method: string, key: string, principal: string, text: string): Promise<Response>;
13
+ export declare function chatwmsGatewayFunctionFetchText(url: string, method: string, key: string, principal: string, body?: any): Promise<Response>;
14
14
  export declare function chatwmsGatewayFunctionStream(url: string, method: string, key: string, principal: string, body?: any): Promise<{
15
15
  headers: {
16
16
  "Content-Type": string;
package/dist/llm/cost.js CHANGED
@@ -19,10 +19,6 @@ export function getLLMCostPerToken(modelName) {
19
19
  inputCost = 0.015;
20
20
  outputCost = 0.060;
21
21
  break;
22
- case 'o1-preview':
23
- inputCost = 0.015;
24
- outputCost = 0.060;
25
- break;
26
22
  case 'o1-mini':
27
23
  inputCost = 0.003;
28
24
  outputCost = 0.012;
@@ -39,22 +35,6 @@ export function getLLMCostPerToken(modelName) {
39
35
  inputCost = 0.00015;
40
36
  outputCost = 0.0006;
41
37
  break;
42
- case 'gpt-4-turbo':
43
- inputCost = 0.01;
44
- outputCost = 0.03;
45
- break;
46
- case 'gpt-4':
47
- inputCost = 0.03;
48
- outputCost = 0.06;
49
- break;
50
- case 'gpt-4-32k':
51
- inputCost = 0.06;
52
- outputCost = 0.12;
53
- break;
54
- case 'gpt-3.5-turbo':
55
- inputCost = 0.0005;
56
- outputCost = 0.0015;
57
- break;
58
38
  default:
59
39
  inputCost = 0.0;
60
40
  outputCost = 0.0;
@@ -1,4 +1,4 @@
1
- export type ModelName = 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'o1' | 'o1-preview' | 'o1-mini' | 'o3-mini' | 'gpt-4o' | 'gpt-4o-mini' | 'gpt-4-turbo' | 'gpt-4' | 'gpt-4-32k' | 'gpt-3.5-turbo';
1
+ export type ModelName = 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'o1' | 'o1-mini' | 'o3-mini' | 'gpt-4o' | 'gpt-4o-mini';
2
2
  export type ReasoningEffort = 'low' | 'medium' | 'high';
3
3
  export interface OpenAIModelOptions {
4
4
  reasoning_effort?: ReasoningEffort;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cellaware/utils",
3
- "version": "5.0.1",
3
+ "version": "5.0.3",
4
4
  "description": "Cellaware Utilities for Node.js",
5
5
  "author": "Cellaware Technologies",
6
6
  "type": "module",