@mate-academy/llm-gateway 3.0.1 → 3.0.4

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 CHANGED
@@ -2,6 +2,47 @@
2
2
 
3
3
  A standardized interface for interacting with various Large Language Model (LLM) providers.
4
4
 
5
+ ## Table of Contents
6
+
7
+ - [Overview](#overview)
8
+ - [Installation](#installation)
9
+ - [Features](#features)
10
+ - [Usage](#usage)
11
+ - [Logger Interface](#logger-interface)
12
+ - [Basic Setup](#basic-setup)
13
+ - [Real-world Example](#real-world-example)
14
+ - [Usage Examples](#usage-examples)
15
+ - [Basic Text Completion](#basic-text-completion)
16
+ - [Structured Output](#structured-output)
17
+ - [Model Configuration](#model-configuration)
18
+ - [File-based Assistance](#file-based-assistance)
19
+ - [Speech-to-Text Transcription](#speech-to-text-transcription)
20
+ - [Text-to-Speech Generation](#text-to-speech-generation)
21
+ - [Token Counting for Context Management](#token-counting-for-context-management)
22
+ - [Abort Signal Support](#abort-signal-support)
23
+ - [API Reference](#api-reference)
24
+ - [LLMProviders](#llmproviders)
25
+ - [LLMPurposes](#llmpurposes)
26
+ - [LLMServiceFactory](#llmservicefactory)
27
+ - [LLMCompletionService](#llmcompletionservice)
28
+ - [LLMAssistanceService](#llmassistanceservice)
29
+ - [LLMSpeechToTextService](#llmspeechtotext-service)
30
+ - [LLMTextToSpeechService](#llmtexttospeech-service)
31
+ - [Prompt Builder](#prompt-builder)
32
+ - [Supported Providers](#supported-providers)
33
+ - [OpenAI](#openai)
34
+ - [Google Generative AI](#google-generative-ai)
35
+ - [Testing](#testing)
36
+ - [Test Structure](#test-structure)
37
+ - [Running Tests](#running-tests)
38
+ - [Test Configuration](#test-configuration)
39
+ - [Test Coverage](#test-coverage)
40
+ - [Test Helpers](#test-helpers)
41
+ - [Writing Custom Tests](#writing-custom-tests)
42
+ - [Developer Guide](#developer-guide)
43
+ - [Schema Architecture Overview](#schema-architecture-overview)
44
+ - [Adding a New Provider](#adding-a-new-provider)
45
+
5
46
  ## Overview
6
47
 
7
48
  The `@mate-academy/llm-gateway` package provides a unified way to work with different LLM providers like OpenAI and Google Generative AI. It abstracts the implementation details of each provider, allowing you to easily switch between them without changing your application code.
@@ -771,6 +812,47 @@ const basicLesson = coursePrompt({
771
812
  });
772
813
  ```
773
814
 
815
+ #### Negative Conditional Sections
816
+
817
+ Negative conditions allow you to show content when a value is falsy:
818
+
819
+ ```typescript
820
+ const feedbackPrompt = createPromptTemplate(`
821
+ Analyze the {{language}} code submission.
822
+ {{#passed}}
823
+ Great job! The tests passed successfully.
824
+ {{/passed}}
825
+ {{#!passed}}
826
+ The tests did not pass. Please review the following issues:
827
+ {{errors}}
828
+ {{/passed}}
829
+
830
+ {{#!skipSuggestions}}
831
+ Here are some suggestions for improvement:
832
+ - Consider refactoring for better readability
833
+ - Add more comprehensive error handling
834
+ {{/skipSuggestions}}
835
+ `);
836
+
837
+ // When tests pass
838
+ const successResult = feedbackPrompt({
839
+ language: 'JavaScript',
840
+ passed: true,
841
+ errors: '',
842
+ skipSuggestions: false
843
+ });
844
+ // Result: Shows success message and suggestions
845
+
846
+ // When tests fail
847
+ const failureResult = feedbackPrompt({
848
+ language: 'Python',
849
+ passed: false,
850
+ errors: 'TypeError on line 15',
851
+ skipSuggestions: false
852
+ });
853
+ // Result: Shows failure message with errors and suggestions
854
+ ```
855
+
774
856
  #### Nested Conditional Sections
775
857
 
776
858
  You can nest conditional sections for more complex logic:
@@ -969,8 +1051,10 @@ Creates a prompt template function from a template string.
969
1051
  - Replacement values can be strings, numbers, or booleans (automatically converted to strings)
970
1052
 
971
1053
  **Conditional Sections:**
972
- - Conditional sections use the syntax: `{{#conditionName}}content{{/conditionName}}`
973
- - The section content is included only if the condition variable is truthy
1054
+ - Positive conditional sections use the syntax: `{{#conditionName}}content{{/conditionName}}`
1055
+ - The section content is included only if the condition variable is truthy
1056
+ - Negative conditional sections use the syntax: `{{#!conditionName}}content{{/conditionName}}`
1057
+ - The section content is included only if the condition variable is falsy
974
1058
  - Truthy values: `true`, non-empty strings, non-zero numbers
975
1059
  - Falsy values: `false`, empty strings, `0`, `null`, `undefined`
976
1060
  - Conditional variables are optional in the type system when used only as conditions
@@ -1,10 +1,558 @@
1
- import { type LLMProviderModelsByPurpose, LLMProviders, type LLMPurposes, LLMUploadFileMimeTypes } from './LLMService.typedefs';
2
- import { type LLMServicePurposeFactory } from './services/LLMServicePurposeFactory.abstract';
1
+ import { LLMUploadFileMimeTypes } from './LLMService.typedefs';
2
+ import { OpenAIServiceFactory, GoogleGenerativeAIServiceFactory } from './providers';
3
3
  export declare const LLM_SERVICE_FACTORIES: {
4
- [provider in LLMProviders]: LLMServicePurposeFactory<provider>;
4
+ readonly OpenAI: OpenAIServiceFactory;
5
+ readonly GoogleGenerativeAI: GoogleGenerativeAIServiceFactory;
5
6
  };
6
7
  export declare const LLM_SERVICE_MODELS: {
7
- [provider in LLMProviders]: LLMProviderModelsByPurpose<LLMPurposes, provider>;
8
+ readonly OpenAI: {
9
+ readonly completion: Pick<{
10
+ readonly "gpt-4o": {
11
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_OMNI;
12
+ readonly limits: {
13
+ readonly maxInputTokens: 128000;
14
+ readonly maxOutputTokens: 16384;
15
+ };
16
+ readonly config: {
17
+ readonly temperature: 0.2;
18
+ };
19
+ };
20
+ readonly "gpt-4o-mini": {
21
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_OMNI_MINI;
22
+ readonly limits: {
23
+ readonly maxInputTokens: 128000;
24
+ readonly maxOutputTokens: 16384;
25
+ };
26
+ readonly config: {
27
+ readonly temperature: 0.5;
28
+ };
29
+ };
30
+ readonly "gpt-4.1": {
31
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_1;
32
+ readonly limits: {
33
+ readonly maxInputTokens: 1047576;
34
+ readonly maxOutputTokens: 32768;
35
+ };
36
+ readonly config: {
37
+ readonly temperature: 0.2;
38
+ };
39
+ };
40
+ readonly "gpt-5": {
41
+ readonly name: import("./providers").OpenAIModelNames.GPT_5;
42
+ readonly limits: {
43
+ readonly maxInputTokens: 400000;
44
+ readonly maxOutputTokens: 128000;
45
+ };
46
+ readonly config: {
47
+ readonly temperature: 1;
48
+ readonly reasoning_effort: "minimal";
49
+ readonly verbosity: "medium";
50
+ };
51
+ };
52
+ readonly "gpt-5-mini": {
53
+ readonly name: import("./providers").OpenAIModelNames.GPT_5_MINI;
54
+ readonly limits: {
55
+ readonly maxInputTokens: 400000;
56
+ readonly maxOutputTokens: 128000;
57
+ };
58
+ readonly config: {
59
+ readonly temperature: 1;
60
+ };
61
+ };
62
+ readonly "gpt-4o-transcribe": {
63
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_OMNI_TRANSCRIBE;
64
+ readonly limits: {
65
+ readonly maxInputTokens: 16000;
66
+ readonly maxOutputTokens: 2000;
67
+ };
68
+ readonly config: {
69
+ readonly temperature: 0.2;
70
+ };
71
+ };
72
+ readonly "gpt-4o-mini-transcribe": {
73
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_OMNI_MINI_TRANSCRIBE;
74
+ readonly limits: {
75
+ readonly maxInputTokens: 16000;
76
+ readonly maxOutputTokens: 2000;
77
+ };
78
+ readonly config: {
79
+ readonly temperature: 0.2;
80
+ };
81
+ };
82
+ readonly "gpt-4o-mini-tts": {
83
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_OMNI_MINI_TTS;
84
+ readonly limits: {
85
+ readonly maxInputTokens: 2000;
86
+ readonly maxOutputTokens: number;
87
+ };
88
+ readonly config: {
89
+ readonly temperature: 0.2;
90
+ };
91
+ };
92
+ readonly "tts-1": {
93
+ readonly name: import("./providers").OpenAIModelNames.TTS_1;
94
+ readonly limits: {
95
+ readonly maxInputTokens: 2000;
96
+ readonly maxOutputTokens: number;
97
+ };
98
+ readonly config: {
99
+ readonly temperature: 0.2;
100
+ };
101
+ };
102
+ }, import("./providers").OpenAIModelNames.GPT_4_OMNI | import("./providers").OpenAIModelNames.GPT_4_OMNI_MINI | import("./providers").OpenAIModelNames.GPT_4_1 | import("./providers").OpenAIModelNames.GPT_5 | import("./providers").OpenAIModelNames.GPT_5_MINI>;
103
+ readonly assistance: Pick<{
104
+ readonly "gpt-4o": {
105
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_OMNI;
106
+ readonly limits: {
107
+ readonly maxInputTokens: 128000;
108
+ readonly maxOutputTokens: 16384;
109
+ };
110
+ readonly config: {
111
+ readonly temperature: 0.2;
112
+ };
113
+ };
114
+ readonly "gpt-4o-mini": {
115
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_OMNI_MINI;
116
+ readonly limits: {
117
+ readonly maxInputTokens: 128000;
118
+ readonly maxOutputTokens: 16384;
119
+ };
120
+ readonly config: {
121
+ readonly temperature: 0.5;
122
+ };
123
+ };
124
+ readonly "gpt-4.1": {
125
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_1;
126
+ readonly limits: {
127
+ readonly maxInputTokens: 1047576;
128
+ readonly maxOutputTokens: 32768;
129
+ };
130
+ readonly config: {
131
+ readonly temperature: 0.2;
132
+ };
133
+ };
134
+ readonly "gpt-5": {
135
+ readonly name: import("./providers").OpenAIModelNames.GPT_5;
136
+ readonly limits: {
137
+ readonly maxInputTokens: 400000;
138
+ readonly maxOutputTokens: 128000;
139
+ };
140
+ readonly config: {
141
+ readonly temperature: 1;
142
+ readonly reasoning_effort: "minimal";
143
+ readonly verbosity: "medium";
144
+ };
145
+ };
146
+ readonly "gpt-5-mini": {
147
+ readonly name: import("./providers").OpenAIModelNames.GPT_5_MINI;
148
+ readonly limits: {
149
+ readonly maxInputTokens: 400000;
150
+ readonly maxOutputTokens: 128000;
151
+ };
152
+ readonly config: {
153
+ readonly temperature: 1;
154
+ };
155
+ };
156
+ readonly "gpt-4o-transcribe": {
157
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_OMNI_TRANSCRIBE;
158
+ readonly limits: {
159
+ readonly maxInputTokens: 16000;
160
+ readonly maxOutputTokens: 2000;
161
+ };
162
+ readonly config: {
163
+ readonly temperature: 0.2;
164
+ };
165
+ };
166
+ readonly "gpt-4o-mini-transcribe": {
167
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_OMNI_MINI_TRANSCRIBE;
168
+ readonly limits: {
169
+ readonly maxInputTokens: 16000;
170
+ readonly maxOutputTokens: 2000;
171
+ };
172
+ readonly config: {
173
+ readonly temperature: 0.2;
174
+ };
175
+ };
176
+ readonly "gpt-4o-mini-tts": {
177
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_OMNI_MINI_TTS;
178
+ readonly limits: {
179
+ readonly maxInputTokens: 2000;
180
+ readonly maxOutputTokens: number;
181
+ };
182
+ readonly config: {
183
+ readonly temperature: 0.2;
184
+ };
185
+ };
186
+ readonly "tts-1": {
187
+ readonly name: import("./providers").OpenAIModelNames.TTS_1;
188
+ readonly limits: {
189
+ readonly maxInputTokens: 2000;
190
+ readonly maxOutputTokens: number;
191
+ };
192
+ readonly config: {
193
+ readonly temperature: 0.2;
194
+ };
195
+ };
196
+ }, import("./providers").OpenAIModelNames.GPT_4_OMNI | import("./providers").OpenAIModelNames.GPT_4_1>;
197
+ readonly text_to_speech: Pick<{
198
+ readonly "gpt-4o": {
199
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_OMNI;
200
+ readonly limits: {
201
+ readonly maxInputTokens: 128000;
202
+ readonly maxOutputTokens: 16384;
203
+ };
204
+ readonly config: {
205
+ readonly temperature: 0.2;
206
+ };
207
+ };
208
+ readonly "gpt-4o-mini": {
209
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_OMNI_MINI;
210
+ readonly limits: {
211
+ readonly maxInputTokens: 128000;
212
+ readonly maxOutputTokens: 16384;
213
+ };
214
+ readonly config: {
215
+ readonly temperature: 0.5;
216
+ };
217
+ };
218
+ readonly "gpt-4.1": {
219
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_1;
220
+ readonly limits: {
221
+ readonly maxInputTokens: 1047576;
222
+ readonly maxOutputTokens: 32768;
223
+ };
224
+ readonly config: {
225
+ readonly temperature: 0.2;
226
+ };
227
+ };
228
+ readonly "gpt-5": {
229
+ readonly name: import("./providers").OpenAIModelNames.GPT_5;
230
+ readonly limits: {
231
+ readonly maxInputTokens: 400000;
232
+ readonly maxOutputTokens: 128000;
233
+ };
234
+ readonly config: {
235
+ readonly temperature: 1;
236
+ readonly reasoning_effort: "minimal";
237
+ readonly verbosity: "medium";
238
+ };
239
+ };
240
+ readonly "gpt-5-mini": {
241
+ readonly name: import("./providers").OpenAIModelNames.GPT_5_MINI;
242
+ readonly limits: {
243
+ readonly maxInputTokens: 400000;
244
+ readonly maxOutputTokens: 128000;
245
+ };
246
+ readonly config: {
247
+ readonly temperature: 1;
248
+ };
249
+ };
250
+ readonly "gpt-4o-transcribe": {
251
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_OMNI_TRANSCRIBE;
252
+ readonly limits: {
253
+ readonly maxInputTokens: 16000;
254
+ readonly maxOutputTokens: 2000;
255
+ };
256
+ readonly config: {
257
+ readonly temperature: 0.2;
258
+ };
259
+ };
260
+ readonly "gpt-4o-mini-transcribe": {
261
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_OMNI_MINI_TRANSCRIBE;
262
+ readonly limits: {
263
+ readonly maxInputTokens: 16000;
264
+ readonly maxOutputTokens: 2000;
265
+ };
266
+ readonly config: {
267
+ readonly temperature: 0.2;
268
+ };
269
+ };
270
+ readonly "gpt-4o-mini-tts": {
271
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_OMNI_MINI_TTS;
272
+ readonly limits: {
273
+ readonly maxInputTokens: 2000;
274
+ readonly maxOutputTokens: number;
275
+ };
276
+ readonly config: {
277
+ readonly temperature: 0.2;
278
+ };
279
+ };
280
+ readonly "tts-1": {
281
+ readonly name: import("./providers").OpenAIModelNames.TTS_1;
282
+ readonly limits: {
283
+ readonly maxInputTokens: 2000;
284
+ readonly maxOutputTokens: number;
285
+ };
286
+ readonly config: {
287
+ readonly temperature: 0.2;
288
+ };
289
+ };
290
+ }, import("./providers").OpenAIModelNames.TTS_1 | import("./providers").OpenAIModelNames.GPT_4_OMNI_MINI_TTS>;
291
+ readonly speech_to_text: Pick<{
292
+ readonly "gpt-4o": {
293
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_OMNI;
294
+ readonly limits: {
295
+ readonly maxInputTokens: 128000;
296
+ readonly maxOutputTokens: 16384;
297
+ };
298
+ readonly config: {
299
+ readonly temperature: 0.2;
300
+ };
301
+ };
302
+ readonly "gpt-4o-mini": {
303
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_OMNI_MINI;
304
+ readonly limits: {
305
+ readonly maxInputTokens: 128000;
306
+ readonly maxOutputTokens: 16384;
307
+ };
308
+ readonly config: {
309
+ readonly temperature: 0.5;
310
+ };
311
+ };
312
+ readonly "gpt-4.1": {
313
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_1;
314
+ readonly limits: {
315
+ readonly maxInputTokens: 1047576;
316
+ readonly maxOutputTokens: 32768;
317
+ };
318
+ readonly config: {
319
+ readonly temperature: 0.2;
320
+ };
321
+ };
322
+ readonly "gpt-5": {
323
+ readonly name: import("./providers").OpenAIModelNames.GPT_5;
324
+ readonly limits: {
325
+ readonly maxInputTokens: 400000;
326
+ readonly maxOutputTokens: 128000;
327
+ };
328
+ readonly config: {
329
+ readonly temperature: 1;
330
+ readonly reasoning_effort: "minimal";
331
+ readonly verbosity: "medium";
332
+ };
333
+ };
334
+ readonly "gpt-5-mini": {
335
+ readonly name: import("./providers").OpenAIModelNames.GPT_5_MINI;
336
+ readonly limits: {
337
+ readonly maxInputTokens: 400000;
338
+ readonly maxOutputTokens: 128000;
339
+ };
340
+ readonly config: {
341
+ readonly temperature: 1;
342
+ };
343
+ };
344
+ readonly "gpt-4o-transcribe": {
345
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_OMNI_TRANSCRIBE;
346
+ readonly limits: {
347
+ readonly maxInputTokens: 16000;
348
+ readonly maxOutputTokens: 2000;
349
+ };
350
+ readonly config: {
351
+ readonly temperature: 0.2;
352
+ };
353
+ };
354
+ readonly "gpt-4o-mini-transcribe": {
355
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_OMNI_MINI_TRANSCRIBE;
356
+ readonly limits: {
357
+ readonly maxInputTokens: 16000;
358
+ readonly maxOutputTokens: 2000;
359
+ };
360
+ readonly config: {
361
+ readonly temperature: 0.2;
362
+ };
363
+ };
364
+ readonly "gpt-4o-mini-tts": {
365
+ readonly name: import("./providers").OpenAIModelNames.GPT_4_OMNI_MINI_TTS;
366
+ readonly limits: {
367
+ readonly maxInputTokens: 2000;
368
+ readonly maxOutputTokens: number;
369
+ };
370
+ readonly config: {
371
+ readonly temperature: 0.2;
372
+ };
373
+ };
374
+ readonly "tts-1": {
375
+ readonly name: import("./providers").OpenAIModelNames.TTS_1;
376
+ readonly limits: {
377
+ readonly maxInputTokens: 2000;
378
+ readonly maxOutputTokens: number;
379
+ };
380
+ readonly config: {
381
+ readonly temperature: 0.2;
382
+ };
383
+ };
384
+ }, import("./providers").OpenAIModelNames.GPT_4_OMNI_TRANSCRIBE | import("./providers").OpenAIModelNames.GPT_4_OMNI_MINI_TRANSCRIBE>;
385
+ };
386
+ readonly GoogleGenerativeAI: {
387
+ readonly completion: Pick<{
388
+ readonly "gemini-2.5-flash": {
389
+ readonly name: import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH;
390
+ readonly limits: {
391
+ readonly maxInputTokens: 1048576;
392
+ readonly maxOutputTokens: 65536;
393
+ };
394
+ readonly config: {
395
+ readonly temperature: 0.2;
396
+ };
397
+ };
398
+ readonly "gemini-2.5-pro": {
399
+ readonly name: import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_PRO;
400
+ readonly limits: {
401
+ readonly maxInputTokens: 1048576;
402
+ readonly maxOutputTokens: 65536;
403
+ };
404
+ readonly config: {
405
+ readonly temperature: 0.2;
406
+ };
407
+ };
408
+ readonly "gemini-2.5-flash-preview-tts": {
409
+ readonly name: import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH_PREVIEW_TTS;
410
+ readonly limits: {
411
+ readonly maxInputTokens: 8000;
412
+ readonly maxOutputTokens: 16000;
413
+ };
414
+ readonly config: {
415
+ readonly temperature: 0.2;
416
+ };
417
+ };
418
+ readonly "gemini-2.5-pro-preview-tts": {
419
+ readonly name: import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_PRO_PREVIEW_TTS;
420
+ readonly limits: {
421
+ readonly maxInputTokens: 8000;
422
+ readonly maxOutputTokens: 16000;
423
+ };
424
+ readonly config: {
425
+ readonly temperature: 0.2;
426
+ };
427
+ };
428
+ }, import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH | import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_PRO>;
429
+ readonly assistance: Pick<{
430
+ readonly "gemini-2.5-flash": {
431
+ readonly name: import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH;
432
+ readonly limits: {
433
+ readonly maxInputTokens: 1048576;
434
+ readonly maxOutputTokens: 65536;
435
+ };
436
+ readonly config: {
437
+ readonly temperature: 0.2;
438
+ };
439
+ };
440
+ readonly "gemini-2.5-pro": {
441
+ readonly name: import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_PRO;
442
+ readonly limits: {
443
+ readonly maxInputTokens: 1048576;
444
+ readonly maxOutputTokens: 65536;
445
+ };
446
+ readonly config: {
447
+ readonly temperature: 0.2;
448
+ };
449
+ };
450
+ readonly "gemini-2.5-flash-preview-tts": {
451
+ readonly name: import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH_PREVIEW_TTS;
452
+ readonly limits: {
453
+ readonly maxInputTokens: 8000;
454
+ readonly maxOutputTokens: 16000;
455
+ };
456
+ readonly config: {
457
+ readonly temperature: 0.2;
458
+ };
459
+ };
460
+ readonly "gemini-2.5-pro-preview-tts": {
461
+ readonly name: import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_PRO_PREVIEW_TTS;
462
+ readonly limits: {
463
+ readonly maxInputTokens: 8000;
464
+ readonly maxOutputTokens: 16000;
465
+ };
466
+ readonly config: {
467
+ readonly temperature: 0.2;
468
+ };
469
+ };
470
+ }, import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH | import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_PRO>;
471
+ readonly speech_to_text: Pick<{
472
+ readonly "gemini-2.5-flash": {
473
+ readonly name: import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH;
474
+ readonly limits: {
475
+ readonly maxInputTokens: 1048576;
476
+ readonly maxOutputTokens: 65536;
477
+ };
478
+ readonly config: {
479
+ readonly temperature: 0.2;
480
+ };
481
+ };
482
+ readonly "gemini-2.5-pro": {
483
+ readonly name: import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_PRO;
484
+ readonly limits: {
485
+ readonly maxInputTokens: 1048576;
486
+ readonly maxOutputTokens: 65536;
487
+ };
488
+ readonly config: {
489
+ readonly temperature: 0.2;
490
+ };
491
+ };
492
+ readonly "gemini-2.5-flash-preview-tts": {
493
+ readonly name: import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH_PREVIEW_TTS;
494
+ readonly limits: {
495
+ readonly maxInputTokens: 8000;
496
+ readonly maxOutputTokens: 16000;
497
+ };
498
+ readonly config: {
499
+ readonly temperature: 0.2;
500
+ };
501
+ };
502
+ readonly "gemini-2.5-pro-preview-tts": {
503
+ readonly name: import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_PRO_PREVIEW_TTS;
504
+ readonly limits: {
505
+ readonly maxInputTokens: 8000;
506
+ readonly maxOutputTokens: 16000;
507
+ };
508
+ readonly config: {
509
+ readonly temperature: 0.2;
510
+ };
511
+ };
512
+ }, import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH | import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_PRO>;
513
+ readonly text_to_speech: Pick<{
514
+ readonly "gemini-2.5-flash": {
515
+ readonly name: import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH;
516
+ readonly limits: {
517
+ readonly maxInputTokens: 1048576;
518
+ readonly maxOutputTokens: 65536;
519
+ };
520
+ readonly config: {
521
+ readonly temperature: 0.2;
522
+ };
523
+ };
524
+ readonly "gemini-2.5-pro": {
525
+ readonly name: import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_PRO;
526
+ readonly limits: {
527
+ readonly maxInputTokens: 1048576;
528
+ readonly maxOutputTokens: 65536;
529
+ };
530
+ readonly config: {
531
+ readonly temperature: 0.2;
532
+ };
533
+ };
534
+ readonly "gemini-2.5-flash-preview-tts": {
535
+ readonly name: import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH_PREVIEW_TTS;
536
+ readonly limits: {
537
+ readonly maxInputTokens: 8000;
538
+ readonly maxOutputTokens: 16000;
539
+ };
540
+ readonly config: {
541
+ readonly temperature: 0.2;
542
+ };
543
+ };
544
+ readonly "gemini-2.5-pro-preview-tts": {
545
+ readonly name: import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_PRO_PREVIEW_TTS;
546
+ readonly limits: {
547
+ readonly maxInputTokens: 8000;
548
+ readonly maxOutputTokens: 16000;
549
+ };
550
+ readonly config: {
551
+ readonly temperature: 0.2;
552
+ };
553
+ };
554
+ }, import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_FLASH_PREVIEW_TTS | import("./providers").GoogleGenerativeAIModelNames.GEMINI_2_5_PRO_PREVIEW_TTS>;
555
+ };
8
556
  };
9
557
  export declare const APPROXIMATE_TOKENS_COUNT_IN_IMAGE = 1000;
10
- export declare const ALL_IMAGE_MIME_TYPES: LLMUploadFileMimeTypes[];
558
+ export declare const ALL_IMAGE_MIME_TYPES: readonly [LLMUploadFileMimeTypes.IMAGE_PNG, LLMUploadFileMimeTypes.IMAGE_JPEG, LLMUploadFileMimeTypes.IMAGE_JPG, LLMUploadFileMimeTypes.IMAGE_GIF, LLMUploadFileMimeTypes.IMAGE_WEBP, LLMUploadFileMimeTypes.IMAGE_SVG_XML, LLMUploadFileMimeTypes.IMAGE_BMP];
@@ -1 +1 @@
1
- {"version":3,"file":"LLMService.constants.js","sourceRoot":"","sources":["../src/LLMService.constants.ts"],"names":[],"mappings":";;;AAAA,+DAK+B;AAC/B,2CAAqF;AACrF,8GAA+F;AAC/F,0EAAqE;AAGxD,QAAA,qBAAqB,GAE9B;IACF,CAAC,kCAAY,CAAC,MAAM,CAAC,EAAE,IAAI,gCAAoB,EAAE;IACjD,CAAC,kCAAY,CAAC,kBAAkB,CAAC,EAAE,IAAI,4CAAgC,EAAE;CAC1E,CAAC;AAEW,QAAA,kBAAkB,GAE3B;IACF,CAAC,kCAAY,CAAC,MAAM,CAAC,EAAE,iCAAc;IACrC,CAAC,kCAAY,CAAC,kBAAkB,CAAC,EAAE,+CAAgB;CACpD,CAAC;AAEW,QAAA,iCAAiC,GAAG,IAAI,CAAC;AAEzC,QAAA,oBAAoB,GAA6B;IAC5D,4CAAsB,CAAC,SAAS;IAChC,4CAAsB,CAAC,UAAU;IACjC,4CAAsB,CAAC,SAAS;IAChC,4CAAsB,CAAC,SAAS;IAChC,4CAAsB,CAAC,UAAU;IACjC,4CAAsB,CAAC,aAAa;IACpC,4CAAsB,CAAC,SAAS;CACjC,CAAC"}
1
+ {"version":3,"file":"LLMService.constants.js","sourceRoot":"","sources":["../src/LLMService.constants.ts"],"names":[],"mappings":";;;AAAA,+DAK+B;AAC/B,2CAAqF;AACrF,8GAA+F;AAC/F,0EAAqE;AAGxD,QAAA,qBAAqB,GAAG;IACnC,CAAC,kCAAY,CAAC,MAAM,CAAC,EAAE,IAAI,gCAAoB,EAAE;IACjD,CAAC,kCAAY,CAAC,kBAAkB,CAAC,EAAE,IAAI,4CAAgC,EAAE;CAG1E,CAAC;AAEW,QAAA,kBAAkB,GAAG;IAChC,CAAC,kCAAY,CAAC,MAAM,CAAC,EAAE,iCAAc;IACrC,CAAC,kCAAY,CAAC,kBAAkB,CAAC,EAAE,+CAAgB;CAGpD,CAAC;AAEW,QAAA,iCAAiC,GAAG,IAAI,CAAC;AAEzC,QAAA,oBAAoB,GAAG;IAClC,4CAAsB,CAAC,SAAS;IAChC,4CAAsB,CAAC,UAAU;IACjC,4CAAsB,CAAC,SAAS;IAChC,4CAAsB,CAAC,SAAS;IAChC,4CAAsB,CAAC,UAAU;IACjC,4CAAsB,CAAC,aAAa;IACpC,4CAAsB,CAAC,SAAS;CACoB,CAAC"}
@@ -26,7 +26,7 @@ class LLMServiceFactory {
26
26
  .createService({
27
27
  purpose,
28
28
  logger,
29
- options,
29
+ options: options, // Type assertion needed due to const satisfies narrowing
30
30
  });
31
31
  default:
32
32
  throw new Error(`Provider [${provider}] is not supported`);