@mate-academy/llm-gateway 3.0.1 → 3.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.
- package/README.md +45 -2
- package/dist/LLMService.constants.d.ts +553 -5
- package/dist/LLMService.constants.js.map +1 -1
- package/dist/LLMService.factory.js +1 -1
- package/dist/LLMService.factory.js.map +1 -1
- package/dist/providers/GoogleGenerativeAI/GoogleGenerativeAI.constants.d.ts +176 -3
- package/dist/providers/GoogleGenerativeAI/GoogleGenerativeAI.constants.js.map +1 -1
- package/dist/providers/GoogleGenerativeAI/GoogleGenerativeAIService.factory.js.map +1 -1
- package/dist/providers/OpenAI/OpenAI.constants.d.ts +384 -3
- package/dist/providers/OpenAI/OpenAI.constants.js.map +1 -1
- package/dist/providers/OpenAI/OpenAIService.factory.js.map +1 -1
- package/dist/services/LLMAssistanceService.abstract.js.map +1 -1
- package/dist/services/LLMBaseService.abstract.d.ts +2 -2
- package/dist/services/LLMBaseService.abstract.js.map +1 -1
- package/dist/utilities/promptBuilder.d.ts +7 -2
- package/dist/utilities/promptBuilder.js +18 -2
- package/dist/utilities/promptBuilder.js.map +1 -1
- package/dist/utilities/schema/adapters/SchemaAdapterRegistry.d.ts +1 -5
- package/dist/utilities/schema/adapters/SchemaAdapterRegistry.js +3 -9
- package/dist/utilities/schema/adapters/SchemaAdapterRegistry.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,179 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GoogleGenerativeAIModelNames } from './GoogleGenerativeAI.typedefs';
|
|
2
|
+
import { GoogleGenerativeAIAssistanceService, GoogleGenerativeAICompletionService, GoogleGenerativeAISpeechToTextService, GoogleGenerativeAITextToSpeechService } from '../../providers/GoogleGenerativeAI/services';
|
|
2
3
|
export declare const MIN_CACHE_CONTENT_LENGTH = 32768;
|
|
3
|
-
export declare const GOOGLE_AI_MODELS:
|
|
4
|
+
export declare const GOOGLE_AI_MODELS: {
|
|
5
|
+
readonly completion: Pick<{
|
|
6
|
+
readonly "gemini-2.5-flash": {
|
|
7
|
+
readonly name: GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH;
|
|
8
|
+
readonly limits: {
|
|
9
|
+
readonly maxInputTokens: 1048576;
|
|
10
|
+
readonly maxOutputTokens: 65536;
|
|
11
|
+
};
|
|
12
|
+
readonly config: {
|
|
13
|
+
readonly temperature: 0.2;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
readonly "gemini-2.5-pro": {
|
|
17
|
+
readonly name: GoogleGenerativeAIModelNames.GEMINI_2_5_PRO;
|
|
18
|
+
readonly limits: {
|
|
19
|
+
readonly maxInputTokens: 1048576;
|
|
20
|
+
readonly maxOutputTokens: 65536;
|
|
21
|
+
};
|
|
22
|
+
readonly config: {
|
|
23
|
+
readonly temperature: 0.2;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
readonly "gemini-2.5-flash-preview-tts": {
|
|
27
|
+
readonly name: GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH_PREVIEW_TTS;
|
|
28
|
+
readonly limits: {
|
|
29
|
+
readonly maxInputTokens: 8000;
|
|
30
|
+
readonly maxOutputTokens: 16000;
|
|
31
|
+
};
|
|
32
|
+
readonly config: {
|
|
33
|
+
readonly temperature: 0.2;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
readonly "gemini-2.5-pro-preview-tts": {
|
|
37
|
+
readonly name: GoogleGenerativeAIModelNames.GEMINI_2_5_PRO_PREVIEW_TTS;
|
|
38
|
+
readonly limits: {
|
|
39
|
+
readonly maxInputTokens: 8000;
|
|
40
|
+
readonly maxOutputTokens: 16000;
|
|
41
|
+
};
|
|
42
|
+
readonly config: {
|
|
43
|
+
readonly temperature: 0.2;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
}, GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH | GoogleGenerativeAIModelNames.GEMINI_2_5_PRO>;
|
|
47
|
+
readonly assistance: Pick<{
|
|
48
|
+
readonly "gemini-2.5-flash": {
|
|
49
|
+
readonly name: GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH;
|
|
50
|
+
readonly limits: {
|
|
51
|
+
readonly maxInputTokens: 1048576;
|
|
52
|
+
readonly maxOutputTokens: 65536;
|
|
53
|
+
};
|
|
54
|
+
readonly config: {
|
|
55
|
+
readonly temperature: 0.2;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
readonly "gemini-2.5-pro": {
|
|
59
|
+
readonly name: GoogleGenerativeAIModelNames.GEMINI_2_5_PRO;
|
|
60
|
+
readonly limits: {
|
|
61
|
+
readonly maxInputTokens: 1048576;
|
|
62
|
+
readonly maxOutputTokens: 65536;
|
|
63
|
+
};
|
|
64
|
+
readonly config: {
|
|
65
|
+
readonly temperature: 0.2;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
readonly "gemini-2.5-flash-preview-tts": {
|
|
69
|
+
readonly name: GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH_PREVIEW_TTS;
|
|
70
|
+
readonly limits: {
|
|
71
|
+
readonly maxInputTokens: 8000;
|
|
72
|
+
readonly maxOutputTokens: 16000;
|
|
73
|
+
};
|
|
74
|
+
readonly config: {
|
|
75
|
+
readonly temperature: 0.2;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
readonly "gemini-2.5-pro-preview-tts": {
|
|
79
|
+
readonly name: GoogleGenerativeAIModelNames.GEMINI_2_5_PRO_PREVIEW_TTS;
|
|
80
|
+
readonly limits: {
|
|
81
|
+
readonly maxInputTokens: 8000;
|
|
82
|
+
readonly maxOutputTokens: 16000;
|
|
83
|
+
};
|
|
84
|
+
readonly config: {
|
|
85
|
+
readonly temperature: 0.2;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
}, GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH | GoogleGenerativeAIModelNames.GEMINI_2_5_PRO>;
|
|
89
|
+
readonly speech_to_text: Pick<{
|
|
90
|
+
readonly "gemini-2.5-flash": {
|
|
91
|
+
readonly name: GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH;
|
|
92
|
+
readonly limits: {
|
|
93
|
+
readonly maxInputTokens: 1048576;
|
|
94
|
+
readonly maxOutputTokens: 65536;
|
|
95
|
+
};
|
|
96
|
+
readonly config: {
|
|
97
|
+
readonly temperature: 0.2;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
readonly "gemini-2.5-pro": {
|
|
101
|
+
readonly name: GoogleGenerativeAIModelNames.GEMINI_2_5_PRO;
|
|
102
|
+
readonly limits: {
|
|
103
|
+
readonly maxInputTokens: 1048576;
|
|
104
|
+
readonly maxOutputTokens: 65536;
|
|
105
|
+
};
|
|
106
|
+
readonly config: {
|
|
107
|
+
readonly temperature: 0.2;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
readonly "gemini-2.5-flash-preview-tts": {
|
|
111
|
+
readonly name: GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH_PREVIEW_TTS;
|
|
112
|
+
readonly limits: {
|
|
113
|
+
readonly maxInputTokens: 8000;
|
|
114
|
+
readonly maxOutputTokens: 16000;
|
|
115
|
+
};
|
|
116
|
+
readonly config: {
|
|
117
|
+
readonly temperature: 0.2;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
readonly "gemini-2.5-pro-preview-tts": {
|
|
121
|
+
readonly name: GoogleGenerativeAIModelNames.GEMINI_2_5_PRO_PREVIEW_TTS;
|
|
122
|
+
readonly limits: {
|
|
123
|
+
readonly maxInputTokens: 8000;
|
|
124
|
+
readonly maxOutputTokens: 16000;
|
|
125
|
+
};
|
|
126
|
+
readonly config: {
|
|
127
|
+
readonly temperature: 0.2;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
}, GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH | GoogleGenerativeAIModelNames.GEMINI_2_5_PRO>;
|
|
131
|
+
readonly text_to_speech: Pick<{
|
|
132
|
+
readonly "gemini-2.5-flash": {
|
|
133
|
+
readonly name: GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH;
|
|
134
|
+
readonly limits: {
|
|
135
|
+
readonly maxInputTokens: 1048576;
|
|
136
|
+
readonly maxOutputTokens: 65536;
|
|
137
|
+
};
|
|
138
|
+
readonly config: {
|
|
139
|
+
readonly temperature: 0.2;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
readonly "gemini-2.5-pro": {
|
|
143
|
+
readonly name: GoogleGenerativeAIModelNames.GEMINI_2_5_PRO;
|
|
144
|
+
readonly limits: {
|
|
145
|
+
readonly maxInputTokens: 1048576;
|
|
146
|
+
readonly maxOutputTokens: 65536;
|
|
147
|
+
};
|
|
148
|
+
readonly config: {
|
|
149
|
+
readonly temperature: 0.2;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
readonly "gemini-2.5-flash-preview-tts": {
|
|
153
|
+
readonly name: GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH_PREVIEW_TTS;
|
|
154
|
+
readonly limits: {
|
|
155
|
+
readonly maxInputTokens: 8000;
|
|
156
|
+
readonly maxOutputTokens: 16000;
|
|
157
|
+
};
|
|
158
|
+
readonly config: {
|
|
159
|
+
readonly temperature: 0.2;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
readonly "gemini-2.5-pro-preview-tts": {
|
|
163
|
+
readonly name: GoogleGenerativeAIModelNames.GEMINI_2_5_PRO_PREVIEW_TTS;
|
|
164
|
+
readonly limits: {
|
|
165
|
+
readonly maxInputTokens: 8000;
|
|
166
|
+
readonly maxOutputTokens: 16000;
|
|
167
|
+
};
|
|
168
|
+
readonly config: {
|
|
169
|
+
readonly temperature: 0.2;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
}, GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH_PREVIEW_TTS | GoogleGenerativeAIModelNames.GEMINI_2_5_PRO_PREVIEW_TTS>;
|
|
173
|
+
};
|
|
4
174
|
export declare const GOOGLE_AI_SERVICE_BUILDERS: {
|
|
5
|
-
|
|
175
|
+
readonly completion: (logger: import("../../LLMService.typedefs").LLMLogger | undefined, options: import("@google/genai").GoogleGenAIOptions) => GoogleGenerativeAICompletionService;
|
|
176
|
+
readonly assistance: (logger: import("../../LLMService.typedefs").LLMLogger | undefined, options: import("@google/genai").GoogleGenAIOptions) => GoogleGenerativeAIAssistanceService;
|
|
177
|
+
readonly speech_to_text: (logger: import("../../LLMService.typedefs").LLMLogger | undefined, options: import("@google/genai").GoogleGenAIOptions) => GoogleGenerativeAISpeechToTextService;
|
|
178
|
+
readonly text_to_speech: (logger: import("../../LLMService.typedefs").LLMLogger | undefined, options: import("@google/genai").GoogleGenAIOptions) => GoogleGenerativeAITextToSpeechService;
|
|
6
179
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleGenerativeAI.constants.js","sourceRoot":"","sources":["../../../src/providers/GoogleGenerativeAI/GoogleGenerativeAI.constants.ts"],"names":[],"mappings":";;;AAAA,+DAM+B;AAC/B,+EAA6E;AAC7E,sEAKiD;AACjD,mEAAoD;AAEvC,QAAA,wBAAwB,GAAG,MAAM,CAAC;AAE/C,MAAM,0BAA0B,
|
|
1
|
+
{"version":3,"file":"GoogleGenerativeAI.constants.js","sourceRoot":"","sources":["../../../src/providers/GoogleGenerativeAI/GoogleGenerativeAI.constants.ts"],"names":[],"mappings":";;;AAAA,+DAM+B;AAC/B,+EAA6E;AAC7E,sEAKiD;AACjD,mEAAoD;AAEvC,QAAA,wBAAwB,GAAG,MAAM,CAAC;AAE/C,MAAM,0BAA0B,GAAG;IACjC,CAAC,0DAA4B,CAAC,gBAAgB,CAAC,EAAE;QAC/C,IAAI,EAAE,0DAA4B,CAAC,gBAAgB;QACnD,MAAM,EAAE;YACN,cAAc,EAAE,SAAS;YACzB,eAAe,EAAE,MAAM;SACxB;QACD,MAAM,EAAE;YACN,WAAW,EAAE,GAAG;SACjB;K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,0DAA4B,CAAC,0BAA0B;KACxD,CACF;CAIF,CAAC;AAEW,QAAA,0BAA0B,GAAG;IACxC,CAAC,iCAAW,CAAC,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,CAAC,CAC7C,IAAI,8CAAmC,CAAC,MAAM,EAAE,OAAO,CAAC,CACzD;IACD,CAAC,iCAAW,CAAC,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,CAAC,CAC7C,IAAI,8CAAmC,CAAC,MAAM,EAAE,OAAO,CAAC,CACzD;IACD,CAAC,iCAAW,CAAC,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,CAAC,CAC/C,IAAI,gDAAqC,CAAC,MAAM,EAAE,OAAO,CAAC,CAC3D;IACD,CAAC,iCAAW,CAAC,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,CAAC,CAC/C,IAAI,gDAAqC,CAAC,MAAM,EAAE,OAAO,CAAC,CAC3D;CAKF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleGenerativeAIService.factory.js","sourceRoot":"","sources":["../../../src/providers/GoogleGenerativeAI/GoogleGenerativeAIService.factory.ts"],"names":[],"mappings":";;;AAAA,+DAI+B;AAC/B,yCAAoF;AACpF,8GAAyG;AAEzG,MAAa,gCAAiC,SAAQ,mCAErD;IACC,aAAa,CAGX,cAAiF;QAEjF,MAAM,EACJ,OAAO,EACP,MAAM,EACN,OAAO,GACR,GAAG,cAAc,CAAC;QACnB,MAAM,cAAc,GAAG,yDAA0B,CAAC,OAAO,CAAC,CAAC;QAE3D,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,YAAY,OAAO,2BAA2B,kCAAY,CAAC,kBAAkB,WAAW,CAAC,CAAC;QAC5G,CAAC;QAED,OAAO,cAAc,CAAC,MAAM,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"GoogleGenerativeAIService.factory.js","sourceRoot":"","sources":["../../../src/providers/GoogleGenerativeAI/GoogleGenerativeAIService.factory.ts"],"names":[],"mappings":";;;AAAA,+DAI+B;AAC/B,yCAAoF;AACpF,8GAAyG;AAEzG,MAAa,gCAAiC,SAAQ,mCAErD;IACC,aAAa,CAGX,cAAiF;QAEjF,MAAM,EACJ,OAAO,EACP,MAAM,EACN,OAAO,GACR,GAAG,cAAc,CAAC;QACnB,MAAM,cAAc,GAAG,yDAA0B,CAAC,OAAO,CAAC,CAAC;QAE3D,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,YAAY,OAAO,2BAA2B,kCAAY,CAAC,kBAAkB,WAAW,CAAC,CAAC;QAC5G,CAAC;QAED,OAAO,cAAc,CAAC,MAAM,EAAE,OAAO,CAA6E,CAAC;IACrH,CAAC;CACF;AArBD,4EAqBC"}
|
|
@@ -1,5 +1,386 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { OpenAIModelNames } from '../../providers/OpenAI/OpenAI.typedefs';
|
|
2
|
+
import { OpenAIAssistanceService, OpenAICompletionService, OpenAISpeechToTextService, OpenAITextToSpeechService } from './services';
|
|
3
|
+
export declare const OPEN_AI_MODELS: {
|
|
4
|
+
readonly completion: Pick<{
|
|
5
|
+
readonly "gpt-4o": {
|
|
6
|
+
readonly name: OpenAIModelNames.GPT_4_OMNI;
|
|
7
|
+
readonly limits: {
|
|
8
|
+
readonly maxInputTokens: 128000;
|
|
9
|
+
readonly maxOutputTokens: 16384;
|
|
10
|
+
};
|
|
11
|
+
readonly config: {
|
|
12
|
+
readonly temperature: 0.2;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
readonly "gpt-4o-mini": {
|
|
16
|
+
readonly name: OpenAIModelNames.GPT_4_OMNI_MINI;
|
|
17
|
+
readonly limits: {
|
|
18
|
+
readonly maxInputTokens: 128000;
|
|
19
|
+
readonly maxOutputTokens: 16384;
|
|
20
|
+
};
|
|
21
|
+
readonly config: {
|
|
22
|
+
readonly temperature: 0.5;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
readonly "gpt-4.1": {
|
|
26
|
+
readonly name: OpenAIModelNames.GPT_4_1;
|
|
27
|
+
readonly limits: {
|
|
28
|
+
readonly maxInputTokens: 1047576;
|
|
29
|
+
readonly maxOutputTokens: 32768;
|
|
30
|
+
};
|
|
31
|
+
readonly config: {
|
|
32
|
+
readonly temperature: 0.2;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
readonly "gpt-5": {
|
|
36
|
+
readonly name: OpenAIModelNames.GPT_5;
|
|
37
|
+
readonly limits: {
|
|
38
|
+
readonly maxInputTokens: 400000;
|
|
39
|
+
readonly maxOutputTokens: 128000;
|
|
40
|
+
};
|
|
41
|
+
readonly config: {
|
|
42
|
+
readonly temperature: 1;
|
|
43
|
+
readonly reasoning_effort: "minimal";
|
|
44
|
+
readonly verbosity: "medium";
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
readonly "gpt-5-mini": {
|
|
48
|
+
readonly name: OpenAIModelNames.GPT_5_MINI;
|
|
49
|
+
readonly limits: {
|
|
50
|
+
readonly maxInputTokens: 400000;
|
|
51
|
+
readonly maxOutputTokens: 128000;
|
|
52
|
+
};
|
|
53
|
+
readonly config: {
|
|
54
|
+
readonly temperature: 1;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
readonly "gpt-4o-transcribe": {
|
|
58
|
+
readonly name: OpenAIModelNames.GPT_4_OMNI_TRANSCRIBE;
|
|
59
|
+
readonly limits: {
|
|
60
|
+
readonly maxInputTokens: 16000;
|
|
61
|
+
readonly maxOutputTokens: 2000;
|
|
62
|
+
};
|
|
63
|
+
readonly config: {
|
|
64
|
+
readonly temperature: 0.2;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
readonly "gpt-4o-mini-transcribe": {
|
|
68
|
+
readonly name: OpenAIModelNames.GPT_4_OMNI_MINI_TRANSCRIBE;
|
|
69
|
+
readonly limits: {
|
|
70
|
+
readonly maxInputTokens: 16000;
|
|
71
|
+
readonly maxOutputTokens: 2000;
|
|
72
|
+
};
|
|
73
|
+
readonly config: {
|
|
74
|
+
readonly temperature: 0.2;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
readonly "gpt-4o-mini-tts": {
|
|
78
|
+
readonly name: OpenAIModelNames.GPT_4_OMNI_MINI_TTS;
|
|
79
|
+
readonly limits: {
|
|
80
|
+
readonly maxInputTokens: 2000;
|
|
81
|
+
readonly maxOutputTokens: number;
|
|
82
|
+
};
|
|
83
|
+
readonly config: {
|
|
84
|
+
readonly temperature: 0.2;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
readonly "tts-1": {
|
|
88
|
+
readonly name: OpenAIModelNames.TTS_1;
|
|
89
|
+
readonly limits: {
|
|
90
|
+
readonly maxInputTokens: 2000;
|
|
91
|
+
readonly maxOutputTokens: number;
|
|
92
|
+
};
|
|
93
|
+
readonly config: {
|
|
94
|
+
readonly temperature: 0.2;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
}, OpenAIModelNames.GPT_4_OMNI | OpenAIModelNames.GPT_4_OMNI_MINI | OpenAIModelNames.GPT_4_1 | OpenAIModelNames.GPT_5 | OpenAIModelNames.GPT_5_MINI>;
|
|
98
|
+
readonly assistance: Pick<{
|
|
99
|
+
readonly "gpt-4o": {
|
|
100
|
+
readonly name: OpenAIModelNames.GPT_4_OMNI;
|
|
101
|
+
readonly limits: {
|
|
102
|
+
readonly maxInputTokens: 128000;
|
|
103
|
+
readonly maxOutputTokens: 16384;
|
|
104
|
+
};
|
|
105
|
+
readonly config: {
|
|
106
|
+
readonly temperature: 0.2;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
readonly "gpt-4o-mini": {
|
|
110
|
+
readonly name: OpenAIModelNames.GPT_4_OMNI_MINI;
|
|
111
|
+
readonly limits: {
|
|
112
|
+
readonly maxInputTokens: 128000;
|
|
113
|
+
readonly maxOutputTokens: 16384;
|
|
114
|
+
};
|
|
115
|
+
readonly config: {
|
|
116
|
+
readonly temperature: 0.5;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
readonly "gpt-4.1": {
|
|
120
|
+
readonly name: OpenAIModelNames.GPT_4_1;
|
|
121
|
+
readonly limits: {
|
|
122
|
+
readonly maxInputTokens: 1047576;
|
|
123
|
+
readonly maxOutputTokens: 32768;
|
|
124
|
+
};
|
|
125
|
+
readonly config: {
|
|
126
|
+
readonly temperature: 0.2;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
readonly "gpt-5": {
|
|
130
|
+
readonly name: OpenAIModelNames.GPT_5;
|
|
131
|
+
readonly limits: {
|
|
132
|
+
readonly maxInputTokens: 400000;
|
|
133
|
+
readonly maxOutputTokens: 128000;
|
|
134
|
+
};
|
|
135
|
+
readonly config: {
|
|
136
|
+
readonly temperature: 1;
|
|
137
|
+
readonly reasoning_effort: "minimal";
|
|
138
|
+
readonly verbosity: "medium";
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
readonly "gpt-5-mini": {
|
|
142
|
+
readonly name: OpenAIModelNames.GPT_5_MINI;
|
|
143
|
+
readonly limits: {
|
|
144
|
+
readonly maxInputTokens: 400000;
|
|
145
|
+
readonly maxOutputTokens: 128000;
|
|
146
|
+
};
|
|
147
|
+
readonly config: {
|
|
148
|
+
readonly temperature: 1;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
readonly "gpt-4o-transcribe": {
|
|
152
|
+
readonly name: OpenAIModelNames.GPT_4_OMNI_TRANSCRIBE;
|
|
153
|
+
readonly limits: {
|
|
154
|
+
readonly maxInputTokens: 16000;
|
|
155
|
+
readonly maxOutputTokens: 2000;
|
|
156
|
+
};
|
|
157
|
+
readonly config: {
|
|
158
|
+
readonly temperature: 0.2;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
readonly "gpt-4o-mini-transcribe": {
|
|
162
|
+
readonly name: OpenAIModelNames.GPT_4_OMNI_MINI_TRANSCRIBE;
|
|
163
|
+
readonly limits: {
|
|
164
|
+
readonly maxInputTokens: 16000;
|
|
165
|
+
readonly maxOutputTokens: 2000;
|
|
166
|
+
};
|
|
167
|
+
readonly config: {
|
|
168
|
+
readonly temperature: 0.2;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
readonly "gpt-4o-mini-tts": {
|
|
172
|
+
readonly name: OpenAIModelNames.GPT_4_OMNI_MINI_TTS;
|
|
173
|
+
readonly limits: {
|
|
174
|
+
readonly maxInputTokens: 2000;
|
|
175
|
+
readonly maxOutputTokens: number;
|
|
176
|
+
};
|
|
177
|
+
readonly config: {
|
|
178
|
+
readonly temperature: 0.2;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
readonly "tts-1": {
|
|
182
|
+
readonly name: OpenAIModelNames.TTS_1;
|
|
183
|
+
readonly limits: {
|
|
184
|
+
readonly maxInputTokens: 2000;
|
|
185
|
+
readonly maxOutputTokens: number;
|
|
186
|
+
};
|
|
187
|
+
readonly config: {
|
|
188
|
+
readonly temperature: 0.2;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
}, OpenAIModelNames.GPT_4_OMNI | OpenAIModelNames.GPT_4_1>;
|
|
192
|
+
readonly text_to_speech: Pick<{
|
|
193
|
+
readonly "gpt-4o": {
|
|
194
|
+
readonly name: OpenAIModelNames.GPT_4_OMNI;
|
|
195
|
+
readonly limits: {
|
|
196
|
+
readonly maxInputTokens: 128000;
|
|
197
|
+
readonly maxOutputTokens: 16384;
|
|
198
|
+
};
|
|
199
|
+
readonly config: {
|
|
200
|
+
readonly temperature: 0.2;
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
readonly "gpt-4o-mini": {
|
|
204
|
+
readonly name: OpenAIModelNames.GPT_4_OMNI_MINI;
|
|
205
|
+
readonly limits: {
|
|
206
|
+
readonly maxInputTokens: 128000;
|
|
207
|
+
readonly maxOutputTokens: 16384;
|
|
208
|
+
};
|
|
209
|
+
readonly config: {
|
|
210
|
+
readonly temperature: 0.5;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
readonly "gpt-4.1": {
|
|
214
|
+
readonly name: OpenAIModelNames.GPT_4_1;
|
|
215
|
+
readonly limits: {
|
|
216
|
+
readonly maxInputTokens: 1047576;
|
|
217
|
+
readonly maxOutputTokens: 32768;
|
|
218
|
+
};
|
|
219
|
+
readonly config: {
|
|
220
|
+
readonly temperature: 0.2;
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
readonly "gpt-5": {
|
|
224
|
+
readonly name: OpenAIModelNames.GPT_5;
|
|
225
|
+
readonly limits: {
|
|
226
|
+
readonly maxInputTokens: 400000;
|
|
227
|
+
readonly maxOutputTokens: 128000;
|
|
228
|
+
};
|
|
229
|
+
readonly config: {
|
|
230
|
+
readonly temperature: 1;
|
|
231
|
+
readonly reasoning_effort: "minimal";
|
|
232
|
+
readonly verbosity: "medium";
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
readonly "gpt-5-mini": {
|
|
236
|
+
readonly name: OpenAIModelNames.GPT_5_MINI;
|
|
237
|
+
readonly limits: {
|
|
238
|
+
readonly maxInputTokens: 400000;
|
|
239
|
+
readonly maxOutputTokens: 128000;
|
|
240
|
+
};
|
|
241
|
+
readonly config: {
|
|
242
|
+
readonly temperature: 1;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
readonly "gpt-4o-transcribe": {
|
|
246
|
+
readonly name: OpenAIModelNames.GPT_4_OMNI_TRANSCRIBE;
|
|
247
|
+
readonly limits: {
|
|
248
|
+
readonly maxInputTokens: 16000;
|
|
249
|
+
readonly maxOutputTokens: 2000;
|
|
250
|
+
};
|
|
251
|
+
readonly config: {
|
|
252
|
+
readonly temperature: 0.2;
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
readonly "gpt-4o-mini-transcribe": {
|
|
256
|
+
readonly name: OpenAIModelNames.GPT_4_OMNI_MINI_TRANSCRIBE;
|
|
257
|
+
readonly limits: {
|
|
258
|
+
readonly maxInputTokens: 16000;
|
|
259
|
+
readonly maxOutputTokens: 2000;
|
|
260
|
+
};
|
|
261
|
+
readonly config: {
|
|
262
|
+
readonly temperature: 0.2;
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
readonly "gpt-4o-mini-tts": {
|
|
266
|
+
readonly name: OpenAIModelNames.GPT_4_OMNI_MINI_TTS;
|
|
267
|
+
readonly limits: {
|
|
268
|
+
readonly maxInputTokens: 2000;
|
|
269
|
+
readonly maxOutputTokens: number;
|
|
270
|
+
};
|
|
271
|
+
readonly config: {
|
|
272
|
+
readonly temperature: 0.2;
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
readonly "tts-1": {
|
|
276
|
+
readonly name: OpenAIModelNames.TTS_1;
|
|
277
|
+
readonly limits: {
|
|
278
|
+
readonly maxInputTokens: 2000;
|
|
279
|
+
readonly maxOutputTokens: number;
|
|
280
|
+
};
|
|
281
|
+
readonly config: {
|
|
282
|
+
readonly temperature: 0.2;
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
}, OpenAIModelNames.TTS_1 | OpenAIModelNames.GPT_4_OMNI_MINI_TTS>;
|
|
286
|
+
readonly speech_to_text: Pick<{
|
|
287
|
+
readonly "gpt-4o": {
|
|
288
|
+
readonly name: OpenAIModelNames.GPT_4_OMNI;
|
|
289
|
+
readonly limits: {
|
|
290
|
+
readonly maxInputTokens: 128000;
|
|
291
|
+
readonly maxOutputTokens: 16384;
|
|
292
|
+
};
|
|
293
|
+
readonly config: {
|
|
294
|
+
readonly temperature: 0.2;
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
readonly "gpt-4o-mini": {
|
|
298
|
+
readonly name: OpenAIModelNames.GPT_4_OMNI_MINI;
|
|
299
|
+
readonly limits: {
|
|
300
|
+
readonly maxInputTokens: 128000;
|
|
301
|
+
readonly maxOutputTokens: 16384;
|
|
302
|
+
};
|
|
303
|
+
readonly config: {
|
|
304
|
+
readonly temperature: 0.5;
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
readonly "gpt-4.1": {
|
|
308
|
+
readonly name: OpenAIModelNames.GPT_4_1;
|
|
309
|
+
readonly limits: {
|
|
310
|
+
readonly maxInputTokens: 1047576;
|
|
311
|
+
readonly maxOutputTokens: 32768;
|
|
312
|
+
};
|
|
313
|
+
readonly config: {
|
|
314
|
+
readonly temperature: 0.2;
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
readonly "gpt-5": {
|
|
318
|
+
readonly name: OpenAIModelNames.GPT_5;
|
|
319
|
+
readonly limits: {
|
|
320
|
+
readonly maxInputTokens: 400000;
|
|
321
|
+
readonly maxOutputTokens: 128000;
|
|
322
|
+
};
|
|
323
|
+
readonly config: {
|
|
324
|
+
readonly temperature: 1;
|
|
325
|
+
readonly reasoning_effort: "minimal";
|
|
326
|
+
readonly verbosity: "medium";
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
readonly "gpt-5-mini": {
|
|
330
|
+
readonly name: OpenAIModelNames.GPT_5_MINI;
|
|
331
|
+
readonly limits: {
|
|
332
|
+
readonly maxInputTokens: 400000;
|
|
333
|
+
readonly maxOutputTokens: 128000;
|
|
334
|
+
};
|
|
335
|
+
readonly config: {
|
|
336
|
+
readonly temperature: 1;
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
readonly "gpt-4o-transcribe": {
|
|
340
|
+
readonly name: OpenAIModelNames.GPT_4_OMNI_TRANSCRIBE;
|
|
341
|
+
readonly limits: {
|
|
342
|
+
readonly maxInputTokens: 16000;
|
|
343
|
+
readonly maxOutputTokens: 2000;
|
|
344
|
+
};
|
|
345
|
+
readonly config: {
|
|
346
|
+
readonly temperature: 0.2;
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
readonly "gpt-4o-mini-transcribe": {
|
|
350
|
+
readonly name: OpenAIModelNames.GPT_4_OMNI_MINI_TRANSCRIBE;
|
|
351
|
+
readonly limits: {
|
|
352
|
+
readonly maxInputTokens: 16000;
|
|
353
|
+
readonly maxOutputTokens: 2000;
|
|
354
|
+
};
|
|
355
|
+
readonly config: {
|
|
356
|
+
readonly temperature: 0.2;
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
readonly "gpt-4o-mini-tts": {
|
|
360
|
+
readonly name: OpenAIModelNames.GPT_4_OMNI_MINI_TTS;
|
|
361
|
+
readonly limits: {
|
|
362
|
+
readonly maxInputTokens: 2000;
|
|
363
|
+
readonly maxOutputTokens: number;
|
|
364
|
+
};
|
|
365
|
+
readonly config: {
|
|
366
|
+
readonly temperature: 0.2;
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
readonly "tts-1": {
|
|
370
|
+
readonly name: OpenAIModelNames.TTS_1;
|
|
371
|
+
readonly limits: {
|
|
372
|
+
readonly maxInputTokens: 2000;
|
|
373
|
+
readonly maxOutputTokens: number;
|
|
374
|
+
};
|
|
375
|
+
readonly config: {
|
|
376
|
+
readonly temperature: 0.2;
|
|
377
|
+
};
|
|
378
|
+
};
|
|
379
|
+
}, OpenAIModelNames.GPT_4_OMNI_TRANSCRIBE | OpenAIModelNames.GPT_4_OMNI_MINI_TRANSCRIBE>;
|
|
380
|
+
};
|
|
3
381
|
export declare const OPEN_AI_SERVICE_BUILDERS: {
|
|
4
|
-
|
|
382
|
+
readonly completion: (logger: import("../../LLMService.typedefs").LLMLogger | undefined, options: import("openai").ClientOptions) => OpenAICompletionService;
|
|
383
|
+
readonly assistance: (logger: import("../../LLMService.typedefs").LLMLogger | undefined, options: import("openai").ClientOptions) => OpenAIAssistanceService;
|
|
384
|
+
readonly speech_to_text: (logger: import("../../LLMService.typedefs").LLMLogger | undefined, options: import("openai").ClientOptions) => OpenAISpeechToTextService;
|
|
385
|
+
readonly text_to_speech: (logger: import("../../LLMService.typedefs").LLMLogger | undefined, options: import("openai").ClientOptions) => OpenAITextToSpeechService;
|
|
5
386
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAI.constants.js","sourceRoot":"","sources":["../../../src/providers/OpenAI/OpenAI.constants.ts"],"names":[],"mappings":";;;AAAA,+DAM+B;AAC/B,wEAAsE;AACtE,yCAKoB;AACpB,mEAAoD;AAEpD,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"OpenAI.constants.js","sourceRoot":"","sources":["../../../src/providers/OpenAI/OpenAI.constants.ts"],"names":[],"mappings":";;;AAAA,+DAM+B;AAC/B,wEAAsE;AACtE,yCAKoB;AACpB,mEAAoD;AAEpD,MAAM,wBAAwB,GAAG;IAC/B,CAAC,kCAAgB,CAAC,UAAU,CAAC,EAAE;QAC7B,IAAI,EAAE,kCAAgB,CAAC,UAAU;QACjC,MAAM,EAAE;YACN,cAAc,EAAE,OAAO;YACvB,eAAe,EAAE,MAAM;SACxB;QACD,MAAM,EAAE;YACN,WAAW,EAAE,GAAG;SACjB;KACF;IACD,CAAC,kCAAgB,CAAC,eAAe,CAAC,EAAE;QAClC,IAAI,EAAE,kCAAgB,CAAC,eAAe;QACtC,MAAM,EAAE;YACN,cAAc,EAAE,OAAO;YACvB,eAAe,EAAE,MAAM;SACxB;QACD,MAAM,EAAE;YACN,WAAW,EAAE,GAAG;SACjB;KACF;IACD,CAAC,kCAAgB,CAAC,OAAO,CAAC,EAAE;QAC1B,IAAI,EAAE,kCAAgB,CAAC,OAAO;QAC9B,MAAM,EAAE;YACN,cAAc,EAAE,SAAS;YACzB,eAAe,EAAE,MAAM;SACxB;QACD,MAAM,EAAE;YACN,WAAW,EAAE,GAAG;SACjB;KACF;IACD,CAAC,kCAAgB,CAAC,KAAK,CAAC,EAAE;QACxB,IAAI,EAAE,kCAAgB,CAAC,KAAK;QAC5B,MAAM,EAAE;YACN,cAAc,EAAE,OAAO;YACvB,eAAe,EAAE,OAAO;SACzB;QACD,MAAM,EAAE;YACN,WAAW,EAAE,CAAC;Y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
|
|
1
|
-
{"version":3,"file":"OpenAIService.factory.js","sourceRoot":"","sources":["../../../src/providers/OpenAI/OpenAIService.factory.ts"],"names":[],"mappings":";;;AAAA,+DAI+B;AAC/B,yCAAoF;AACpF,0EAA+E;AAE/E,MAAa,oBAAqB,SAAQ,mCAEzC;IACC,aAAa,CAGX,cAAqE;QAErE,MAAM,EACJ,OAAO,EACP,MAAM,EACN,OAAO,GACR,GAAG,cAAc,CAAC;QACnB,MAAM,cAAc,GAAG,2CAAwB,CAAC,OAAO,CAAC,CAAC;QAEzD,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,YAAY,OAAO,2BAA2B,kCAAY,CAAC,MAAM,WAAW,CAAC,CAAC;QAChG,CAAC;QAED,OAAO,cAAc,CAAC,MAAM,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"OpenAIService.factory.js","sourceRoot":"","sources":["../../../src/providers/OpenAI/OpenAIService.factory.ts"],"names":[],"mappings":";;;AAAA,+DAI+B;AAC/B,yCAAoF;AACpF,0EAA+E;AAE/E,MAAa,oBAAqB,SAAQ,mCAEzC;IACC,aAAa,CAGX,cAAqE;QAErE,MAAM,EACJ,OAAO,EACP,MAAM,EACN,OAAO,GACR,GAAG,cAAc,CAAC;QACnB,MAAM,cAAc,GAAG,2CAAwB,CAAC,OAAO,CAAC,CAAC;QAEzD,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,YAAY,OAAO,2BAA2B,kCAAY,CAAC,MAAM,WAAW,CAAC,CAAC;QAChG,CAAC;QAED,OAAO,cAAc,CAAC,MAAM,EAAE,OAAO,CAAiE,CAAC;IACzG,CAAC;CACF;AArBD,oDAqBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LLMAssistanceService.abstract.js","sourceRoot":"","sources":["../../src/services/LLMAssistanceService.abstract.ts"],"names":[],"mappings":";;;AAAA,+DAkB+B;AAC/B,yCAA4C;AAC5C,iEAA8D;AAG9D,MAAsB,oBACpB,SAAQ,yBAGP;IACD,YACE,QAAkB,EAClB,MAA6B,EAC7B,OAAqC;QAErC,KAAK,CACH,QAAQ,EACR,mBAAmB,EACnB,iCAAW,CAAC,UAAU,EACtB,MAAM,EACN,OAAO,CACR,CAAC;IACJ,CAAC;IAmDS,WAAW,CAAC,IAA0B;QAC9C,OAAO,2CAAoB,CAAC,QAAQ,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"LLMAssistanceService.abstract.js","sourceRoot":"","sources":["../../src/services/LLMAssistanceService.abstract.ts"],"names":[],"mappings":";;;AAAA,+DAkB+B;AAC/B,yCAA4C;AAC5C,iEAA8D;AAG9D,MAAsB,oBACpB,SAAQ,yBAGP;IACD,YACE,QAAkB,EAClB,MAA6B,EAC7B,OAAqC;QAErC,KAAK,CACH,QAAQ,EACR,mBAAmB,EACnB,iCAAW,CAAC,UAAU,EACtB,MAAM,EACN,OAAO,CACR,CAAC;IACJ,CAAC;IAmDS,WAAW,CAAC,IAA0B;QAC9C,OAAO,2CAAoB,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAe,CAAC,CAAC;IAC7D,CAAC;IAES,cAAc,GAAG,CAAC,IAA0B,EAAW,EAAE;QACjE,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC,CAAA;CACF;AA3ED,oDA2EC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type LLMLogger, type LLMInstanceOptions, type LLMInstances, type
|
|
1
|
+
import { type LLMLogger, type LLMInstanceOptions, type LLMInstances, type LLMProviders, type LLMPurposes, type LLMProviderModelsByPurpose } from '../LLMService.typedefs';
|
|
2
2
|
export declare abstract class LLMBaseService<Purpose extends LLMPurposes, Provider extends LLMProviders> {
|
|
3
3
|
readonly provider: Provider;
|
|
4
4
|
readonly serviceName: string;
|
|
@@ -7,6 +7,6 @@ export declare abstract class LLMBaseService<Purpose extends LLMPurposes, Provid
|
|
|
7
7
|
options: LLMInstanceOptions[Provider];
|
|
8
8
|
constructor(provider: Provider, serviceName: string, purpose: Purpose, logger: LLMLogger | undefined, options: LLMInstanceOptions[Provider]);
|
|
9
9
|
abstract get instance(): LLMInstances[Provider];
|
|
10
|
-
get models():
|
|
10
|
+
get models(): LLMProviderModelsByPurpose<Purpose, Provider>[Purpose];
|
|
11
11
|
protected initLogger(): void;
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LLMBaseService.abstract.js","sourceRoot":"","sources":["../../src/services/LLMBaseService.abstract.ts"],"names":[],"mappings":";;;AAQA,iEAA4D;AAE5D,MAAsB,cAAc;IAKhB;IACA;IACA;IACT;IACA;IALT,YACkB,QAAkB,EAClB,WAAmB,EACnB,OAAgB,EACzB,MAA6B,EAC7B,OAAqC;QAJ5B,aAAQ,GAAR,QAAQ,CAAU;QAClB,gBAAW,GAAX,WAAW,CAAQ;QACnB,YAAO,GAAP,OAAO,CAAS;QACzB,WAAM,GAAN,MAAM,CAAuB;QAC7B,YAAO,GAAP,OAAO,CAA8B;QAE5C,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAID,IAAW,MAAM;QACf,OAAO,yCAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"LLMBaseService.abstract.js","sourceRoot":"","sources":["../../src/services/LLMBaseService.abstract.ts"],"names":[],"mappings":";;;AAQA,iEAA4D;AAE5D,MAAsB,cAAc;IAKhB;IACA;IACA;IACT;IACA;IALT,YACkB,QAAkB,EAClB,WAAmB,EACnB,OAAgB,EACzB,MAA6B,EAC7B,OAAqC;QAJ5B,aAAQ,GAAR,QAAQ,CAAU;QAClB,gBAAW,GAAX,WAAW,CAAQ;QACnB,YAAO,GAAP,OAAO,CAAS;QACzB,WAAM,GAAN,MAAM,CAAuB;QAC7B,YAAO,GAAP,OAAO,CAA8B;QAE5C,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAID,IAAW,MAAM;QACf,OAAO,yCAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,OAAO,CAA2D,CAAC;IACnH,CAAC;IAES,UAAU;QAClB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;IAC3E,CAAC;CACF;AAvBD,wCAuBC"}
|
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
* This is a conditional section that will only appear if the value is truthy.
|
|
18
18
|
* Value can be used inside the section: {{valueAsCondition}}
|
|
19
19
|
* {{/valueAsCondition}}
|
|
20
|
+
*
|
|
21
|
+
* {{#!skipSection}}
|
|
22
|
+
* This negative conditional section will only appear if skipSection is falsy.
|
|
23
|
+
* {{/skipSection}}
|
|
20
24
|
* `),
|
|
21
25
|
* };
|
|
22
26
|
*
|
|
@@ -33,8 +37,8 @@
|
|
|
33
37
|
type RegularValue = string | number;
|
|
34
38
|
type ConditionalValue = RegularValue | boolean | undefined | null;
|
|
35
39
|
type ExtractAllVariables<T extends string> = T extends `${string}{{${infer Key}}}${infer Rest}` ? Key extends `${infer CleanKey}` ? CleanKey | ExtractAllVariables<Rest> : never : never;
|
|
36
|
-
type ExtractSectionVariables<T extends string> = T extends `${string}{{#${infer Key}}}${infer Rest}` ? Key | ExtractSectionVariables<Rest> : T extends `${string}{{/${infer Key}}}${infer Rest}` ? Key | ExtractSectionVariables<Rest> : never;
|
|
37
|
-
type ExtractRegularVariables<T extends string> = ExtractAllVariables<T> extends infer All ? All extends string ? All extends `#${string}` | `/${string}` ? never : All : never : never;
|
|
40
|
+
type ExtractSectionVariables<T extends string> = T extends `${string}{{#!${infer Key}}}${infer Rest}` ? Key | ExtractSectionVariables<Rest> : T extends `${string}{{#${infer Key}}}${infer Rest}` ? Key | ExtractSectionVariables<Rest> : T extends `${string}{{/${infer Key}}}${infer Rest}` ? Key | ExtractSectionVariables<Rest> : never;
|
|
41
|
+
type ExtractRegularVariables<T extends string> = ExtractAllVariables<T> extends infer All ? All extends string ? All extends `#!${string}` | `#${string}` | `/${string}` ? never : All : never : never;
|
|
38
42
|
type CreateVariableRecord<T extends string> = ExtractRegularVariables<T> extends never ? ExtractSectionVariables<T> extends never ? Record<string, never> : Record<ExtractSectionVariables<T>, RegularValue> : ExtractSectionVariables<T> extends never ? Record<ExtractRegularVariables<T>, RegularValue> : Omit<Record<ExtractRegularVariables<T>, RegularValue>, ExtractSectionVariables<T>> & Record<ExtractSectionVariables<T>, ConditionalValue>;
|
|
39
43
|
type HasVariables<T extends string> = ExtractAllVariables<T> extends never ? false : true;
|
|
40
44
|
/**
|
|
@@ -44,6 +48,7 @@ type HasVariables<T extends string> = ExtractAllVariables<T> extends never ? fal
|
|
|
44
48
|
* @param {T} template The template string with placeholders:
|
|
45
49
|
* - for dynamic values (e.g., `{{topicTitle}}`)
|
|
46
50
|
* - for conditional sections (e.g., `{{#section}}...{{/section}}`)
|
|
51
|
+
* - for negative conditional sections (e.g., `{{#!section}}...{{/section}}`)
|
|
47
52
|
* - for sections that use conditional variables as values (e.g., `{{#bonus}}...{{bonus}}...{{/bonus}}`)
|
|
48
53
|
* @returns A function that takes the dynamic values and returns the generated prompt.
|
|
49
54
|
*/
|