@smythos/sre 1.5.7 → 1.5.9
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.js +116 -116
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/subsystems/LLMManager/ModelsProvider.service/connectors/JSONModelsProvider.class.d.ts +39 -0
- package/package.json +1 -1
- package/src/Core/SmythRuntime.class.ts +1 -1
- package/src/index.ts +1 -1
- package/src/index.ts.bak +178 -178
- package/src/subsystems/LLMManager/ModelsProvider.service/connectors/{SmythModelsProvider.class.ts → JSONModelsProvider.class.ts} +31 -8
- package/src/subsystems/LLMManager/ModelsProvider.service/index.ts +2 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -159,7 +159,7 @@ export * from './subsystems/LLMManager/LLM.service/connectors/Groq.class';
|
|
|
159
159
|
export * from './subsystems/LLMManager/LLM.service/connectors/OpenAI.class';
|
|
160
160
|
export * from './subsystems/LLMManager/LLM.service/connectors/Perplexity.class';
|
|
161
161
|
export * from './subsystems/LLMManager/LLM.service/connectors/VertexAI.class';
|
|
162
|
-
export * from './subsystems/LLMManager/ModelsProvider.service/connectors/
|
|
162
|
+
export * from './subsystems/LLMManager/ModelsProvider.service/connectors/JSONModelsProvider.class';
|
|
163
163
|
export * from './subsystems/MemoryManager/Cache.service/connectors/LocalStorageCache.class';
|
|
164
164
|
export * from './subsystems/MemoryManager/Cache.service/connectors/RAMCache.class';
|
|
165
165
|
export * from './subsystems/MemoryManager/Cache.service/connectors/RedisCache.class';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AccessRequest } from '@sre/Security/AccessControl/AccessRequest.class';
|
|
2
|
+
import { ModelsProviderConnector } from '../ModelsProviderConnector';
|
|
3
|
+
import { IAccessCandidate } from '@sre/types/ACL.types';
|
|
4
|
+
import { ACL } from '@sre/Security/AccessControl/ACL.class';
|
|
5
|
+
import { TLLMModelsList } from '@sre/types/LLM.types';
|
|
6
|
+
type SmythModelsProviderConfig = {
|
|
7
|
+
/**
|
|
8
|
+
* The models to be used.
|
|
9
|
+
*
|
|
10
|
+
* If a string is provided, it will be used as the directory name to load the models from.
|
|
11
|
+
* If a TLLMModelsList is provided, it will be used as the models to be used.
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
models?: string | TLLMModelsList;
|
|
15
|
+
/**
|
|
16
|
+
* The mode to be used.
|
|
17
|
+
*
|
|
18
|
+
* If 'append' is used, the models will be appended to the existing models.
|
|
19
|
+
* If 'replace' is used, the existing models will be replaced with the new models.
|
|
20
|
+
*/
|
|
21
|
+
mode?: 'merge' | 'replace';
|
|
22
|
+
};
|
|
23
|
+
export declare class JSONModelsProvider extends ModelsProviderConnector {
|
|
24
|
+
protected _settings?: SmythModelsProviderConfig;
|
|
25
|
+
name: string;
|
|
26
|
+
private models;
|
|
27
|
+
constructor(_settings?: SmythModelsProviderConfig);
|
|
28
|
+
start(): Promise<void>;
|
|
29
|
+
addModels(acRequest: AccessRequest, models: TLLMModelsList): Promise<void>;
|
|
30
|
+
getModels(acRequest: AccessRequest): Promise<any>;
|
|
31
|
+
getResourceACL(resourceId: string, candidate: IAccessCandidate): Promise<ACL>;
|
|
32
|
+
private reindexModels;
|
|
33
|
+
private scanDirectoryForModels;
|
|
34
|
+
private getValidModels;
|
|
35
|
+
private isValidSingleModel;
|
|
36
|
+
private isValidModel;
|
|
37
|
+
private initDirWatcher;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -165,7 +165,7 @@ export * from './subsystems/LLMManager/LLM.service/connectors/Groq.class';
|
|
|
165
165
|
export * from './subsystems/LLMManager/LLM.service/connectors/OpenAI.class';
|
|
166
166
|
export * from './subsystems/LLMManager/LLM.service/connectors/Perplexity.class';
|
|
167
167
|
export * from './subsystems/LLMManager/LLM.service/connectors/VertexAI.class';
|
|
168
|
-
export * from './subsystems/LLMManager/ModelsProvider.service/connectors/
|
|
168
|
+
export * from './subsystems/LLMManager/ModelsProvider.service/connectors/JSONModelsProvider.class';
|
|
169
169
|
export * from './subsystems/MemoryManager/Cache.service/connectors/LocalStorageCache.class';
|
|
170
170
|
export * from './subsystems/MemoryManager/Cache.service/connectors/RAMCache.class';
|
|
171
171
|
export * from './subsystems/MemoryManager/Cache.service/connectors/RedisCache.class';
|
package/src/index.ts.bak
CHANGED
|
@@ -1,181 +1,181 @@
|
|
|
1
|
-
//!!! This is a generated file, do not edit it directly !!!//
|
|
1
|
+
//!!! This is a generated file, do not edit it directly !!!//
|
|
2
|
+
|
|
3
|
+
export { version } from '../package.json';
|
|
4
|
+
|
|
2
5
|
|
|
3
|
-
export { version } from '../package.json';
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './Components/
|
|
11
|
-
export * from './Components/
|
|
12
|
-
export * from './Components/
|
|
13
|
-
export * from './Components/
|
|
14
|
-
export * from './Components/
|
|
15
|
-
export * from './Components/
|
|
16
|
-
export * from './Components/
|
|
17
|
-
export * from './Components/
|
|
18
|
-
export * from './Components/
|
|
19
|
-
export * from './Components/
|
|
20
|
-
export * from './Components/
|
|
21
|
-
export * from './Components/
|
|
22
|
-
export * from './Components/
|
|
23
|
-
export * from './Components/
|
|
24
|
-
export * from './Components/
|
|
25
|
-
export * from './Components/
|
|
26
|
-
export * from './Components/
|
|
27
|
-
export * from './Components/
|
|
28
|
-
export * from './Components/
|
|
29
|
-
export * from './Components/
|
|
30
|
-
export * from './Components/
|
|
31
|
-
export * from './Components/
|
|
32
|
-
export * from './Components/
|
|
33
|
-
export * from './Components/
|
|
34
|
-
export * from './Components/
|
|
35
|
-
export * from './Components/
|
|
36
|
-
export * from './Components/
|
|
37
|
-
export * from './Components/
|
|
38
|
-
export * from './Components/
|
|
39
|
-
export * from './Components/
|
|
40
|
-
export * from './Components/
|
|
41
|
-
export * from './Components/
|
|
42
|
-
export * from './
|
|
43
|
-
export * from './
|
|
44
|
-
export * from './Core/
|
|
45
|
-
export * from './Core/
|
|
46
|
-
export * from './Core/
|
|
47
|
-
export * from './Core/
|
|
48
|
-
export * from './Core/
|
|
49
|
-
export * from './Core/
|
|
50
|
-
export * from './
|
|
51
|
-
export * from './
|
|
52
|
-
export * from './helpers/
|
|
53
|
-
export * from './helpers/
|
|
54
|
-
export * from './helpers/
|
|
55
|
-
export * from './helpers/
|
|
56
|
-
export * from './helpers/
|
|
57
|
-
export * from './helpers/
|
|
58
|
-
export * from './helpers/
|
|
59
|
-
export * from './helpers/
|
|
60
|
-
export * from './helpers/
|
|
61
|
-
export * from './
|
|
62
|
-
export * from './
|
|
63
|
-
export * from './types/
|
|
64
|
-
export * from './types/
|
|
65
|
-
export * from './types/
|
|
66
|
-
export * from './types/
|
|
67
|
-
export * from './types/
|
|
68
|
-
export * from './types/
|
|
69
|
-
export * from './types/
|
|
70
|
-
export * from './types/
|
|
71
|
-
export * from './types/
|
|
72
|
-
export * from './types/
|
|
73
|
-
export * from './
|
|
74
|
-
export * from './
|
|
75
|
-
export * from './Components/APICall/
|
|
76
|
-
export * from './Components/APICall/
|
|
77
|
-
export * from './Components/APICall/
|
|
78
|
-
export * from './Components/APICall/
|
|
79
|
-
export * from './Components/APICall/
|
|
80
|
-
export * from './Components/APICall/
|
|
81
|
-
export * from './Components/APICall/
|
|
82
|
-
export * from './Components/
|
|
83
|
-
export * from './
|
|
84
|
-
export * from './
|
|
85
|
-
export * from './subsystems/AgentManager/
|
|
86
|
-
export * from './subsystems/AgentManager/
|
|
87
|
-
export * from './subsystems/AgentManager/
|
|
88
|
-
export * from './subsystems/AgentManager/
|
|
89
|
-
export * from './subsystems/AgentManager/
|
|
90
|
-
export * from './subsystems/AgentManager/
|
|
91
|
-
export * from './subsystems/AgentManager/
|
|
92
|
-
export * from './subsystems/AgentManager/
|
|
93
|
-
export * from './subsystems/
|
|
94
|
-
export * from './subsystems/
|
|
95
|
-
export * from './subsystems/LLMManager/
|
|
96
|
-
export * from './subsystems/LLMManager/
|
|
97
|
-
export * from './subsystems/LLMManager/
|
|
98
|
-
export * from './subsystems/
|
|
99
|
-
export * from './subsystems/
|
|
100
|
-
export * from './subsystems/MemoryManager/
|
|
101
|
-
export * from './subsystems/
|
|
102
|
-
export * from './subsystems/
|
|
103
|
-
export * from './subsystems/
|
|
104
|
-
export * from './subsystems/
|
|
105
|
-
export * from './subsystems/AgentManager/
|
|
106
|
-
export * from './subsystems/AgentManager/
|
|
107
|
-
export * from './subsystems/
|
|
108
|
-
export * from './subsystems/
|
|
109
|
-
export * from './subsystems/
|
|
110
|
-
export * from './subsystems/
|
|
111
|
-
export * from './subsystems/IO/
|
|
112
|
-
export * from './subsystems/IO/
|
|
113
|
-
export * from './subsystems/IO/
|
|
114
|
-
export * from './subsystems/IO/
|
|
115
|
-
export * from './subsystems/IO/
|
|
116
|
-
export * from './subsystems/IO/
|
|
117
|
-
export * from './subsystems/IO/
|
|
118
|
-
export * from './subsystems/IO/
|
|
119
|
-
export * from './subsystems/IO/Storage.service/
|
|
120
|
-
export * from './subsystems/IO/
|
|
121
|
-
export * from './subsystems/IO/
|
|
122
|
-
export * from './subsystems/
|
|
123
|
-
export * from './subsystems/
|
|
124
|
-
export * from './subsystems/LLMManager/LLM.service/
|
|
125
|
-
export * from './subsystems/LLMManager/
|
|
126
|
-
export * from './subsystems/LLMManager/
|
|
127
|
-
export * from './subsystems/
|
|
128
|
-
export * from './subsystems/
|
|
129
|
-
export * from './subsystems/
|
|
130
|
-
export * from './subsystems/
|
|
131
|
-
export * from './subsystems/Security/AccessControl/
|
|
132
|
-
export * from './subsystems/Security/
|
|
133
|
-
export * from './subsystems/Security/
|
|
134
|
-
export * from './subsystems/Security/
|
|
135
|
-
export * from './subsystems/Security/
|
|
136
|
-
export * from './subsystems/Security/
|
|
137
|
-
export * from './subsystems/Security/
|
|
138
|
-
export * from './subsystems/Security/Vault.service/
|
|
139
|
-
export * from './subsystems/
|
|
140
|
-
export * from './subsystems/
|
|
141
|
-
export * from './subsystems/AgentManager/AgentData.service/connectors/
|
|
142
|
-
export * from './subsystems/AgentManager/
|
|
143
|
-
export * from './subsystems/
|
|
144
|
-
export * from './subsystems/
|
|
145
|
-
export * from './subsystems/
|
|
146
|
-
export * from './subsystems/IO/
|
|
147
|
-
export * from './subsystems/IO/NKV.service/connectors/
|
|
148
|
-
export * from './subsystems/IO/
|
|
149
|
-
export * from './subsystems/IO/
|
|
150
|
-
export * from './subsystems/IO/
|
|
151
|
-
export * from './subsystems/IO/
|
|
152
|
-
export * from './subsystems/IO/
|
|
153
|
-
export * from './subsystems/IO/
|
|
154
|
-
export * from './subsystems/IO/VectorDB.service/connectors/
|
|
155
|
-
export * from './subsystems/IO/VectorDB.service/
|
|
156
|
-
export * from './subsystems/IO/VectorDB.service/
|
|
157
|
-
export * from './subsystems/IO/VectorDB.service/embed/
|
|
158
|
-
export * from './subsystems/
|
|
159
|
-
export * from './subsystems/
|
|
160
|
-
export * from './subsystems/LLMManager/LLM.service/connectors/
|
|
161
|
-
export * from './subsystems/LLMManager/LLM.service/connectors/
|
|
162
|
-
export * from './subsystems/LLMManager/LLM.service/connectors/
|
|
163
|
-
export * from './subsystems/LLMManager/LLM.service/connectors/
|
|
164
|
-
export * from './subsystems/LLMManager/LLM.service/connectors/
|
|
165
|
-
export * from './subsystems/LLMManager/LLM.service/connectors/
|
|
166
|
-
export * from './subsystems/LLMManager/
|
|
167
|
-
export * from './subsystems/
|
|
168
|
-
export * from './subsystems/
|
|
169
|
-
export * from './subsystems/MemoryManager/Cache.service/connectors/
|
|
170
|
-
export * from './subsystems/MemoryManager/Cache.service/connectors/
|
|
171
|
-
export * from './subsystems/
|
|
172
|
-
export * from './subsystems/
|
|
173
|
-
export * from './subsystems/Security/Account.service/connectors/
|
|
174
|
-
export * from './subsystems/Security/
|
|
175
|
-
export * from './subsystems/Security/
|
|
176
|
-
export * from './subsystems/Security/
|
|
177
|
-
export * from './subsystems/Security/
|
|
178
|
-
export * from './subsystems/Security/Vault.service/connectors/
|
|
179
|
-
export * from './subsystems/Security/Vault.service/connectors/JSONFileVault.class';
|
|
180
|
-
export * from './subsystems/Security/Vault.service/connectors/NullVault.class';
|
|
7
|
+
|
|
8
|
+
export * from './config';
|
|
9
|
+
export * from './constants';
|
|
10
|
+
export * from './Components/AgentPlugin.class';
|
|
11
|
+
export * from './Components/APIEndpoint.class';
|
|
12
|
+
export * from './Components/APIOutput.class';
|
|
13
|
+
export * from './Components/Async.class';
|
|
14
|
+
export * from './Components/Await.class';
|
|
15
|
+
export * from './Components/Classifier.class';
|
|
16
|
+
export * from './Components/Component.class';
|
|
17
|
+
export * from './Components/ComponentHost.class';
|
|
18
|
+
export * from './Components/DataSourceCleaner.class';
|
|
19
|
+
export * from './Components/DataSourceIndexer.class';
|
|
20
|
+
export * from './Components/DataSourceLookup.class';
|
|
21
|
+
export * from './Components/FEncDec.class';
|
|
22
|
+
export * from './Components/FHash.class';
|
|
23
|
+
export * from './Components/FileStore.class';
|
|
24
|
+
export * from './Components/ForEach.class';
|
|
25
|
+
export * from './Components/FSign.class';
|
|
26
|
+
export * from './Components/FSleep.class';
|
|
27
|
+
export * from './Components/FTimestamp.class';
|
|
28
|
+
export * from './Components/GenAILLM.class';
|
|
29
|
+
export * from './Components/GPTPlugin.class';
|
|
30
|
+
export * from './Components/HuggingFace.class';
|
|
31
|
+
export * from './Components/ImageGenerator.class';
|
|
32
|
+
export * from './Components/index';
|
|
33
|
+
export * from './Components/JSONFilter.class';
|
|
34
|
+
export * from './Components/LLMAssistant.class';
|
|
35
|
+
export * from './Components/LogicAND.class';
|
|
36
|
+
export * from './Components/LogicAtLeast.class';
|
|
37
|
+
export * from './Components/LogicAtMost.class';
|
|
38
|
+
export * from './Components/LogicOR.class';
|
|
39
|
+
export * from './Components/LogicXOR.class';
|
|
40
|
+
export * from './Components/MCPClient.class';
|
|
41
|
+
export * from './Components/PromptGenerator.class';
|
|
42
|
+
export * from './Components/ScrapflyWebScrape.class';
|
|
43
|
+
export * from './Components/TavilyWebSearch.class';
|
|
44
|
+
export * from './Core/AgentProcess.helper';
|
|
45
|
+
export * from './Core/boot';
|
|
46
|
+
export * from './Core/Connector.class';
|
|
47
|
+
export * from './Core/ConnectorsService';
|
|
48
|
+
export * from './Core/DummyConnector';
|
|
49
|
+
export * from './Core/HookService';
|
|
50
|
+
export * from './Core/SmythRuntime.class';
|
|
51
|
+
export * from './Core/SystemEvents';
|
|
52
|
+
export * from './helpers/BinaryInput.helper';
|
|
53
|
+
export * from './helpers/Conversation.helper';
|
|
54
|
+
export * from './helpers/JsonContent.helper';
|
|
55
|
+
export * from './helpers/LocalCache.helper';
|
|
56
|
+
export * from './helpers/Log.helper';
|
|
57
|
+
export * from './helpers/OpenApiParser.helper';
|
|
58
|
+
export * from './helpers/S3Cache.helper';
|
|
59
|
+
export * from './helpers/SmythURI.helper';
|
|
60
|
+
export * from './helpers/Sysconfig.helper';
|
|
61
|
+
export * from './helpers/TemplateString.helper';
|
|
62
|
+
export * from './helpers/TypeChecker.helper';
|
|
63
|
+
export * from './types/ACL.types';
|
|
64
|
+
export * from './types/Agent.types';
|
|
65
|
+
export * from './types/AgentLogger.types';
|
|
66
|
+
export * from './types/AWS.types';
|
|
67
|
+
export * from './types/Cache.types';
|
|
68
|
+
export * from './types/Common.types';
|
|
69
|
+
export * from './types/LLM.types';
|
|
70
|
+
export * from './types/Redis.types';
|
|
71
|
+
export * from './types/Security.types';
|
|
72
|
+
export * from './types/SRE.types';
|
|
73
|
+
export * from './types/Storage.types';
|
|
74
|
+
export * from './types/VectorDB.types';
|
|
75
|
+
export * from './Components/APICall/AccessTokenManager';
|
|
76
|
+
export * from './Components/APICall/APICall.class';
|
|
77
|
+
export * from './Components/APICall/ArrayBufferResponse.helper';
|
|
78
|
+
export * from './Components/APICall/mimeTypeCategories';
|
|
79
|
+
export * from './Components/APICall/OAuth.helper';
|
|
80
|
+
export * from './Components/APICall/parseData';
|
|
81
|
+
export * from './Components/APICall/parseHeaders';
|
|
82
|
+
export * from './Components/APICall/parseProxy';
|
|
83
|
+
export * from './Components/APICall/parseUrl';
|
|
84
|
+
export * from './Components/Image/imageSettings.config';
|
|
85
|
+
export * from './subsystems/AgentManager/Agent.class';
|
|
86
|
+
export * from './subsystems/AgentManager/Agent.helper';
|
|
87
|
+
export * from './subsystems/AgentManager/AgentLogger.class';
|
|
88
|
+
export * from './subsystems/AgentManager/AgentRequest.class';
|
|
89
|
+
export * from './subsystems/AgentManager/AgentRuntime.class';
|
|
90
|
+
export * from './subsystems/AgentManager/AgentSettings.class';
|
|
91
|
+
export * from './subsystems/AgentManager/AgentSSE.class';
|
|
92
|
+
export * from './subsystems/AgentManager/EmbodimentSettings.class';
|
|
93
|
+
export * from './subsystems/AgentManager/ForkedAgent.class';
|
|
94
|
+
export * from './subsystems/AgentManager/OSResourceMonitor';
|
|
95
|
+
export * from './subsystems/LLMManager/custom-models';
|
|
96
|
+
export * from './subsystems/LLMManager/LLM.helper';
|
|
97
|
+
export * from './subsystems/LLMManager/LLM.inference';
|
|
98
|
+
export * from './subsystems/LLMManager/models';
|
|
99
|
+
export * from './subsystems/LLMManager/paramMappings';
|
|
100
|
+
export * from './subsystems/MemoryManager/LLMCache';
|
|
101
|
+
export * from './subsystems/MemoryManager/LLMContext';
|
|
102
|
+
export * from './subsystems/MemoryManager/RuntimeContext';
|
|
103
|
+
export * from './subsystems/Security/Credentials.helper';
|
|
104
|
+
export * from './subsystems/Security/SecureConnector.class';
|
|
105
|
+
export * from './subsystems/AgentManager/AgentData.service/AgentDataConnector';
|
|
106
|
+
export * from './subsystems/AgentManager/AgentData.service/index';
|
|
107
|
+
export * from './subsystems/AgentManager/Component.service/ComponentConnector';
|
|
108
|
+
export * from './subsystems/AgentManager/Component.service/index';
|
|
109
|
+
export * from './subsystems/ComputeManager/Code.service/CodeConnector';
|
|
110
|
+
export * from './subsystems/ComputeManager/Code.service/index';
|
|
111
|
+
export * from './subsystems/IO/CLI.service/CLIConnector';
|
|
112
|
+
export * from './subsystems/IO/CLI.service/index';
|
|
113
|
+
export * from './subsystems/IO/Log.service/index';
|
|
114
|
+
export * from './subsystems/IO/Log.service/LogConnector';
|
|
115
|
+
export * from './subsystems/IO/NKV.service/index';
|
|
116
|
+
export * from './subsystems/IO/NKV.service/NKVConnector';
|
|
117
|
+
export * from './subsystems/IO/Router.service/index';
|
|
118
|
+
export * from './subsystems/IO/Router.service/RouterConnector';
|
|
119
|
+
export * from './subsystems/IO/Storage.service/index';
|
|
120
|
+
export * from './subsystems/IO/Storage.service/SmythFS.class';
|
|
121
|
+
export * from './subsystems/IO/Storage.service/StorageConnector';
|
|
122
|
+
export * from './subsystems/IO/VectorDB.service/index';
|
|
123
|
+
export * from './subsystems/IO/VectorDB.service/VectorDBConnector';
|
|
124
|
+
export * from './subsystems/LLMManager/LLM.service/index';
|
|
125
|
+
export * from './subsystems/LLMManager/LLM.service/LLMConnector';
|
|
126
|
+
export * from './subsystems/LLMManager/LLM.service/LLMCredentials.helper';
|
|
127
|
+
export * from './subsystems/LLMManager/ModelsProvider.service/index';
|
|
128
|
+
export * from './subsystems/LLMManager/ModelsProvider.service/ModelsProviderConnector';
|
|
129
|
+
export * from './subsystems/MemoryManager/Cache.service/CacheConnector';
|
|
130
|
+
export * from './subsystems/MemoryManager/Cache.service/index';
|
|
131
|
+
export * from './subsystems/Security/AccessControl/AccessCandidate.class';
|
|
132
|
+
export * from './subsystems/Security/AccessControl/AccessRequest.class';
|
|
133
|
+
export * from './subsystems/Security/AccessControl/ACL.class';
|
|
134
|
+
export * from './subsystems/Security/Account.service/AccountConnector';
|
|
135
|
+
export * from './subsystems/Security/Account.service/index';
|
|
136
|
+
export * from './subsystems/Security/ManagedVault.service/index';
|
|
137
|
+
export * from './subsystems/Security/ManagedVault.service/ManagedVaultConnector';
|
|
138
|
+
export * from './subsystems/Security/Vault.service/index';
|
|
139
|
+
export * from './subsystems/Security/Vault.service/Vault.helper';
|
|
140
|
+
export * from './subsystems/Security/Vault.service/VaultConnector';
|
|
141
|
+
export * from './subsystems/AgentManager/AgentData.service/connectors/CLIAgentDataConnector.class';
|
|
142
|
+
export * from './subsystems/AgentManager/AgentData.service/connectors/LocalAgentDataConnector.class';
|
|
143
|
+
export * from './subsystems/AgentManager/AgentData.service/connectors/NullAgentData.class';
|
|
144
|
+
export * from './subsystems/AgentManager/Component.service/connectors/LocalComponentConnector.class';
|
|
145
|
+
export * from './subsystems/ComputeManager/Code.service/connectors/AWSLambdaCode.class';
|
|
146
|
+
export * from './subsystems/IO/Log.service/connectors/ConsoleLog.class';
|
|
147
|
+
export * from './subsystems/IO/NKV.service/connectors/NKVLocalStorage.class';
|
|
148
|
+
export * from './subsystems/IO/NKV.service/connectors/NKVRAM.class';
|
|
149
|
+
export * from './subsystems/IO/NKV.service/connectors/NKVRedis.class';
|
|
150
|
+
export * from './subsystems/IO/Router.service/connectors/ExpressRouter.class';
|
|
151
|
+
export * from './subsystems/IO/Router.service/connectors/NullRouter.class';
|
|
152
|
+
export * from './subsystems/IO/Storage.service/connectors/LocalStorage.class';
|
|
153
|
+
export * from './subsystems/IO/Storage.service/connectors/S3Storage.class';
|
|
154
|
+
export * from './subsystems/IO/VectorDB.service/connectors/MilvusVectorDB.class';
|
|
155
|
+
export * from './subsystems/IO/VectorDB.service/connectors/PineconeVectorDB.class';
|
|
156
|
+
export * from './subsystems/IO/VectorDB.service/connectors/RAMVecrtorDB.class';
|
|
157
|
+
export * from './subsystems/IO/VectorDB.service/embed/BaseEmbedding';
|
|
158
|
+
export * from './subsystems/IO/VectorDB.service/embed/index';
|
|
159
|
+
export * from './subsystems/IO/VectorDB.service/embed/OpenAIEmbedding';
|
|
160
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/Anthropic.class';
|
|
161
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/Bedrock.class';
|
|
162
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/Echo.class';
|
|
163
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/GoogleAI.class';
|
|
164
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/Groq.class';
|
|
165
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/OpenAI.class';
|
|
166
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/Perplexity.class';
|
|
167
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/VertexAI.class';
|
|
168
|
+
export * from './subsystems/LLMManager/ModelsProvider.service/connectors/JSONModelsProvider.class';
|
|
169
|
+
export * from './subsystems/MemoryManager/Cache.service/connectors/LocalStorageCache.class';
|
|
170
|
+
export * from './subsystems/MemoryManager/Cache.service/connectors/RAMCache.class';
|
|
171
|
+
export * from './subsystems/MemoryManager/Cache.service/connectors/RedisCache.class';
|
|
172
|
+
export * from './subsystems/MemoryManager/Cache.service/connectors/S3Cache.class';
|
|
173
|
+
export * from './subsystems/Security/Account.service/connectors/AWSAccount.class';
|
|
174
|
+
export * from './subsystems/Security/Account.service/connectors/DummyAccount.class';
|
|
175
|
+
export * from './subsystems/Security/Account.service/connectors/JSONFileAccount.class';
|
|
176
|
+
export * from './subsystems/Security/ManagedVault.service/connectors/NullManagedVault.class';
|
|
177
|
+
export * from './subsystems/Security/ManagedVault.service/connectors/SecretManagerManagedVault';
|
|
178
|
+
export * from './subsystems/Security/Vault.service/connectors/HashicorpVault.class';
|
|
179
|
+
export * from './subsystems/Security/Vault.service/connectors/JSONFileVault.class';
|
|
180
|
+
export * from './subsystems/Security/Vault.service/connectors/NullVault.class';
|
|
181
181
|
export * from './subsystems/Security/Vault.service/connectors/SecretsManager.class';
|
|
@@ -12,6 +12,7 @@ import { Logger } from '@sre/helpers/Log.helper';
|
|
|
12
12
|
import { debounce } from '@sre/utils/general.utils';
|
|
13
13
|
import chokidar from 'chokidar';
|
|
14
14
|
import fs from 'fs/promises';
|
|
15
|
+
import fsSync from 'fs';
|
|
15
16
|
import path from 'path';
|
|
16
17
|
|
|
17
18
|
const console = Logger('SmythModelsProvider');
|
|
@@ -35,8 +36,8 @@ type SmythModelsProviderConfig = {
|
|
|
35
36
|
mode?: 'merge' | 'replace';
|
|
36
37
|
};
|
|
37
38
|
|
|
38
|
-
export class
|
|
39
|
-
public name = '
|
|
39
|
+
export class JSONModelsProvider extends ModelsProviderConnector {
|
|
40
|
+
public name = 'JSONModelsProvider';
|
|
40
41
|
|
|
41
42
|
private models: TLLMModelsList;
|
|
42
43
|
|
|
@@ -99,7 +100,7 @@ export class SmythModelsProvider extends ModelsProviderConnector {
|
|
|
99
100
|
this.models = scannedModels;
|
|
100
101
|
}
|
|
101
102
|
|
|
102
|
-
|
|
103
|
+
JSONModelsProvider.localCache.clear();
|
|
103
104
|
|
|
104
105
|
console.debug(`Successfully reindexed models. Total models: ${Object.keys(this.models).length}`);
|
|
105
106
|
} catch (error) {
|
|
@@ -185,9 +186,30 @@ export class SmythModelsProvider extends ModelsProviderConnector {
|
|
|
185
186
|
return this.isValidSingleModel(data);
|
|
186
187
|
}
|
|
187
188
|
|
|
188
|
-
private
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
private initDirWatcher(dir) {
|
|
190
|
+
// Synchronous file system operations for initial setup
|
|
191
|
+
try {
|
|
192
|
+
const stats = fsSync.statSync(dir);
|
|
193
|
+
|
|
194
|
+
if (!stats.isDirectory()) {
|
|
195
|
+
//is it a file?
|
|
196
|
+
if (stats.isFile()) {
|
|
197
|
+
//load the file
|
|
198
|
+
const fileContent = fsSync.readFileSync(dir, 'utf-8');
|
|
199
|
+
const modelData = JSON.parse(fileContent);
|
|
200
|
+
|
|
201
|
+
if (this._settings?.mode === 'merge') this.models = { ...this.models, ...modelData };
|
|
202
|
+
else this.models = modelData;
|
|
203
|
+
|
|
204
|
+
this.started = true;
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
console.warn(`Path "${dir}" is neither a file nor a directory`);
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
} catch (error) {
|
|
212
|
+
console.warn(`Path "${dir}" does not exist or cannot be accessed:`, error.message);
|
|
191
213
|
return;
|
|
192
214
|
}
|
|
193
215
|
|
|
@@ -220,10 +242,11 @@ export class SmythModelsProvider extends ModelsProviderConnector {
|
|
|
220
242
|
console.debug(`File ${path} has been removed`);
|
|
221
243
|
debouncedReindex();
|
|
222
244
|
})
|
|
223
|
-
.on('ready', () => {
|
|
245
|
+
.on('ready', async () => {
|
|
224
246
|
console.debug(`Watcher ready. Performing initial scan of ${dir}`);
|
|
225
247
|
// Do initial scan once when watcher is ready
|
|
226
|
-
this.reindexModels(dir);
|
|
248
|
+
await this.reindexModels(dir);
|
|
249
|
+
this.started = true;
|
|
227
250
|
});
|
|
228
251
|
}
|
|
229
252
|
}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import { ConnectorService, ConnectorServiceProvider } from '@sre/Core/ConnectorsService';
|
|
4
4
|
import { TConnectorService } from '@sre/types/SRE.types';
|
|
5
|
-
import {
|
|
5
|
+
import { JSONModelsProvider } from './connectors/JSONModelsProvider.class';
|
|
6
6
|
|
|
7
7
|
export class ModelsProviderService extends ConnectorServiceProvider {
|
|
8
8
|
public register() {
|
|
9
|
-
ConnectorService.register(TConnectorService.ModelsProvider, '
|
|
9
|
+
ConnectorService.register(TConnectorService.ModelsProvider, 'JSONModelsProvider', JSONModelsProvider);
|
|
10
10
|
}
|
|
11
11
|
}
|