namirasoft-inference 1.4.1 → 1.4.2
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/NamirasoftInferenceServer.d.ts +2 -0
- package/dist/NamirasoftInferenceServer.js +3 -1
- package/dist/NamirasoftInferenceServer.js.map +1 -1
- package/dist/NamirasoftInferenceServerLoadBalancer.d.ts +26 -0
- package/dist/NamirasoftInferenceServerLoadBalancer.js +72 -0
- package/dist/NamirasoftInferenceServerLoadBalancer.js.map +1 -0
- package/dist/NamirasoftInferenceServerModel.d.ts +1 -1
- package/dist/NamirasoftInferenceServerModel.js +2 -2
- package/dist/NamirasoftInferenceServerModel.js.map +1 -1
- package/dist/NamirasoftInferenceServerModelCategory.d.ts +1 -1
- package/dist/NamirasoftInferenceServerModelCategory.js +2 -2
- package/dist/NamirasoftInferenceServerModelCategory.js.map +1 -1
- package/dist/NamirasoftInferenceServerModelField.d.ts +1 -1
- package/dist/NamirasoftInferenceServerModelField.js +2 -2
- package/dist/NamirasoftInferenceServerModelField.js.map +1 -1
- package/dist/NamirasoftInferenceServerModelTag.d.ts +1 -1
- package/dist/NamirasoftInferenceServerModelTag.js +2 -2
- package/dist/NamirasoftInferenceServerModelTag.js.map +1 -1
- package/dist/command/HealthLivenessCommand.js +1 -1
- package/dist/command/HealthLivenessCommand.js.map +1 -1
- package/dist/command/HealthReadinessCommand.js +1 -1
- package/dist/command/HealthReadinessCommand.js.map +1 -1
- package/dist/command/HealthzGetCommand.js +1 -1
- package/dist/command/HealthzGetCommand.js.map +1 -1
- package/dist/command/LLMListCommand.js +1 -1
- package/dist/command/LLMListCommand.js.map +1 -1
- package/dist/command/LoadBalancerAskCommand.d.ts +5 -0
- package/dist/command/LoadBalancerAskCommand.js +76 -0
- package/dist/command/LoadBalancerAskCommand.js.map +1 -0
- package/dist/command/LoadBalancerCommand.d.ts +4 -0
- package/dist/command/LoadBalancerCommand.js +25 -0
- package/dist/command/LoadBalancerCommand.js.map +1 -0
- package/dist/command/LoadBalancerCreateCommand.d.ts +5 -0
- package/dist/command/LoadBalancerCreateCommand.js +85 -0
- package/dist/command/LoadBalancerCreateCommand.js.map +1 -0
- package/dist/command/LoadBalancerDeleteCommand.d.ts +5 -0
- package/dist/command/LoadBalancerDeleteCommand.js +38 -0
- package/dist/command/LoadBalancerDeleteCommand.js.map +1 -0
- package/dist/command/LoadBalancerGetCommand.d.ts +5 -0
- package/dist/command/LoadBalancerGetCommand.js +38 -0
- package/dist/command/LoadBalancerGetCommand.js.map +1 -0
- package/dist/command/LoadBalancerListCommand.d.ts +5 -0
- package/dist/command/LoadBalancerListCommand.js +38 -0
- package/dist/command/LoadBalancerListCommand.js.map +1 -0
- package/dist/command/LoadBalancerUpdateCommand.d.ts +5 -0
- package/dist/command/LoadBalancerUpdateCommand.js +85 -0
- package/dist/command/LoadBalancerUpdateCommand.js.map +1 -0
- package/dist/command/MetricsGetCommand.js +1 -1
- package/dist/command/MetricsGetCommand.js.map +1 -1
- package/dist/command/ModelAskCommand.js +1 -1
- package/dist/command/ModelAskCommand.js.map +1 -1
- package/dist/command/ModelCategoryCreateCommand.js +1 -1
- package/dist/command/ModelCategoryCreateCommand.js.map +1 -1
- package/dist/command/ModelCategoryDeleteCommand.js +1 -1
- package/dist/command/ModelCategoryDeleteCommand.js.map +1 -1
- package/dist/command/ModelCategoryGetCommand.js +1 -1
- package/dist/command/ModelCategoryGetCommand.js.map +1 -1
- package/dist/command/ModelCategoryListCommand.js +3 -3
- package/dist/command/ModelCategoryListCommand.js.map +1 -1
- package/dist/command/ModelCreateCommand.js +1 -1
- package/dist/command/ModelCreateCommand.js.map +1 -1
- package/dist/command/ModelDeleteCommand.js +1 -1
- package/dist/command/ModelDeleteCommand.js.map +1 -1
- package/dist/command/ModelFieldCreateCommand.js +1 -1
- package/dist/command/ModelFieldCreateCommand.js.map +1 -1
- package/dist/command/ModelFieldDeleteCommand.js +1 -1
- package/dist/command/ModelFieldDeleteCommand.js.map +1 -1
- package/dist/command/ModelFieldGetCommand.js +1 -1
- package/dist/command/ModelFieldGetCommand.js.map +1 -1
- package/dist/command/ModelFieldListCommand.js +3 -3
- package/dist/command/ModelFieldListCommand.js.map +1 -1
- package/dist/command/ModelFieldUpdateCommand.js +1 -1
- package/dist/command/ModelFieldUpdateCommand.js.map +1 -1
- package/dist/command/ModelGetCommand.js +1 -1
- package/dist/command/ModelGetCommand.js.map +1 -1
- package/dist/command/ModelListCommand.js +3 -3
- package/dist/command/ModelListCommand.js.map +1 -1
- package/dist/command/ModelTagCreateCommand.js +1 -1
- package/dist/command/ModelTagCreateCommand.js.map +1 -1
- package/dist/command/ModelTagDeleteCommand.js +1 -1
- package/dist/command/ModelTagDeleteCommand.js.map +1 -1
- package/dist/command/ModelTagGetCommand.js +1 -1
- package/dist/command/ModelTagGetCommand.js.map +1 -1
- package/dist/command/ModelTagListCommand.js +3 -3
- package/dist/command/ModelTagListCommand.js.map +1 -1
- package/dist/command/ModelTagUpdateCommand.js +1 -1
- package/dist/command/ModelTagUpdateCommand.js.map +1 -1
- package/dist/command/ModelUpdateCommand.js +1 -1
- package/dist/command/ModelUpdateCommand.js.map +1 -1
- package/dist/command/UsageSummaryCommand.js +1 -1
- package/dist/command/UsageSummaryCommand.js.map +1 -1
- package/dist/command/ValueListCommand.js +1 -1
- package/dist/command/ValueListCommand.js.map +1 -1
- package/dist/command/cli.js +3 -1
- package/dist/command/cli.js.map +1 -1
- package/dist/enum/LoadBalancerAlgorithm.d.ts +5 -0
- package/dist/enum/LoadBalancerAlgorithm.js +10 -0
- package/dist/enum/LoadBalancerAlgorithm.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/dist/meta/LoadBalancerMetaTable.d.ts +17 -0
- package/dist/meta/LoadBalancerMetaTable.js +40 -0
- package/dist/meta/LoadBalancerMetaTable.js.map +1 -0
- package/dist/meta/ModelCategoryMetaTable.js +1 -1
- package/dist/meta/ModelCategoryMetaTable.js.map +1 -1
- package/dist/meta/ModelFieldMetaTable.js +1 -1
- package/dist/meta/ModelFieldMetaTable.js.map +1 -1
- package/dist/meta/ModelMetaTable.js +1 -1
- package/dist/meta/ModelMetaTable.js.map +1 -1
- package/dist/meta/ModelTagMetaTable.js +1 -1
- package/dist/meta/ModelTagMetaTable.js.map +1 -1
- package/dist/meta/NamirasoftInferenceMetaDatabase.d.ts +2 -0
- package/dist/meta/NamirasoftInferenceMetaDatabase.js +2 -0
- package/dist/meta/NamirasoftInferenceMetaDatabase.js.map +1 -1
- package/dist/row/LoadBalancerFullRow.d.ts +13 -0
- package/dist/row/LoadBalancerFullRow.js +3 -0
- package/dist/row/LoadBalancerFullRow.js.map +1 -0
- package/dist/row/LoadBalancerInputRow.d.ts +9 -0
- package/dist/row/LoadBalancerInputRow.js +3 -0
- package/dist/row/LoadBalancerInputRow.js.map +1 -0
- package/dist/row/LoadBalancerModelInputRow.d.ts +4 -0
- package/dist/row/LoadBalancerModelInputRow.js +3 -0
- package/dist/row/LoadBalancerModelInputRow.js.map +1 -0
- package/dist/row/LoadBalancerModelRow.d.ts +8 -0
- package/dist/row/LoadBalancerModelRow.js +3 -0
- package/dist/row/LoadBalancerModelRow.js.map +1 -0
- package/dist/row/LoadBalancerRow.d.ts +11 -0
- package/dist/row/LoadBalancerRow.js +3 -0
- package/dist/row/LoadBalancerRow.js.map +1 -0
- package/logo.png +0 -0
- package/package.json +3 -3
- package/src/NamirasoftInferenceServer.ts +4 -1
- package/src/NamirasoftInferenceServerLoadBalancer.ts +80 -0
- package/src/NamirasoftInferenceServerModel.ts +2 -2
- package/src/NamirasoftInferenceServerModelCategory.ts +2 -2
- package/src/NamirasoftInferenceServerModelField.ts +2 -2
- package/src/NamirasoftInferenceServerModelTag.ts +2 -2
- package/src/command/HealthLivenessCommand.ts +1 -1
- package/src/command/HealthReadinessCommand.ts +1 -1
- package/src/command/HealthzGetCommand.ts +1 -1
- package/src/command/LLMListCommand.ts +1 -1
- package/src/command/LoadBalancerAskCommand.ts +83 -0
- package/src/command/LoadBalancerCommand.ts +42 -0
- package/src/command/LoadBalancerCreateCommand.ts +92 -0
- package/src/command/LoadBalancerDeleteCommand.ts +45 -0
- package/src/command/LoadBalancerGetCommand.ts +45 -0
- package/src/command/LoadBalancerListCommand.ts +45 -0
- package/src/command/LoadBalancerUpdateCommand.ts +92 -0
- package/src/command/MetricsGetCommand.ts +1 -1
- package/src/command/ModelAskCommand.ts +1 -1
- package/src/command/ModelCategoryCreateCommand.ts +1 -1
- package/src/command/ModelCategoryDeleteCommand.ts +1 -1
- package/src/command/ModelCategoryGetCommand.ts +1 -1
- package/src/command/ModelCategoryListCommand.ts +3 -3
- package/src/command/ModelCreateCommand.ts +1 -1
- package/src/command/ModelDeleteCommand.ts +1 -1
- package/src/command/ModelFieldCreateCommand.ts +1 -1
- package/src/command/ModelFieldDeleteCommand.ts +1 -1
- package/src/command/ModelFieldGetCommand.ts +1 -1
- package/src/command/ModelFieldListCommand.ts +3 -3
- package/src/command/ModelFieldUpdateCommand.ts +1 -1
- package/src/command/ModelGetCommand.ts +1 -1
- package/src/command/ModelListCommand.ts +3 -3
- package/src/command/ModelTagCreateCommand.ts +1 -1
- package/src/command/ModelTagDeleteCommand.ts +1 -1
- package/src/command/ModelTagGetCommand.ts +1 -1
- package/src/command/ModelTagListCommand.ts +3 -3
- package/src/command/ModelTagUpdateCommand.ts +1 -1
- package/src/command/ModelUpdateCommand.ts +1 -1
- package/src/command/UsageSummaryCommand.ts +1 -1
- package/src/command/ValueListCommand.ts +1 -1
- package/src/command/cli.ts +4 -2
- package/src/enum/LoadBalancerAlgorithm.ts +26 -0
- package/src/index.ts +15 -0
- package/src/meta/LoadBalancerMetaTable.ts +63 -0
- package/src/meta/ModelCategoryMetaTable.ts +1 -1
- package/src/meta/ModelFieldMetaTable.ts +1 -1
- package/src/meta/ModelMetaTable.ts +1 -1
- package/src/meta/ModelTagMetaTable.ts +1 -1
- package/src/meta/NamirasoftInferenceMetaDatabase.ts +3 -0
- package/src/row/LoadBalancerFullRow.ts +35 -0
- package/src/row/LoadBalancerInputRow.ts +31 -0
- package/src/row/LoadBalancerModelInputRow.ts +25 -0
- package/src/row/LoadBalancerModelRow.ts +29 -0
- package/src/row/LoadBalancerRow.ts +33 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemoryDedicated } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftInferenceServer } from "../NamirasoftInferenceServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class LoadBalancerListCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["filters", "page", "size", "sorts", "all_workspaces"], []);
|
|
31
|
+
}
|
|
32
|
+
override async exec()
|
|
33
|
+
{
|
|
34
|
+
let token = this.app.storage.getNSAToken();
|
|
35
|
+
if (token == null)
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
37
|
+
let storage = new IStorageMemoryDedicated();
|
|
38
|
+
let token_manager = new TokenManager(storage, () => { });
|
|
39
|
+
token_manager.setValue(token, false);
|
|
40
|
+
let url = this.app.storage.getItem("ns-inference-server-url");
|
|
41
|
+
let server = new NamirasoftInferenceServer(url, token_manager, e => this.app.logger.error(e.message));
|
|
42
|
+
let ans = await server.load_balancer.List(this.arg_values[0], this.arg_values[1], this.arg_values[2], this.arg_values[3], this.arg_values[4]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemoryDedicated } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftInferenceServer } from "../NamirasoftInferenceServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class LoadBalancerUpdateCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["id"], [
|
|
31
|
+
{
|
|
32
|
+
name: "workspace_id",
|
|
33
|
+
short: "",
|
|
34
|
+
description: "Provides the value of 'workspace_id' in body",
|
|
35
|
+
optional: true,
|
|
36
|
+
args: ["workspace_id"],
|
|
37
|
+
defaults: [""]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "name",
|
|
41
|
+
short: "",
|
|
42
|
+
description: "Provides the value of 'name' in body",
|
|
43
|
+
optional: false,
|
|
44
|
+
args: ["name"],
|
|
45
|
+
defaults: [""]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "algorithm",
|
|
49
|
+
short: "",
|
|
50
|
+
description: "Provides the value of 'algorithm' in body",
|
|
51
|
+
optional: false,
|
|
52
|
+
args: ["algorithm"],
|
|
53
|
+
defaults: [""]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "description",
|
|
57
|
+
short: "",
|
|
58
|
+
description: "Provides the value of 'description' in body",
|
|
59
|
+
optional: true,
|
|
60
|
+
args: ["description"],
|
|
61
|
+
defaults: [""]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "models",
|
|
65
|
+
short: "",
|
|
66
|
+
description: "Provides the value of 'models' in body",
|
|
67
|
+
optional: false,
|
|
68
|
+
args: ["models"],
|
|
69
|
+
defaults: [""]
|
|
70
|
+
}
|
|
71
|
+
]);
|
|
72
|
+
}
|
|
73
|
+
override async exec()
|
|
74
|
+
{
|
|
75
|
+
let token = this.app.storage.getNSAToken();
|
|
76
|
+
if (token == null)
|
|
77
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
78
|
+
let storage = new IStorageMemoryDedicated();
|
|
79
|
+
let token_manager = new TokenManager(storage, () => { });
|
|
80
|
+
token_manager.setValue(token, false);
|
|
81
|
+
let url = this.app.storage.getItem("ns-inference-server-url");
|
|
82
|
+
let server = new NamirasoftInferenceServer(url, token_manager, e => this.app.logger.error(e.message));
|
|
83
|
+
let ans = await server.load_balancer.Update(this.arg_values[0], {
|
|
84
|
+
workspace_id: this.option_values.workspace_id,
|
|
85
|
+
name: this.option_values.name,
|
|
86
|
+
algorithm: this.option_values.algorithm,
|
|
87
|
+
description: this.option_values.description,
|
|
88
|
+
models: this.option_values.models
|
|
89
|
+
});
|
|
90
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
91
|
+
}
|
|
92
|
+
};
|
|
@@ -33,7 +33,7 @@ export class MetricsGetCommand extends BaseFinalCommand
|
|
|
33
33
|
{
|
|
34
34
|
let token = this.app.storage.getNSAToken();
|
|
35
35
|
if (token == null)
|
|
36
|
-
throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
37
37
|
let storage = new IStorageMemoryDedicated();
|
|
38
38
|
let token_manager = new TokenManager(storage, () => { });
|
|
39
39
|
token_manager.setValue(token, false);
|
|
@@ -66,7 +66,7 @@ export class ModelAskCommand extends BaseFinalCommand
|
|
|
66
66
|
{
|
|
67
67
|
let token = this.app.storage.getNSAToken();
|
|
68
68
|
if (token == null)
|
|
69
|
-
throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
|
|
69
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
70
70
|
let storage = new IStorageMemoryDedicated();
|
|
71
71
|
let token_manager = new TokenManager(storage, () => { });
|
|
72
72
|
token_manager.setValue(token, false);
|
|
@@ -42,7 +42,7 @@ export class ModelCategoryCreateCommand extends BaseFinalCommand
|
|
|
42
42
|
{
|
|
43
43
|
let token = this.app.storage.getNSAToken();
|
|
44
44
|
if (token == null)
|
|
45
|
-
throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
|
|
45
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
46
46
|
let storage = new IStorageMemoryDedicated();
|
|
47
47
|
let token_manager = new TokenManager(storage, () => { });
|
|
48
48
|
token_manager.setValue(token, false);
|
|
@@ -33,7 +33,7 @@ export class ModelCategoryDeleteCommand extends BaseFinalCommand
|
|
|
33
33
|
{
|
|
34
34
|
let token = this.app.storage.getNSAToken();
|
|
35
35
|
if (token == null)
|
|
36
|
-
throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
37
37
|
let storage = new IStorageMemoryDedicated();
|
|
38
38
|
let token_manager = new TokenManager(storage, () => { });
|
|
39
39
|
token_manager.setValue(token, false);
|
|
@@ -33,7 +33,7 @@ export class ModelCategoryGetCommand extends BaseFinalCommand
|
|
|
33
33
|
{
|
|
34
34
|
let token = this.app.storage.getNSAToken();
|
|
35
35
|
if (token == null)
|
|
36
|
-
throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
37
37
|
let storage = new IStorageMemoryDedicated();
|
|
38
38
|
let token_manager = new TokenManager(storage, () => { });
|
|
39
39
|
token_manager.setValue(token, false);
|
|
@@ -27,19 +27,19 @@ export class ModelCategoryListCommand extends BaseFinalCommand
|
|
|
27
27
|
{
|
|
28
28
|
constructor(argv: string[])
|
|
29
29
|
{
|
|
30
|
-
super(argv, ["filters", "page", "size", "sorts"], []);
|
|
30
|
+
super(argv, ["filters", "page", "size", "sorts", "all_workspaces"], []);
|
|
31
31
|
}
|
|
32
32
|
override async exec()
|
|
33
33
|
{
|
|
34
34
|
let token = this.app.storage.getNSAToken();
|
|
35
35
|
if (token == null)
|
|
36
|
-
throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
37
37
|
let storage = new IStorageMemoryDedicated();
|
|
38
38
|
let token_manager = new TokenManager(storage, () => { });
|
|
39
39
|
token_manager.setValue(token, false);
|
|
40
40
|
let url = this.app.storage.getItem("ns-inference-server-url");
|
|
41
41
|
let server = new NamirasoftInferenceServer(url, token_manager, e => this.app.logger.error(e.message));
|
|
42
|
-
let ans = await server.model_category.List(this.arg_values[0], this.arg_values[1], this.arg_values[2], this.arg_values[3]);
|
|
42
|
+
let ans = await server.model_category.List(this.arg_values[0], this.arg_values[1], this.arg_values[2], this.arg_values[3], this.arg_values[4]);
|
|
43
43
|
this.app.logger.success(JSON.stringify(ans));
|
|
44
44
|
}
|
|
45
45
|
};
|
|
@@ -138,7 +138,7 @@ export class ModelCreateCommand extends BaseFinalCommand
|
|
|
138
138
|
{
|
|
139
139
|
let token = this.app.storage.getNSAToken();
|
|
140
140
|
if (token == null)
|
|
141
|
-
throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
|
|
141
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
142
142
|
let storage = new IStorageMemoryDedicated();
|
|
143
143
|
let token_manager = new TokenManager(storage, () => { });
|
|
144
144
|
token_manager.setValue(token, false);
|
|
@@ -33,7 +33,7 @@ export class ModelDeleteCommand extends BaseFinalCommand
|
|
|
33
33
|
{
|
|
34
34
|
let token = this.app.storage.getNSAToken();
|
|
35
35
|
if (token == null)
|
|
36
|
-
throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
37
37
|
let storage = new IStorageMemoryDedicated();
|
|
38
38
|
let token_manager = new TokenManager(storage, () => { });
|
|
39
39
|
token_manager.setValue(token, false);
|
|
@@ -50,7 +50,7 @@ export class ModelFieldCreateCommand extends BaseFinalCommand
|
|
|
50
50
|
{
|
|
51
51
|
let token = this.app.storage.getNSAToken();
|
|
52
52
|
if (token == null)
|
|
53
|
-
throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
|
|
53
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
54
54
|
let storage = new IStorageMemoryDedicated();
|
|
55
55
|
let token_manager = new TokenManager(storage, () => { });
|
|
56
56
|
token_manager.setValue(token, false);
|
|
@@ -33,7 +33,7 @@ export class ModelFieldDeleteCommand extends BaseFinalCommand
|
|
|
33
33
|
{
|
|
34
34
|
let token = this.app.storage.getNSAToken();
|
|
35
35
|
if (token == null)
|
|
36
|
-
throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
37
37
|
let storage = new IStorageMemoryDedicated();
|
|
38
38
|
let token_manager = new TokenManager(storage, () => { });
|
|
39
39
|
token_manager.setValue(token, false);
|
|
@@ -33,7 +33,7 @@ export class ModelFieldGetCommand extends BaseFinalCommand
|
|
|
33
33
|
{
|
|
34
34
|
let token = this.app.storage.getNSAToken();
|
|
35
35
|
if (token == null)
|
|
36
|
-
throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
37
37
|
let storage = new IStorageMemoryDedicated();
|
|
38
38
|
let token_manager = new TokenManager(storage, () => { });
|
|
39
39
|
token_manager.setValue(token, false);
|
|
@@ -27,19 +27,19 @@ export class ModelFieldListCommand extends BaseFinalCommand
|
|
|
27
27
|
{
|
|
28
28
|
constructor(argv: string[])
|
|
29
29
|
{
|
|
30
|
-
super(argv, ["filters", "page", "size", "sorts"], []);
|
|
30
|
+
super(argv, ["filters", "page", "size", "sorts", "all_workspaces"], []);
|
|
31
31
|
}
|
|
32
32
|
override async exec()
|
|
33
33
|
{
|
|
34
34
|
let token = this.app.storage.getNSAToken();
|
|
35
35
|
if (token == null)
|
|
36
|
-
throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
37
37
|
let storage = new IStorageMemoryDedicated();
|
|
38
38
|
let token_manager = new TokenManager(storage, () => { });
|
|
39
39
|
token_manager.setValue(token, false);
|
|
40
40
|
let url = this.app.storage.getItem("ns-inference-server-url");
|
|
41
41
|
let server = new NamirasoftInferenceServer(url, token_manager, e => this.app.logger.error(e.message));
|
|
42
|
-
let ans = await server.model_field.List(this.arg_values[0], this.arg_values[1], this.arg_values[2], this.arg_values[3]);
|
|
42
|
+
let ans = await server.model_field.List(this.arg_values[0], this.arg_values[1], this.arg_values[2], this.arg_values[3], this.arg_values[4]);
|
|
43
43
|
this.app.logger.success(JSON.stringify(ans));
|
|
44
44
|
}
|
|
45
45
|
};
|
|
@@ -50,7 +50,7 @@ export class ModelFieldUpdateCommand extends BaseFinalCommand
|
|
|
50
50
|
{
|
|
51
51
|
let token = this.app.storage.getNSAToken();
|
|
52
52
|
if (token == null)
|
|
53
|
-
throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
|
|
53
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
54
54
|
let storage = new IStorageMemoryDedicated();
|
|
55
55
|
let token_manager = new TokenManager(storage, () => { });
|
|
56
56
|
token_manager.setValue(token, false);
|
|
@@ -33,7 +33,7 @@ export class ModelGetCommand extends BaseFinalCommand
|
|
|
33
33
|
{
|
|
34
34
|
let token = this.app.storage.getNSAToken();
|
|
35
35
|
if (token == null)
|
|
36
|
-
throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
37
37
|
let storage = new IStorageMemoryDedicated();
|
|
38
38
|
let token_manager = new TokenManager(storage, () => { });
|
|
39
39
|
token_manager.setValue(token, false);
|
|
@@ -27,19 +27,19 @@ export class ModelListCommand extends BaseFinalCommand
|
|
|
27
27
|
{
|
|
28
28
|
constructor(argv: string[])
|
|
29
29
|
{
|
|
30
|
-
super(argv, ["filters", "page", "size", "sorts"], []);
|
|
30
|
+
super(argv, ["filters", "page", "size", "sorts", "all_workspaces"], []);
|
|
31
31
|
}
|
|
32
32
|
override async exec()
|
|
33
33
|
{
|
|
34
34
|
let token = this.app.storage.getNSAToken();
|
|
35
35
|
if (token == null)
|
|
36
|
-
throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
37
37
|
let storage = new IStorageMemoryDedicated();
|
|
38
38
|
let token_manager = new TokenManager(storage, () => { });
|
|
39
39
|
token_manager.setValue(token, false);
|
|
40
40
|
let url = this.app.storage.getItem("ns-inference-server-url");
|
|
41
41
|
let server = new NamirasoftInferenceServer(url, token_manager, e => this.app.logger.error(e.message));
|
|
42
|
-
let ans = await server.model.List(this.arg_values[0], this.arg_values[1], this.arg_values[2], this.arg_values[3]);
|
|
42
|
+
let ans = await server.model.List(this.arg_values[0], this.arg_values[1], this.arg_values[2], this.arg_values[3], this.arg_values[4]);
|
|
43
43
|
this.app.logger.success(JSON.stringify(ans));
|
|
44
44
|
}
|
|
45
45
|
};
|
|
@@ -50,7 +50,7 @@ export class ModelTagCreateCommand extends BaseFinalCommand
|
|
|
50
50
|
{
|
|
51
51
|
let token = this.app.storage.getNSAToken();
|
|
52
52
|
if (token == null)
|
|
53
|
-
throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
|
|
53
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
54
54
|
let storage = new IStorageMemoryDedicated();
|
|
55
55
|
let token_manager = new TokenManager(storage, () => { });
|
|
56
56
|
token_manager.setValue(token, false);
|
|
@@ -33,7 +33,7 @@ export class ModelTagDeleteCommand extends BaseFinalCommand
|
|
|
33
33
|
{
|
|
34
34
|
let token = this.app.storage.getNSAToken();
|
|
35
35
|
if (token == null)
|
|
36
|
-
throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
37
37
|
let storage = new IStorageMemoryDedicated();
|
|
38
38
|
let token_manager = new TokenManager(storage, () => { });
|
|
39
39
|
token_manager.setValue(token, false);
|
|
@@ -33,7 +33,7 @@ export class ModelTagGetCommand extends BaseFinalCommand
|
|
|
33
33
|
{
|
|
34
34
|
let token = this.app.storage.getNSAToken();
|
|
35
35
|
if (token == null)
|
|
36
|
-
throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
37
37
|
let storage = new IStorageMemoryDedicated();
|
|
38
38
|
let token_manager = new TokenManager(storage, () => { });
|
|
39
39
|
token_manager.setValue(token, false);
|
|
@@ -27,19 +27,19 @@ export class ModelTagListCommand extends BaseFinalCommand
|
|
|
27
27
|
{
|
|
28
28
|
constructor(argv: string[])
|
|
29
29
|
{
|
|
30
|
-
super(argv, ["filters", "page", "size", "sorts"], []);
|
|
30
|
+
super(argv, ["filters", "page", "size", "sorts", "all_workspaces"], []);
|
|
31
31
|
}
|
|
32
32
|
override async exec()
|
|
33
33
|
{
|
|
34
34
|
let token = this.app.storage.getNSAToken();
|
|
35
35
|
if (token == null)
|
|
36
|
-
throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
37
37
|
let storage = new IStorageMemoryDedicated();
|
|
38
38
|
let token_manager = new TokenManager(storage, () => { });
|
|
39
39
|
token_manager.setValue(token, false);
|
|
40
40
|
let url = this.app.storage.getItem("ns-inference-server-url");
|
|
41
41
|
let server = new NamirasoftInferenceServer(url, token_manager, e => this.app.logger.error(e.message));
|
|
42
|
-
let ans = await server.model_tag.List(this.arg_values[0], this.arg_values[1], this.arg_values[2], this.arg_values[3]);
|
|
42
|
+
let ans = await server.model_tag.List(this.arg_values[0], this.arg_values[1], this.arg_values[2], this.arg_values[3], this.arg_values[4]);
|
|
43
43
|
this.app.logger.success(JSON.stringify(ans));
|
|
44
44
|
}
|
|
45
45
|
};
|
|
@@ -50,7 +50,7 @@ export class ModelTagUpdateCommand extends BaseFinalCommand
|
|
|
50
50
|
{
|
|
51
51
|
let token = this.app.storage.getNSAToken();
|
|
52
52
|
if (token == null)
|
|
53
|
-
throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
|
|
53
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
54
54
|
let storage = new IStorageMemoryDedicated();
|
|
55
55
|
let token_manager = new TokenManager(storage, () => { });
|
|
56
56
|
token_manager.setValue(token, false);
|
|
@@ -138,7 +138,7 @@ export class ModelUpdateCommand extends BaseFinalCommand
|
|
|
138
138
|
{
|
|
139
139
|
let token = this.app.storage.getNSAToken();
|
|
140
140
|
if (token == null)
|
|
141
|
-
throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
|
|
141
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
142
142
|
let storage = new IStorageMemoryDedicated();
|
|
143
143
|
let token_manager = new TokenManager(storage, () => { });
|
|
144
144
|
token_manager.setValue(token, false);
|
|
@@ -33,7 +33,7 @@ export class UsageSummaryCommand extends BaseFinalCommand
|
|
|
33
33
|
{
|
|
34
34
|
let token = this.app.storage.getNSAToken();
|
|
35
35
|
if (token == null)
|
|
36
|
-
throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
37
37
|
let storage = new IStorageMemoryDedicated();
|
|
38
38
|
let token_manager = new TokenManager(storage, () => { });
|
|
39
39
|
token_manager.setValue(token, false);
|
|
@@ -33,7 +33,7 @@ export class ValueListCommand extends BaseFinalCommand
|
|
|
33
33
|
{
|
|
34
34
|
let token = this.app.storage.getNSAToken();
|
|
35
35
|
if (token == null)
|
|
36
|
-
throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
37
37
|
let storage = new IStorageMemoryDedicated();
|
|
38
38
|
let token_manager = new TokenManager(storage, () => { });
|
|
39
39
|
token_manager.setValue(token, false);
|
package/src/command/cli.ts
CHANGED
|
@@ -19,12 +19,13 @@
|
|
|
19
19
|
/* */
|
|
20
20
|
/****************************************************************/
|
|
21
21
|
|
|
22
|
-
import { AccountCommand } from "namirasoft-account";
|
|
22
|
+
import { AccountCommand as NSAccountCommand } from "namirasoft-account";
|
|
23
23
|
import { Application, BaseStorage } from "namirasoft-node-cli";
|
|
24
24
|
import { ConfigCommand } from "namirasoft-node-cli";
|
|
25
25
|
import { HealthCommand } from "./HealthCommand";
|
|
26
26
|
import { HealthzCommand } from "./HealthzCommand";
|
|
27
27
|
import { LLMCommand } from "./LLMCommand";
|
|
28
|
+
import { LoadBalancerCommand } from "./LoadBalancerCommand";
|
|
28
29
|
import { MetricsCommand } from "./MetricsCommand";
|
|
29
30
|
import { ModelCategoryCommand } from "./ModelCategoryCommand";
|
|
30
31
|
import { ModelCommand } from "./ModelCommand";
|
|
@@ -43,9 +44,10 @@ let app = new Application("ns-inference", new BaseStorage(),
|
|
|
43
44
|
"modelfield": ModelFieldCommand,
|
|
44
45
|
"modeltag": ModelTagCommand,
|
|
45
46
|
"model": ModelCommand,
|
|
47
|
+
"loadbalancer": LoadBalancerCommand,
|
|
46
48
|
"llm": LLMCommand,
|
|
47
49
|
"usage": UsageCommand,
|
|
48
|
-
"account":
|
|
50
|
+
"ns-account": NSAccountCommand,
|
|
49
51
|
"config": (argv: string[]) => new ConfigCommand(argv, ["ns-inference-server-url"])
|
|
50
52
|
});
|
|
51
53
|
app.run();
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
export enum LoadBalancerAlgorithm
|
|
22
|
+
{
|
|
23
|
+
Random = "Random",
|
|
24
|
+
RoundRobin = "RoundRobin",
|
|
25
|
+
LeastResponseTime = "LeastResponseTime",
|
|
26
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -23,6 +23,7 @@ export * from "./NamirasoftInferenceServerBase";
|
|
|
23
23
|
export * from "./NamirasoftInferenceServerHealth";
|
|
24
24
|
export * from "./NamirasoftInferenceServerHealthz";
|
|
25
25
|
export * from "./NamirasoftInferenceServerLLM";
|
|
26
|
+
export * from "./NamirasoftInferenceServerLoadBalancer";
|
|
26
27
|
export * from "./NamirasoftInferenceServerMetrics";
|
|
27
28
|
export * from "./NamirasoftInferenceServerModel";
|
|
28
29
|
export * from "./NamirasoftInferenceServerModelCategory";
|
|
@@ -37,6 +38,13 @@ export * from "./command/HealthzCommand";
|
|
|
37
38
|
export * from "./command/HealthzGetCommand";
|
|
38
39
|
export * from "./command/LLMCommand";
|
|
39
40
|
export * from "./command/LLMListCommand";
|
|
41
|
+
export * from "./command/LoadBalancerAskCommand";
|
|
42
|
+
export * from "./command/LoadBalancerCommand";
|
|
43
|
+
export * from "./command/LoadBalancerCreateCommand";
|
|
44
|
+
export * from "./command/LoadBalancerDeleteCommand";
|
|
45
|
+
export * from "./command/LoadBalancerGetCommand";
|
|
46
|
+
export * from "./command/LoadBalancerListCommand";
|
|
47
|
+
export * from "./command/LoadBalancerUpdateCommand";
|
|
40
48
|
export * from "./command/MetricsCommand";
|
|
41
49
|
export * from "./command/MetricsGetCommand";
|
|
42
50
|
export * from "./command/ModelAskCommand";
|
|
@@ -68,9 +76,11 @@ export * from "./command/UsageSummaryCommand";
|
|
|
68
76
|
export * from "./command/ValueCommand";
|
|
69
77
|
export * from "./command/ValueListCommand";
|
|
70
78
|
export * from "./enum/InteractionStatus";
|
|
79
|
+
export * from "./enum/LoadBalancerAlgorithm";
|
|
71
80
|
export * from "./enum/ModelCompanyType";
|
|
72
81
|
export * from "./enum/ModelModelCompany";
|
|
73
82
|
export * from "./enum/ModelModelName";
|
|
83
|
+
export * from "./meta/LoadBalancerMetaTable";
|
|
74
84
|
export * from "./meta/ModelCategoryMetaTable";
|
|
75
85
|
export * from "./meta/ModelFieldMetaTable";
|
|
76
86
|
export * from "./meta/ModelMetaTable";
|
|
@@ -82,6 +92,11 @@ export * from "./row/EntityTagInputRow";
|
|
|
82
92
|
export * from "./row/InteractionRow";
|
|
83
93
|
export * from "./row/LLMItemRow";
|
|
84
94
|
export * from "./row/LLMListResponseRow";
|
|
95
|
+
export * from "./row/LoadBalancerFullRow";
|
|
96
|
+
export * from "./row/LoadBalancerInputRow";
|
|
97
|
+
export * from "./row/LoadBalancerModelInputRow";
|
|
98
|
+
export * from "./row/LoadBalancerModelRow";
|
|
99
|
+
export * from "./row/LoadBalancerRow";
|
|
85
100
|
export * from "./row/ModelCategoryRow";
|
|
86
101
|
export * from "./row/ModelFieldRow";
|
|
87
102
|
export * from "./row/ModelInputRow";
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseUUID, BaseMetaColumn } from "namirasoft-core";
|
|
22
|
+
import { FilterItem, SortItem } from "namirasoft-core";
|
|
23
|
+
import { LoadBalancerRow } from "../row/LoadBalancerRow";
|
|
24
|
+
import { NSBaseMetaDatabase, NSBaseMetaTable } from "namirasoft-site";
|
|
25
|
+
import { NamirasoftInferenceServer } from "../NamirasoftInferenceServer";
|
|
26
|
+
|
|
27
|
+
export class LoadBalancerMetaTable extends NSBaseMetaTable<NamirasoftInferenceServer, LoadBalancerRow>
|
|
28
|
+
{
|
|
29
|
+
public override columns: {
|
|
30
|
+
id: BaseMetaColumn;
|
|
31
|
+
user_id: BaseMetaColumn;
|
|
32
|
+
workspace_id: BaseMetaColumn;
|
|
33
|
+
name: BaseMetaColumn;
|
|
34
|
+
algorithm: BaseMetaColumn;
|
|
35
|
+
description: BaseMetaColumn;
|
|
36
|
+
created_at: BaseMetaColumn;
|
|
37
|
+
updated_at: BaseMetaColumn;
|
|
38
|
+
}
|
|
39
|
+
constructor(database: NSBaseMetaDatabase<NamirasoftInferenceServer>)
|
|
40
|
+
{
|
|
41
|
+
super(database, "load_balancer", "Load Balancer", new BaseUUID("ifr-lbc"));
|
|
42
|
+
this.columns = {
|
|
43
|
+
id: new BaseMetaColumn(this, "id", "ID", "String", true),
|
|
44
|
+
user_id: new BaseMetaColumn(this, "user_id", "User ID", "String", true),
|
|
45
|
+
workspace_id: new BaseMetaColumn(this, "workspace_id", "Workspace ID", "String", true),
|
|
46
|
+
name: new BaseMetaColumn(this, "name", "Name", "String", true),
|
|
47
|
+
algorithm: new BaseMetaColumn(this, "algorithm", "Algorithm", "Enum", true),
|
|
48
|
+
description: new BaseMetaColumn(this, "description", "Description", "String", false),
|
|
49
|
+
created_at: new BaseMetaColumn(this, "created_at", "Created At", "DateTime", true),
|
|
50
|
+
updated_at: new BaseMetaColumn(this, "updated_at", "Updated At", "DateTime", true),
|
|
51
|
+
};
|
|
52
|
+
this.back_end.get = async (id: string) =>
|
|
53
|
+
{
|
|
54
|
+
let server = this.database.getServer();
|
|
55
|
+
return await server.load_balancer.Get(id);
|
|
56
|
+
};
|
|
57
|
+
this.back_end.list = async (filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[]) =>
|
|
58
|
+
{
|
|
59
|
+
let server = this.database.getServer();
|
|
60
|
+
return await server.load_balancer.List(filters, page, size, sorts, null, {});
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
};
|
|
@@ -53,7 +53,7 @@ export class ModelCategoryMetaTable extends NSBaseMetaTable<NamirasoftInferenceS
|
|
|
53
53
|
this.back_end.list = async (filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[]) =>
|
|
54
54
|
{
|
|
55
55
|
let server = this.database.getServer();
|
|
56
|
-
return await server.model_category.List(filters, page, size, sorts);
|
|
56
|
+
return await server.model_category.List(filters, page, size, sorts, null, {});
|
|
57
57
|
};
|
|
58
58
|
this.front_end.getUpdateLink = () => "";
|
|
59
59
|
}
|
|
@@ -55,7 +55,7 @@ export class ModelFieldMetaTable extends NSBaseMetaTable<NamirasoftInferenceServ
|
|
|
55
55
|
this.back_end.list = async (filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[]) =>
|
|
56
56
|
{
|
|
57
57
|
let server = this.database.getServer();
|
|
58
|
-
return await server.model_field.List(filters, page, size, sorts);
|
|
58
|
+
return await server.model_field.List(filters, page, size, sorts, null, {});
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
};
|
|
@@ -147,7 +147,7 @@ export class ModelMetaTable extends NSBaseMetaTable<NamirasoftInferenceServer, M
|
|
|
147
147
|
this.back_end.list = async (filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[]) =>
|
|
148
148
|
{
|
|
149
149
|
let server = this.database.getServer();
|
|
150
|
-
return await server.model.List(filters, page, size, sorts);
|
|
150
|
+
return await server.model.List(filters, page, size, sorts, null, {});
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
153
|
};
|