namirasoft-inference 1.4.0 → 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 +4 -0
- package/dist/NamirasoftInferenceServer.js +5 -1
- package/dist/NamirasoftInferenceServer.js.map +1 -1
- package/dist/NamirasoftInferenceServerLLM.d.ts +8 -0
- package/dist/NamirasoftInferenceServerLLM.js +29 -0
- package/dist/NamirasoftInferenceServerLLM.js.map +1 -0
- 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/LLMCommand.d.ts +4 -0
- package/dist/command/LLMCommand.js +15 -0
- package/dist/command/LLMCommand.js.map +1 -0
- package/dist/command/LLMListCommand.d.ts +5 -0
- package/dist/command/LLMListCommand.js +38 -0
- package/dist/command/LLMListCommand.js.map +1 -0
- 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 +5 -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/enum/ModelCompanyType.d.ts +6 -0
- package/dist/enum/ModelCompanyType.js +11 -0
- package/dist/enum/ModelCompanyType.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +21 -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/LLMItemRow.d.ts +7 -0
- package/dist/row/LLMItemRow.js +3 -0
- package/dist/row/LLMItemRow.js.map +1 -0
- package/dist/row/LLMListResponseRow.d.ts +5 -0
- package/dist/row/LLMListResponseRow.js +3 -0
- package/dist/row/LLMListResponseRow.js.map +1 -0
- 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 +7 -1
- package/src/NamirasoftInferenceServerLLM.ts +39 -0
- 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/LLMCommand.ts +32 -0
- package/src/command/LLMListCommand.ts +45 -0
- 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 +6 -2
- package/src/enum/LoadBalancerAlgorithm.ts +26 -0
- package/src/enum/ModelCompanyType.ts +27 -0
- package/src/index.ts +21 -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/LLMItemRow.ts +29 -0
- package/src/row/LLMListResponseRow.ts +27 -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,83 @@
|
|
|
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 LoadBalancerAskCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["load_balancer_id"], [
|
|
31
|
+
{
|
|
32
|
+
name: "chat_id",
|
|
33
|
+
short: "",
|
|
34
|
+
description: "Provides the value of 'chat_id' in body",
|
|
35
|
+
optional: true,
|
|
36
|
+
args: ["chat_id"],
|
|
37
|
+
defaults: [""]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "run_id",
|
|
41
|
+
short: "",
|
|
42
|
+
description: "Provides the value of 'run_id' in body",
|
|
43
|
+
optional: true,
|
|
44
|
+
args: ["run_id"],
|
|
45
|
+
defaults: [""]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "message",
|
|
49
|
+
short: "",
|
|
50
|
+
description: "Provides the value of 'message' in body",
|
|
51
|
+
optional: false,
|
|
52
|
+
args: ["message"],
|
|
53
|
+
defaults: [""]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "memory_limit",
|
|
57
|
+
short: "",
|
|
58
|
+
description: "Provides the value of 'memory_limit' in body",
|
|
59
|
+
optional: true,
|
|
60
|
+
args: ["memory_limit"],
|
|
61
|
+
defaults: [""]
|
|
62
|
+
}
|
|
63
|
+
]);
|
|
64
|
+
}
|
|
65
|
+
override async exec()
|
|
66
|
+
{
|
|
67
|
+
let token = this.app.storage.getNSAToken();
|
|
68
|
+
if (token == null)
|
|
69
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
70
|
+
let storage = new IStorageMemoryDedicated();
|
|
71
|
+
let token_manager = new TokenManager(storage, () => { });
|
|
72
|
+
token_manager.setValue(token, false);
|
|
73
|
+
let url = this.app.storage.getItem("ns-inference-server-url");
|
|
74
|
+
let server = new NamirasoftInferenceServer(url, token_manager, e => this.app.logger.error(e.message));
|
|
75
|
+
let ans = await server.load_balancer.Ask(this.arg_values[0], {
|
|
76
|
+
chat_id: this.option_values.chat_id,
|
|
77
|
+
run_id: this.option_values.run_id,
|
|
78
|
+
message: this.option_values.message,
|
|
79
|
+
memory_limit: this.option_values.memory_limit
|
|
80
|
+
});
|
|
81
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
82
|
+
}
|
|
83
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
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 { BaseNavigatorCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { LoadBalancerAskCommand } from "./LoadBalancerAskCommand";
|
|
23
|
+
import { LoadBalancerCreateCommand } from "./LoadBalancerCreateCommand";
|
|
24
|
+
import { LoadBalancerDeleteCommand } from "./LoadBalancerDeleteCommand";
|
|
25
|
+
import { LoadBalancerGetCommand } from "./LoadBalancerGetCommand";
|
|
26
|
+
import { LoadBalancerListCommand } from "./LoadBalancerListCommand";
|
|
27
|
+
import { LoadBalancerUpdateCommand } from "./LoadBalancerUpdateCommand";
|
|
28
|
+
|
|
29
|
+
export class LoadBalancerCommand extends BaseNavigatorCommand
|
|
30
|
+
{
|
|
31
|
+
constructor(argv: string[])
|
|
32
|
+
{
|
|
33
|
+
super(argv, {
|
|
34
|
+
"list": LoadBalancerListCommand,
|
|
35
|
+
"get": LoadBalancerGetCommand,
|
|
36
|
+
"create": LoadBalancerCreateCommand,
|
|
37
|
+
"update": LoadBalancerUpdateCommand,
|
|
38
|
+
"delete": LoadBalancerDeleteCommand,
|
|
39
|
+
"ask": LoadBalancerAskCommand,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
};
|
|
@@ -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 LoadBalancerCreateCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, [], [
|
|
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.Create({
|
|
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
|
+
};
|
|
@@ -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 LoadBalancerDeleteCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["id"], []);
|
|
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.Delete(this.arg_values[0]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -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 LoadBalancerGetCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["id"], []);
|
|
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.Get(this.arg_values[0]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -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
|
};
|