@mate-academy/llm-gateway 6.1.0 → 6.2.1

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.
Files changed (75) hide show
  1. package/dist/LLMService.constants.d.ts +291 -1
  2. package/dist/LLMService.constants.js +2 -1
  3. package/dist/LLMService.constants.js.map +1 -1
  4. package/dist/LLMService.typedefs.d.ts +9 -0
  5. package/dist/LLMService.typedefs.js.map +1 -1
  6. package/dist/providers/GoogleGenerativeAI/services/GoogleGenerativeAIAssistance.service.d.ts +12 -7
  7. package/dist/providers/GoogleGenerativeAI/services/GoogleGenerativeAIAssistance.service.js +232 -64
  8. package/dist/providers/GoogleGenerativeAI/services/GoogleGenerativeAIAssistance.service.js.map +1 -1
  9. package/dist/providers/LLMAPI/LLMAPI.constants.d.ts +293 -4
  10. package/dist/providers/LLMAPI/LLMAPI.constants.js +3 -3
  11. package/dist/providers/LLMAPI/LLMAPI.constants.js.map +1 -1
  12. package/dist/providers/LLMAPI/LLMAPI.entity.d.ts +6 -0
  13. package/dist/providers/LLMAPI/LLMAPI.entity.js +48 -0
  14. package/dist/providers/LLMAPI/LLMAPI.entity.js.map +1 -0
  15. package/dist/providers/LLMAPI/LLMAPI.typedefs.js.map +1 -1
  16. package/dist/providers/LLMAPI/index.d.ts +1 -0
  17. package/dist/providers/LLMAPI/index.js +1 -0
  18. package/dist/providers/LLMAPI/index.js.map +1 -1
  19. package/dist/providers/LLMAPI/services/LLMAPIAssistance.service.d.ts +37 -0
  20. package/dist/providers/LLMAPI/services/LLMAPIAssistance.service.js +500 -0
  21. package/dist/providers/LLMAPI/services/LLMAPIAssistance.service.js.map +1 -0
  22. package/dist/providers/LLMAPI/services/LLMAPICompletion.service.d.ts +2 -1
  23. package/dist/providers/LLMAPI/services/LLMAPICompletion.service.js +23 -13
  24. package/dist/providers/LLMAPI/services/LLMAPICompletion.service.js.map +1 -1
  25. package/dist/providers/LLMAPI/services/index.d.ts +1 -0
  26. package/dist/providers/LLMAPI/services/index.js +1 -0
  27. package/dist/providers/LLMAPI/services/index.js.map +1 -1
  28. package/dist/providers/LLMAPI/utilities/LLMAPIJsonFixer.js +2 -4
  29. package/dist/providers/LLMAPI/utilities/LLMAPIJsonFixer.js.map +1 -1
  30. package/dist/providers/LLMAPI/utilities/index.d.ts +2 -0
  31. package/dist/providers/LLMAPI/utilities/index.js +5 -1
  32. package/dist/providers/LLMAPI/utilities/index.js.map +1 -1
  33. package/dist/providers/LLMAPI/utilities/parseXmlToolCalls.d.ts +7 -0
  34. package/dist/providers/LLMAPI/utilities/parseXmlToolCalls.js +35 -0
  35. package/dist/providers/LLMAPI/utilities/parseXmlToolCalls.js.map +1 -0
  36. package/dist/providers/LLMAPI/utilities/stripThinkingTags.d.ts +1 -0
  37. package/dist/providers/LLMAPI/utilities/stripThinkingTags.js +7 -0
  38. package/dist/providers/LLMAPI/utilities/stripThinkingTags.js.map +1 -0
  39. package/dist/providers/OpenAI/services/OpenAIAssistance.service.d.ts +12 -7
  40. package/dist/providers/OpenAI/services/OpenAIAssistance.service.js +180 -67
  41. package/dist/providers/OpenAI/services/OpenAIAssistance.service.js.map +1 -1
  42. package/dist/providers/OpenAICompatible/OpenAICompatibleCompletion.service.d.ts +2 -0
  43. package/dist/providers/OpenAICompatible/OpenAICompatibleCompletion.service.js +60 -76
  44. package/dist/providers/OpenAICompatible/OpenAICompatibleCompletion.service.js.map +1 -1
  45. package/dist/services/LLMAssistanceService.abstract.d.ts +8 -6
  46. package/dist/services/LLMAssistanceService.abstract.js +20 -0
  47. package/dist/services/LLMAssistanceService.abstract.js.map +1 -1
  48. package/dist/services/chatState/CompletionsChatState.d.ts +19 -0
  49. package/dist/services/chatState/CompletionsChatState.js +80 -0
  50. package/dist/services/chatState/CompletionsChatState.js.map +1 -0
  51. package/dist/services/chatState/index.d.ts +1 -0
  52. package/dist/services/chatState/index.js +6 -0
  53. package/dist/services/chatState/index.js.map +1 -0
  54. package/dist/services/fileStorage/FileStorageToolExecutor.d.ts +15 -0
  55. package/dist/services/fileStorage/FileStorageToolExecutor.js +172 -0
  56. package/dist/services/fileStorage/FileStorageToolExecutor.js.map +1 -0
  57. package/dist/services/fileStorage/InMemoryFileStorage.d.ts +20 -0
  58. package/dist/services/fileStorage/InMemoryFileStorage.js +67 -0
  59. package/dist/services/fileStorage/InMemoryFileStorage.js.map +1 -0
  60. package/dist/services/fileStorage/fileStorageTools.d.ts +26 -0
  61. package/dist/services/fileStorage/fileStorageTools.js +68 -0
  62. package/dist/services/fileStorage/fileStorageTools.js.map +1 -0
  63. package/dist/services/fileStorage/index.d.ts +4 -0
  64. package/dist/services/fileStorage/index.js +11 -0
  65. package/dist/services/fileStorage/index.js.map +1 -0
  66. package/dist/utilities/index.d.ts +1 -0
  67. package/dist/utilities/index.js +1 -0
  68. package/dist/utilities/index.js.map +1 -1
  69. package/dist/utilities/tools/LLMTool.d.ts +10 -0
  70. package/dist/utilities/tools/LLMTool.js +10 -0
  71. package/dist/utilities/tools/LLMTool.js.map +1 -0
  72. package/dist/utilities/tools/index.d.ts +1 -0
  73. package/dist/utilities/tools/index.js +6 -0
  74. package/dist/utilities/tools/index.js.map +1 -0
  75. package/package.json +1 -1
@@ -0,0 +1,20 @@
1
+ import { type LLMUploadFileMimeTypes } from '../../LLMService.typedefs';
2
+ interface StoredFile {
3
+ fileId: string;
4
+ name: string;
5
+ path: string;
6
+ mimeType: LLMUploadFileMimeTypes;
7
+ content: string;
8
+ }
9
+ export declare class InMemoryFileStorage {
10
+ private files;
11
+ private filesByPath;
12
+ private storages;
13
+ addFile(path: string, name: string, mimeType: LLMUploadFileMimeTypes): StoredFile;
14
+ getFileByPath(path: string): StoredFile | null;
15
+ removeFile(fileId: string): void;
16
+ createStorage(fileIds: string[]): string;
17
+ removeStorage(storageId: string): void;
18
+ getStorageFiles(storageId: string): StoredFile[];
19
+ }
20
+ export {};
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InMemoryFileStorage = void 0;
4
+ const fs_1 = require("fs");
5
+ const uuid_1 = require("uuid");
6
+ class InMemoryFileStorage {
7
+ files = new Map();
8
+ filesByPath = new Map();
9
+ storages = new Map();
10
+ addFile(path, name, mimeType) {
11
+ const existing = this.filesByPath.get(path);
12
+ if (existing) {
13
+ return existing;
14
+ }
15
+ const content = (0, fs_1.readFileSync)(path, 'utf-8');
16
+ const fileId = (0, uuid_1.v4)();
17
+ const storedFile = {
18
+ fileId,
19
+ name,
20
+ path,
21
+ mimeType,
22
+ content,
23
+ };
24
+ this.files.set(fileId, storedFile);
25
+ this.filesByPath.set(path, storedFile);
26
+ return storedFile;
27
+ }
28
+ getFileByPath(path) {
29
+ return this.filesByPath.get(path) ?? null;
30
+ }
31
+ removeFile(fileId) {
32
+ const file = this.files.get(fileId);
33
+ if (!file) {
34
+ return;
35
+ }
36
+ this.filesByPath.delete(file.path);
37
+ this.files.delete(fileId);
38
+ }
39
+ createStorage(fileIds) {
40
+ const storageId = (0, uuid_1.v4)();
41
+ this.storages.set(storageId, {
42
+ storageId,
43
+ fileIds,
44
+ });
45
+ return storageId;
46
+ }
47
+ removeStorage(storageId) {
48
+ const group = this.storages.get(storageId);
49
+ if (group) {
50
+ for (const fileId of group.fileIds) {
51
+ this.removeFile(fileId);
52
+ }
53
+ }
54
+ this.storages.delete(storageId);
55
+ }
56
+ getStorageFiles(storageId) {
57
+ const group = this.storages.get(storageId);
58
+ if (!group) {
59
+ return [];
60
+ }
61
+ return group.fileIds
62
+ .map((fileId) => this.files.get(fileId))
63
+ .filter((file) => file !== undefined);
64
+ }
65
+ }
66
+ exports.InMemoryFileStorage = InMemoryFileStorage;
67
+ //# sourceMappingURL=InMemoryFileStorage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InMemoryFileStorage.js","sourceRoot":"","sources":["../../../src/services/fileStorage/InMemoryFileStorage.ts"],"names":[],"mappings":";;;AAAA,2BAAkC;AAClC,+BAAoC;AAgBpC,MAAa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AE3B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,EAAE;YAC3B,SAAS;YACT,OAAO;SACR,CAAC,CAAC;QAEH,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,aAAa,CAAC,SAAiB;QAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAE3C,IAAI,KAAK,EAAE,CAAC;YACV,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;gBACnC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YAC1B,CAAC;QACH,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAClC,CAAC;IAED,eAAe,CAAC,SAAiB;QAC/B,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAE3C,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,OAAO,KAAK,CAAC,OAAO;aACjB,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;aACvC,MAAM,CAAC,CAAC,IAAI,EAAsB,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;IAC9D,CAAC;CACF;AAlFD,kDAkFC"}
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod';
2
+ import type { ChatCompletionTool } from 'openai/resources/chat';
3
+ export declare enum FileStorageToolName {
4
+ ListFiles = "list_files",
5
+ SearchFiles = "search_files",
6
+ ReadFile = "read_file",
7
+ ReadFileLines = "read_file_lines"
8
+ }
9
+ declare const searchFilesParameters: z.ZodObject<{
10
+ query: z.ZodString;
11
+ path: z.ZodOptional<z.ZodString>;
12
+ context_lines: z.ZodOptional<z.ZodNumber>;
13
+ }, z.core.$strip>;
14
+ declare const readFileParameters: z.ZodObject<{
15
+ path: z.ZodString;
16
+ }, z.core.$strip>;
17
+ declare const readFileLinesParameters: z.ZodObject<{
18
+ path: z.ZodString;
19
+ start_line: z.ZodOptional<z.ZodNumber>;
20
+ end_line: z.ZodOptional<z.ZodNumber>;
21
+ }, z.core.$strip>;
22
+ export type SearchFilesArgs = z.infer<typeof searchFilesParameters>;
23
+ export type ReadFileArgs = z.infer<typeof readFileParameters>;
24
+ export type ReadFileLinesArgs = z.infer<typeof readFileLinesParameters>;
25
+ export declare function getFileStorageToolsForChatCompletions(): ChatCompletionTool[];
26
+ export {};
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FileStorageToolName = void 0;
4
+ exports.getFileStorageToolsForChatCompletions = getFileStorageToolsForChatCompletions;
5
+ const zod_1 = require("zod");
6
+ var FileStorageToolName;
7
+ (function (FileStorageToolName) {
8
+ FileStorageToolName["ListFiles"] = "list_files";
9
+ FileStorageToolName["SearchFiles"] = "search_files";
10
+ FileStorageToolName["ReadFile"] = "read_file";
11
+ FileStorageToolName["ReadFileLines"] = "read_file_lines";
12
+ })(FileStorageToolName || (exports.FileStorageToolName = FileStorageToolName = {}));
13
+ const listFilesParameters = zod_1.z.object({});
14
+ const searchFilesParameters = zod_1.z.object({
15
+ query: zod_1.z.string().describe('The search query string to find in file contents'),
16
+ path: zod_1.z.string().optional().describe('Optional file path filter to narrow the search scope'),
17
+ context_lines: zod_1.z.number().optional().describe('Number of context lines to show around each match (default: 3)'),
18
+ });
19
+ const readFileParameters = zod_1.z.object({
20
+ path: zod_1.z.string().describe('The path of the file to read'),
21
+ });
22
+ const readFileLinesParameters = zod_1.z.object({
23
+ path: zod_1.z.string().describe('The path of the file to read'),
24
+ start_line: zod_1.z.number().optional().describe('The 1-based starting line number to read from'),
25
+ end_line: zod_1.z.number().optional().describe('The 1-based ending line number to read to (inclusive). '
26
+ + 'Negative values read from end of file.'),
27
+ });
28
+ const FILE_STORAGE_TOOLS = [
29
+ {
30
+ name: FileStorageToolName.ListFiles,
31
+ description: 'List all files available in the file storage with their '
32
+ + 'names, paths, and line counts.',
33
+ parametersSchema: listFilesParameters,
34
+ },
35
+ {
36
+ name: FileStorageToolName.SearchFiles,
37
+ description: 'Search for a query string across all files in the storage. '
38
+ + 'Returns matching lines with surrounding context.',
39
+ parametersSchema: searchFilesParameters,
40
+ },
41
+ {
42
+ name: FileStorageToolName.ReadFile,
43
+ description: 'Read the entire contents of a file from the storage.',
44
+ parametersSchema: readFileParameters,
45
+ },
46
+ {
47
+ name: FileStorageToolName.ReadFileLines,
48
+ description: 'Read specific lines from a file in the storage. '
49
+ + 'Supports line ranges and reading from end of file.',
50
+ parametersSchema: readFileLinesParameters,
51
+ },
52
+ ];
53
+ const FILE_STORAGE_CHAT_COMPLETION_TOOLS = FILE_STORAGE_TOOLS
54
+ .map((tool) => ({
55
+ type: 'function',
56
+ function: {
57
+ name: tool.name,
58
+ description: tool.description,
59
+ parameters: zod_1.z.toJSONSchema(tool.parametersSchema, {
60
+ target: 'draft-7',
61
+ reused: 'inline',
62
+ }),
63
+ },
64
+ }));
65
+ function getFileStorageToolsForChatCompletions() {
66
+ return FILE_STORAGE_CHAT_COMPLETION_TOOLS;
67
+ }
68
+ //# sourceMappingURL=fileStorageTools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fileStorageTools.js","sourceRoot":"","sources":["../../../src/services/fileStorage/fileStorageTools.ts"],"names":[],"mappings":";;;AA0FA,sFAGC;AA7FD,6BAAwB;AAGxB,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,+CAAwB,CAAA;IACxB,mDAA4B,CAAA;IAC5B,6CAAsB,CAAA;IACtB,wDAAiC,CAAA;AACnC,CAAC,EALW,mBAAmB,mCAAnB,mBAAmB,QAK9B;AAED,MAAM,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEzC,MAAM,qBAAqB,GAAG,OAAC,CAAC,M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AAoD;QACxD,gBAAgB,EAAE,uBAAuB;KAC1C;CAKA,CAAC;AAEJ,MAAM,kCAAkC,GAAyB,kBAAkB;KAChF,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACd,IAAI,EAAE,UAAmB;IACzB,QAAQ,EAAE;QACR,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,UAAU,EAAE,OAAC,CAAC,YAAY,CAAC,IAAI,CAAC,gBAAgB,EAAE;YAChD,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,QAAQ;SACjB,CAAC;KACH;CACF,CAAC,CAAC,CAAC;AAEN,SAAgB,qCAAqC;IAEnD,OAAO,kCAAkC,CAAC;AAC5C,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { InMemoryFileStorage } from './InMemoryFileStorage';
2
+ export { FileStorageToolExecutor } from './FileStorageToolExecutor';
3
+ export { getFileStorageToolsForChatCompletions, FileStorageToolName, } from './fileStorageTools';
4
+ export type { SearchFilesArgs, ReadFileArgs, ReadFileLinesArgs, } from './fileStorageTools';
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FileStorageToolName = exports.getFileStorageToolsForChatCompletions = exports.FileStorageToolExecutor = exports.InMemoryFileStorage = void 0;
4
+ var InMemoryFileStorage_1 = require("./InMemoryFileStorage");
5
+ Object.defineProperty(exports, "InMemoryFileStorage", { enumerable: true, get: function () { return InMemoryFileStorage_1.InMemoryFileStorage; } });
6
+ var FileStorageToolExecutor_1 = require("./FileStorageToolExecutor");
7
+ Object.defineProperty(exports, "FileStorageToolExecutor", { enumerable: true, get: function () { return FileStorageToolExecutor_1.FileStorageToolExecutor; } });
8
+ var fileStorageTools_1 = require("./fileStorageTools");
9
+ Object.defineProperty(exports, "getFileStorageToolsForChatCompletions", { enumerable: true, get: function () { return fileStorageTools_1.getFileStorageToolsForChatCompletions; } });
10
+ Object.defineProperty(exports, "FileStorageToolName", { enumerable: true, get: function () { return fileStorageTools_1.FileStorageToolName; } });
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/fileStorage/index.ts"],"names":[],"mappings":";;;AAAA,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,uDAG4B;AAF1B,yIAAA,qCAAqC,OAAA;AACrC,uHAAA,mBAAmB,OAAA"}
@@ -5,3 +5,4 @@ export * from './logger';
5
5
  export * from './reporter';
6
6
  export * from './schema';
7
7
  export * from './serializeError';
8
+ export * from './tools';
@@ -21,4 +21,5 @@ __exportStar(require("./logger"), exports);
21
21
  __exportStar(require("./reporter"), exports);
22
22
  __exportStar(require("./schema"), exports);
23
23
  __exportStar(require("./serializeError"), exports);
24
+ __exportStar(require("./tools"), exports);
24
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utilities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,kDAAgC;AAChC,mDAAiC;AACjC,2CAAyB;AACzB,6CAA2B;AAC3B,2CAAyB;AACzB,mDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utilities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,kDAAgC;AAChC,mDAAiC;AACjC,2CAAyB;AACzB,6CAA2B;AAC3B,2CAAyB;AACzB,mDAAiC;AACjC,0CAAwB"}
@@ -0,0 +1,10 @@
1
+ import { type LLMToolDefinition } from '../../LLMService.typedefs';
2
+ import { type LLMSchemaInterface, type InferSchema } from '../../utilities/schema';
3
+ export declare class LLMTool {
4
+ static create<Schema extends LLMSchemaInterface>(config: {
5
+ name: string;
6
+ description: string;
7
+ parameters: Schema;
8
+ execute: (args: InferSchema<Schema>) => Promise<string> | string;
9
+ }): LLMToolDefinition<Schema>;
10
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LLMTool = void 0;
4
+ class LLMTool {
5
+ static create(config) {
6
+ return config;
7
+ }
8
+ }
9
+ exports.LLMTool = LLMTool;
10
+ //# sourceMappingURL=LLMTool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LLMTool.js","sourceRoot":"","sources":["../../../src/utilities/tools/LLMTool.ts"],"names":[],"mappings":";;;AAQA,MAAa,OAAO;IAClB,MAAM,CAAC,MAAM,CAAoC,MAKhD;QACC,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AATD,0BASC"}
@@ -0,0 +1 @@
1
+ export { LLMTool } from './LLMTool';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LLMTool = void 0;
4
+ var LLMTool_1 = require("./LLMTool");
5
+ Object.defineProperty(exports, "LLMTool", { enumerable: true, get: function () { return LLMTool_1.LLMTool; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utilities/tools/index.ts"],"names":[],"mappings":";;;AAAA,qCAAoC;AAA3B,kGAAA,OAAO,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mate-academy/llm-gateway",
3
- "version": "6.1.0",
3
+ "version": "6.2.1",
4
4
  "description": "A gateway package for LLM services.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",