@discomedia/utils 1.0.61 → 1.0.63
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/index-frontend.cjs +3124 -235
- package/dist/index-frontend.cjs.map +1 -1
- package/dist/index-frontend.mjs +3124 -235
- package/dist/index-frontend.mjs.map +1 -1
- package/dist/index.cjs +3120 -231
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +3120 -231
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +3 -2
- package/dist/test.js +8944 -349
- package/dist/test.js.map +1 -1
- package/dist/types/llm-config.d.ts +3 -3
- package/dist/types/llm-config.d.ts.map +1 -1
- package/dist/types/llm-images.d.ts.map +1 -1
- package/dist/types/llm-openai.d.ts +6 -2
- package/dist/types/llm-openai.d.ts.map +1 -1
- package/dist/types/types/llm-types.d.ts +11 -18
- package/dist/types/types/llm-types.d.ts.map +1 -1
- package/dist/types-frontend/llm-config.d.ts +3 -3
- package/dist/types-frontend/llm-config.d.ts.map +1 -1
- package/dist/types-frontend/llm-images.d.ts.map +1 -1
- package/dist/types-frontend/llm-openai.d.ts +6 -2
- package/dist/types-frontend/llm-openai.d.ts.map +1 -1
- package/dist/types-frontend/types/llm-types.d.ts +11 -18
- package/dist/types-frontend/types/llm-types.d.ts.map +1 -1
- package/package.json +3 -2
|
@@ -7,7 +7,7 @@ interface AIModelCosts {
|
|
|
7
7
|
cacheHitCost?: number;
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
-
/** Token costs in USD per 1M tokens. Last updated
|
|
10
|
+
/** Token costs in USD per 1M tokens. Last updated Mar 2026. */
|
|
11
11
|
export declare const openAiModelCosts: AIModelCosts;
|
|
12
12
|
export declare const deepseekModelCosts: AIModelCosts;
|
|
13
13
|
/** Image generation costs in USD per image. Based on OpenAI pricing as of Feb 2025. */
|
|
@@ -27,8 +27,8 @@ export declare function calculateImageCost(model: string, imageCount: number): n
|
|
|
27
27
|
* @param model The name of the language model. Supported models are listed in the `openAiModelCosts` and `deepseekModelCosts` objects.
|
|
28
28
|
* @param inputTokens The number of input tokens passed to the language model.
|
|
29
29
|
* @param outputTokens The number of output tokens generated by the language model.
|
|
30
|
-
* @param reasoningTokens The number of output tokens generated by the language model for reasoning.
|
|
31
|
-
* @param cacheHitTokens The number of input tokens
|
|
30
|
+
* @param reasoningTokens The number of output tokens generated by the language model for reasoning.
|
|
31
|
+
* @param cacheHitTokens The number of input tokens billed at cached-input rates.
|
|
32
32
|
* @returns The cost of calling the language model in USD.
|
|
33
33
|
*/
|
|
34
34
|
export declare function calculateCost(provider: string, model: string, inputTokens: number, outputTokens: number, reasoningTokens?: number, cacheHitTokens?: number): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-config.d.ts","sourceRoot":"","sources":["../../src/llm-config.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAE5C,eAAO,MAAM,wBAAwB,wtBAMpC,CAAC;AAEF,UAAU,YAAY;IACpB,CAAC,SAAS,EAAE,MAAM,GAAG;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;CACH;
|
|
1
|
+
{"version":3,"file":"llm-config.d.ts","sourceRoot":"","sources":["../../src/llm-config.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAE5C,eAAO,MAAM,wBAAwB,wtBAMpC,CAAC;AAEF,UAAU,YAAY;IACpB,CAAC,SAAS,EAAE,MAAM,GAAG;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;CACH;AAMD,+DAA+D;AAC/D,eAAO,MAAM,gBAAgB,EAAE,YAmG9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,YAWhC,CAAC;AAMF,uFAAuF;AACvF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAGnD,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAS5E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,eAAe,CAAC,EAAE,MAAM,EACxB,cAAc,CAAC,EAAE,MAAM,GACtB,MAAM,CAgCR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-images.d.ts","sourceRoot":"","sources":["../../src/llm-images.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE5E,OAAO,EAAuB,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC5D,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,GAAG;QAChC,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,eAAe,CAAC;QACvB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,QAAQ,CAAC;KACxB,CAAC;CACH;AAED,eAAO,MAAM,mBAAmB,EAAE,eAAiC,CAAC;AAEpE,eAAO,MAAM,iBAAiB,GAAI,QAAQ,eAAe,KAAG,eAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"llm-images.d.ts","sourceRoot":"","sources":["../../src/llm-images.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE5E,OAAO,EAAuB,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC5D,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,GAAG;QAChC,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,eAAe,CAAC;QACvB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,QAAQ,CAAC;KACxB,CAAC;CACH;AAED,eAAO,MAAM,mBAAmB,EAAE,eAAiC,CAAC;AAEpE,eAAO,MAAM,iBAAiB,GAAI,QAAQ,eAAe,KAAG,eAA+C,CAAC;AAiB5G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,sBAA2B,GACnC,OAAO,CAAC,sBAAsB,CAAC,CAoGjC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tool } from 'openai/resources/responses/responses';
|
|
2
|
-
import { LLMResponse, LLMOptions, LLMModel, ContextMessage, OpenAIModel } from './types';
|
|
2
|
+
import { LLMResponse, LLMOptions, LLMModel, OpenAIResponseFormat, ContextMessage, OpenAIModel, OpenAISchemaInput } from './types';
|
|
3
3
|
import { ResponseCreateParamsNonStreaming } from 'openai/resources/responses/responses';
|
|
4
4
|
export declare const DEFAULT_OPTIONS: LLMOptions;
|
|
5
5
|
/**
|
|
@@ -69,7 +69,11 @@ export declare const makeResponsesAPICall: <T = string>(input: string | Response
|
|
|
69
69
|
export declare function makeLLMCall<T = string>(input: string, options?: {
|
|
70
70
|
apiKey?: string;
|
|
71
71
|
model?: LLMModel;
|
|
72
|
-
responseFormat?:
|
|
72
|
+
responseFormat?: OpenAIResponseFormat;
|
|
73
|
+
schema?: OpenAISchemaInput;
|
|
74
|
+
schemaName?: string;
|
|
75
|
+
schemaDescription?: string;
|
|
76
|
+
schemaStrict?: boolean;
|
|
73
77
|
tools?: Tool[];
|
|
74
78
|
useCodeInterpreter?: boolean;
|
|
75
79
|
useWebSearch?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-openai.d.ts","sourceRoot":"","sources":["../../src/llm-openai.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"llm-openai.d.ts","sourceRoot":"","sources":["../../src/llm-openai.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,IAAI,EAIL,MAAM,sCAAsC,CAAC;AAI9C,OAAO,EACL,WAAW,EACX,UAAU,EACV,QAAQ,EACR,oBAAoB,EACpB,cAAc,EACd,WAAW,EACX,iBAAiB,EAClB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,gCAAgC,EAQjC,MAAM,sCAAsC,CAAC;AAE9C,eAAO,MAAM,eAAe,EAAE,UAG7B,CAAC;AA2BF;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAqB1D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,WAAW,CAGpE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,WAAW,CAc/D;AAiDD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,oBAAoB,GAAU,CAAC,GAAG,MAAM,EACnD,OAAO,MAAM,GAAG,gCAAgC,CAAC,OAAO,CAAC,EACzD,UAAS,IAAI,CAAC,gCAAgC,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG;IACnE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CACX,KACL,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CA0IxB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,WAAW,CAAC,CAAC,GAAG,MAAM,EAC1C,KAAK,EAAE,MAAM,EACb,OAAO,GAAE;IACP,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IACtC,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;CACvB,GACL,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAgIzB"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ChatCompletionMessageParam, ChatCompletionTool, ChatCompletionMessageToolCall } from 'openai/resources/chat/completions';
|
|
2
2
|
import { ImageGenerateParams, ImageModel } from 'openai/resources/images';
|
|
3
|
+
import type { ResponseFormatTextJSONSchemaConfig } from 'openai/resources/responses/responses';
|
|
4
|
+
import type { ZodType } from 'zod';
|
|
3
5
|
/**
|
|
4
6
|
* Represents OpenAI models
|
|
5
7
|
*/
|
|
6
|
-
export type OpenAIModel = 'gpt-4o-mini' | 'gpt-4o' | 'o1-mini' | 'o1' | 'o3-mini' | 'gpt-4.1' | 'gpt-4.1-mini' | 'o4-mini' | 'gpt-4.1-nano' | 'o3' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5.2-pro' | 'gpt-5.1-codex' | 'gpt-5.1-codex-max';
|
|
8
|
+
export type OpenAIModel = 'gpt-4o-mini' | 'gpt-4o' | 'o1-mini' | 'o1' | 'o3-mini' | 'gpt-4.1' | 'gpt-4.1-mini' | 'o4-mini' | 'gpt-4.1-nano' | 'o3' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5.1' | 'gpt-5.4' | 'gpt-5.4-pro' | 'gpt-5.2' | 'gpt-5.2-pro' | 'gpt-5.1-codex' | 'gpt-5.1-codex-max';
|
|
7
9
|
/**
|
|
8
10
|
* Represents Deepseek models
|
|
9
11
|
*/
|
|
@@ -11,7 +13,7 @@ export type DeepseekModel = 'deepseek-chat' | 'deepseek-reasoner';
|
|
|
11
13
|
/**
|
|
12
14
|
* Represents OpenRouter models
|
|
13
15
|
*/
|
|
14
|
-
export type OpenRouterModel = 'openai/gpt-5' | 'openai/gpt-5-mini' | 'openai/gpt-5-nano' | 'openai/gpt-5.1' | 'openai/gpt-5.2' | 'openai/gpt-5.2-pro' | 'openai/gpt-5.1-codex' | 'openai/gpt-5.1-codex-max' | 'openai/gpt-oss-120b' | 'z.ai/glm-4.5' | 'z.ai/glm-4.5-air' | 'google/gemini-2.5-flash' | 'google/gemini-2.5-flash-lite' | 'deepseek/deepseek-r1-0528' | 'deepseek/deepseek-chat-v3-0324';
|
|
16
|
+
export type OpenRouterModel = 'openai/gpt-5' | 'openai/gpt-5-mini' | 'openai/gpt-5-nano' | 'openai/gpt-5.1' | 'openai/gpt-5.4' | 'openai/gpt-5.4-pro' | 'openai/gpt-5.2' | 'openai/gpt-5.2-pro' | 'openai/gpt-5.1-codex' | 'openai/gpt-5.1-codex-max' | 'openai/gpt-oss-120b' | 'z.ai/glm-4.5' | 'z.ai/glm-4.5-air' | 'google/gemini-2.5-flash' | 'google/gemini-2.5-flash-lite' | 'deepseek/deepseek-r1-0528' | 'deepseek/deepseek-chat-v3-0324';
|
|
15
17
|
/**
|
|
16
18
|
* Represents pricing information for OpenRouter models
|
|
17
19
|
*/
|
|
@@ -71,21 +73,12 @@ export interface LLMResponse<T> {
|
|
|
71
73
|
/**
|
|
72
74
|
* Represents the format of the OpenAI response.
|
|
73
75
|
*/
|
|
74
|
-
export type OpenAIResponseFormat = 'text' | 'json' |
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
description?: string;
|
|
81
|
-
enum?: string[];
|
|
82
|
-
items?: unknown;
|
|
83
|
-
properties?: unknown;
|
|
84
|
-
required?: string[];
|
|
85
|
-
}>;
|
|
86
|
-
required?: string[];
|
|
87
|
-
};
|
|
88
|
-
};
|
|
76
|
+
export type OpenAIResponseFormat = 'text' | 'json' | ResponseFormatTextJSONSchemaConfig;
|
|
77
|
+
/**
|
|
78
|
+
* Represents schema input for structured outputs in OpenAI calls.
|
|
79
|
+
* Can be either a JSON Schema object or a Zod schema.
|
|
80
|
+
*/
|
|
81
|
+
export type OpenAISchemaInput = ResponseFormatTextJSONSchemaConfig['schema'] | ZodType;
|
|
89
82
|
/**
|
|
90
83
|
* Represents the options for the OpenAI Images API.
|
|
91
84
|
* Extends the official ImageGenerateParams but with more user-friendly option names.
|
|
@@ -101,7 +94,7 @@ export interface ImageGenerationOptions {
|
|
|
101
94
|
background?: ImageGenerateParams['background'];
|
|
102
95
|
moderation?: ImageGenerateParams['moderation'];
|
|
103
96
|
/**
|
|
104
|
-
* Optional multimodal LLM to pair with image outputs (e.g., gpt-5.
|
|
97
|
+
* Optional multimodal LLM to pair with image outputs (e.g., gpt-5.4).
|
|
105
98
|
*/
|
|
106
99
|
visionModel?: LLMModel;
|
|
107
100
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-types.d.ts","sourceRoot":"","sources":["../../../src/types/llm-types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAClI,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"llm-types.d.ts","sourceRoot":"","sources":["../../../src/types/llm-types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,kBAA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,OAAO,CAAC;AAEvF;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,IAAI,CAAC,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;IAC/C,UAAU,CAAC,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;IAC/C;;OAEG;IACH,WAAW,CAAC,EAAE,QAAQ,CAAC;CACxB;AAED,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,eAAe,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;IACpD,OAAO,EAAE,MAAM,CAAC;CACjB;AAID,YAAY,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC/E,YAAY,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC"}
|
|
@@ -7,7 +7,7 @@ interface AIModelCosts {
|
|
|
7
7
|
cacheHitCost?: number;
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
-
/** Token costs in USD per 1M tokens. Last updated
|
|
10
|
+
/** Token costs in USD per 1M tokens. Last updated Mar 2026. */
|
|
11
11
|
export declare const openAiModelCosts: AIModelCosts;
|
|
12
12
|
export declare const deepseekModelCosts: AIModelCosts;
|
|
13
13
|
/** Image generation costs in USD per image. Based on OpenAI pricing as of Feb 2025. */
|
|
@@ -27,8 +27,8 @@ export declare function calculateImageCost(model: string, imageCount: number): n
|
|
|
27
27
|
* @param model The name of the language model. Supported models are listed in the `openAiModelCosts` and `deepseekModelCosts` objects.
|
|
28
28
|
* @param inputTokens The number of input tokens passed to the language model.
|
|
29
29
|
* @param outputTokens The number of output tokens generated by the language model.
|
|
30
|
-
* @param reasoningTokens The number of output tokens generated by the language model for reasoning.
|
|
31
|
-
* @param cacheHitTokens The number of input tokens
|
|
30
|
+
* @param reasoningTokens The number of output tokens generated by the language model for reasoning.
|
|
31
|
+
* @param cacheHitTokens The number of input tokens billed at cached-input rates.
|
|
32
32
|
* @returns The cost of calling the language model in USD.
|
|
33
33
|
*/
|
|
34
34
|
export declare function calculateCost(provider: string, model: string, inputTokens: number, outputTokens: number, reasoningTokens?: number, cacheHitTokens?: number): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-config.d.ts","sourceRoot":"","sources":["../../src/llm-config.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAE5C,eAAO,MAAM,wBAAwB,wtBAMpC,CAAC;AAEF,UAAU,YAAY;IACpB,CAAC,SAAS,EAAE,MAAM,GAAG;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;CACH;
|
|
1
|
+
{"version":3,"file":"llm-config.d.ts","sourceRoot":"","sources":["../../src/llm-config.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAE5C,eAAO,MAAM,wBAAwB,wtBAMpC,CAAC;AAEF,UAAU,YAAY;IACpB,CAAC,SAAS,EAAE,MAAM,GAAG;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;CACH;AAMD,+DAA+D;AAC/D,eAAO,MAAM,gBAAgB,EAAE,YAmG9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,YAWhC,CAAC;AAMF,uFAAuF;AACvF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAGnD,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAS5E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,eAAe,CAAC,EAAE,MAAM,EACxB,cAAc,CAAC,EAAE,MAAM,GACtB,MAAM,CAgCR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-images.d.ts","sourceRoot":"","sources":["../../src/llm-images.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE5E,OAAO,EAAuB,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC5D,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,GAAG;QAChC,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,eAAe,CAAC;QACvB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,QAAQ,CAAC;KACxB,CAAC;CACH;AAED,eAAO,MAAM,mBAAmB,EAAE,eAAiC,CAAC;AAEpE,eAAO,MAAM,iBAAiB,GAAI,QAAQ,eAAe,KAAG,eAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"llm-images.d.ts","sourceRoot":"","sources":["../../src/llm-images.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE5E,OAAO,EAAuB,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC5D,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,GAAG;QAChC,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,eAAe,CAAC;QACvB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,QAAQ,CAAC;KACxB,CAAC;CACH;AAED,eAAO,MAAM,mBAAmB,EAAE,eAAiC,CAAC;AAEpE,eAAO,MAAM,iBAAiB,GAAI,QAAQ,eAAe,KAAG,eAA+C,CAAC;AAiB5G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,sBAA2B,GACnC,OAAO,CAAC,sBAAsB,CAAC,CAoGjC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tool } from 'openai/resources/responses/responses';
|
|
2
|
-
import { LLMResponse, LLMOptions, LLMModel, ContextMessage, OpenAIModel } from './types';
|
|
2
|
+
import { LLMResponse, LLMOptions, LLMModel, OpenAIResponseFormat, ContextMessage, OpenAIModel, OpenAISchemaInput } from './types';
|
|
3
3
|
import { ResponseCreateParamsNonStreaming } from 'openai/resources/responses/responses';
|
|
4
4
|
export declare const DEFAULT_OPTIONS: LLMOptions;
|
|
5
5
|
/**
|
|
@@ -69,7 +69,11 @@ export declare const makeResponsesAPICall: <T = string>(input: string | Response
|
|
|
69
69
|
export declare function makeLLMCall<T = string>(input: string, options?: {
|
|
70
70
|
apiKey?: string;
|
|
71
71
|
model?: LLMModel;
|
|
72
|
-
responseFormat?:
|
|
72
|
+
responseFormat?: OpenAIResponseFormat;
|
|
73
|
+
schema?: OpenAISchemaInput;
|
|
74
|
+
schemaName?: string;
|
|
75
|
+
schemaDescription?: string;
|
|
76
|
+
schemaStrict?: boolean;
|
|
73
77
|
tools?: Tool[];
|
|
74
78
|
useCodeInterpreter?: boolean;
|
|
75
79
|
useWebSearch?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-openai.d.ts","sourceRoot":"","sources":["../../src/llm-openai.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"llm-openai.d.ts","sourceRoot":"","sources":["../../src/llm-openai.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,IAAI,EAIL,MAAM,sCAAsC,CAAC;AAI9C,OAAO,EACL,WAAW,EACX,UAAU,EACV,QAAQ,EACR,oBAAoB,EACpB,cAAc,EACd,WAAW,EACX,iBAAiB,EAClB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,gCAAgC,EAQjC,MAAM,sCAAsC,CAAC;AAE9C,eAAO,MAAM,eAAe,EAAE,UAG7B,CAAC;AA2BF;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAqB1D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,WAAW,CAGpE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,WAAW,CAc/D;AAiDD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,oBAAoB,GAAU,CAAC,GAAG,MAAM,EACnD,OAAO,MAAM,GAAG,gCAAgC,CAAC,OAAO,CAAC,EACzD,UAAS,IAAI,CAAC,gCAAgC,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG;IACnE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CACX,KACL,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CA0IxB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,WAAW,CAAC,CAAC,GAAG,MAAM,EAC1C,KAAK,EAAE,MAAM,EACb,OAAO,GAAE;IACP,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IACtC,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;CACvB,GACL,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAgIzB"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ChatCompletionMessageParam, ChatCompletionTool, ChatCompletionMessageToolCall } from 'openai/resources/chat/completions';
|
|
2
2
|
import { ImageGenerateParams, ImageModel } from 'openai/resources/images';
|
|
3
|
+
import type { ResponseFormatTextJSONSchemaConfig } from 'openai/resources/responses/responses';
|
|
4
|
+
import type { ZodType } from 'zod';
|
|
3
5
|
/**
|
|
4
6
|
* Represents OpenAI models
|
|
5
7
|
*/
|
|
6
|
-
export type OpenAIModel = 'gpt-4o-mini' | 'gpt-4o' | 'o1-mini' | 'o1' | 'o3-mini' | 'gpt-4.1' | 'gpt-4.1-mini' | 'o4-mini' | 'gpt-4.1-nano' | 'o3' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5.2-pro' | 'gpt-5.1-codex' | 'gpt-5.1-codex-max';
|
|
8
|
+
export type OpenAIModel = 'gpt-4o-mini' | 'gpt-4o' | 'o1-mini' | 'o1' | 'o3-mini' | 'gpt-4.1' | 'gpt-4.1-mini' | 'o4-mini' | 'gpt-4.1-nano' | 'o3' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5.1' | 'gpt-5.4' | 'gpt-5.4-pro' | 'gpt-5.2' | 'gpt-5.2-pro' | 'gpt-5.1-codex' | 'gpt-5.1-codex-max';
|
|
7
9
|
/**
|
|
8
10
|
* Represents Deepseek models
|
|
9
11
|
*/
|
|
@@ -11,7 +13,7 @@ export type DeepseekModel = 'deepseek-chat' | 'deepseek-reasoner';
|
|
|
11
13
|
/**
|
|
12
14
|
* Represents OpenRouter models
|
|
13
15
|
*/
|
|
14
|
-
export type OpenRouterModel = 'openai/gpt-5' | 'openai/gpt-5-mini' | 'openai/gpt-5-nano' | 'openai/gpt-5.1' | 'openai/gpt-5.2' | 'openai/gpt-5.2-pro' | 'openai/gpt-5.1-codex' | 'openai/gpt-5.1-codex-max' | 'openai/gpt-oss-120b' | 'z.ai/glm-4.5' | 'z.ai/glm-4.5-air' | 'google/gemini-2.5-flash' | 'google/gemini-2.5-flash-lite' | 'deepseek/deepseek-r1-0528' | 'deepseek/deepseek-chat-v3-0324';
|
|
16
|
+
export type OpenRouterModel = 'openai/gpt-5' | 'openai/gpt-5-mini' | 'openai/gpt-5-nano' | 'openai/gpt-5.1' | 'openai/gpt-5.4' | 'openai/gpt-5.4-pro' | 'openai/gpt-5.2' | 'openai/gpt-5.2-pro' | 'openai/gpt-5.1-codex' | 'openai/gpt-5.1-codex-max' | 'openai/gpt-oss-120b' | 'z.ai/glm-4.5' | 'z.ai/glm-4.5-air' | 'google/gemini-2.5-flash' | 'google/gemini-2.5-flash-lite' | 'deepseek/deepseek-r1-0528' | 'deepseek/deepseek-chat-v3-0324';
|
|
15
17
|
/**
|
|
16
18
|
* Represents pricing information for OpenRouter models
|
|
17
19
|
*/
|
|
@@ -71,21 +73,12 @@ export interface LLMResponse<T> {
|
|
|
71
73
|
/**
|
|
72
74
|
* Represents the format of the OpenAI response.
|
|
73
75
|
*/
|
|
74
|
-
export type OpenAIResponseFormat = 'text' | 'json' |
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
description?: string;
|
|
81
|
-
enum?: string[];
|
|
82
|
-
items?: unknown;
|
|
83
|
-
properties?: unknown;
|
|
84
|
-
required?: string[];
|
|
85
|
-
}>;
|
|
86
|
-
required?: string[];
|
|
87
|
-
};
|
|
88
|
-
};
|
|
76
|
+
export type OpenAIResponseFormat = 'text' | 'json' | ResponseFormatTextJSONSchemaConfig;
|
|
77
|
+
/**
|
|
78
|
+
* Represents schema input for structured outputs in OpenAI calls.
|
|
79
|
+
* Can be either a JSON Schema object or a Zod schema.
|
|
80
|
+
*/
|
|
81
|
+
export type OpenAISchemaInput = ResponseFormatTextJSONSchemaConfig['schema'] | ZodType;
|
|
89
82
|
/**
|
|
90
83
|
* Represents the options for the OpenAI Images API.
|
|
91
84
|
* Extends the official ImageGenerateParams but with more user-friendly option names.
|
|
@@ -101,7 +94,7 @@ export interface ImageGenerationOptions {
|
|
|
101
94
|
background?: ImageGenerateParams['background'];
|
|
102
95
|
moderation?: ImageGenerateParams['moderation'];
|
|
103
96
|
/**
|
|
104
|
-
* Optional multimodal LLM to pair with image outputs (e.g., gpt-5.
|
|
97
|
+
* Optional multimodal LLM to pair with image outputs (e.g., gpt-5.4).
|
|
105
98
|
*/
|
|
106
99
|
visionModel?: LLMModel;
|
|
107
100
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-types.d.ts","sourceRoot":"","sources":["../../../src/types/llm-types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAClI,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":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AAG,kCAAkC,CAAC;AAExF;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,kCAAkC,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC;AAEvF;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,IAAI,CAAC,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;IAC/C,UAAU,CAAC,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;IAC/C;;OAEG;IACH,WAAW,CAAC,EAAE,QAAQ,CAAC;CACxB;AAED,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,eAAe,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;IACpD,OAAO,EAAE,MAAM,CAAC;CACjB;AAID,YAAY,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC/E,YAAY,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC"}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.63",
|
|
7
7
|
"author": "Disco Media",
|
|
8
8
|
"description": "Utility functions used in Disco Media apps",
|
|
9
9
|
"always-build-npm": true,
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
"openai": "^6.27.0",
|
|
37
37
|
"p-limit": "^7.3.0",
|
|
38
38
|
"tslib": "^2.8.1",
|
|
39
|
-
"ws": "^8.19.0"
|
|
39
|
+
"ws": "^8.19.0",
|
|
40
|
+
"zod": "^4.3.6"
|
|
40
41
|
},
|
|
41
42
|
"license": "ISC",
|
|
42
43
|
"devDependencies": {
|