namirasoft-inference 1.4.0
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 +23 -0
- package/dist/NamirasoftInferenceServer.js +30 -0
- package/dist/NamirasoftInferenceServer.js.map +1 -0
- package/dist/NamirasoftInferenceServerBase.d.ts +5 -0
- package/dist/NamirasoftInferenceServerBase.js +11 -0
- package/dist/NamirasoftInferenceServerBase.js.map +1 -0
- package/dist/NamirasoftInferenceServerHealth.d.ts +8 -0
- package/dist/NamirasoftInferenceServerHealth.js +35 -0
- package/dist/NamirasoftInferenceServerHealth.js.map +1 -0
- package/dist/NamirasoftInferenceServerHealthz.d.ts +7 -0
- package/dist/NamirasoftInferenceServerHealthz.js +28 -0
- package/dist/NamirasoftInferenceServerHealthz.js.map +1 -0
- package/dist/NamirasoftInferenceServerMetrics.d.ts +7 -0
- package/dist/NamirasoftInferenceServerMetrics.js +28 -0
- package/dist/NamirasoftInferenceServerMetrics.js.map +1 -0
- package/dist/NamirasoftInferenceServerModel.d.ts +25 -0
- package/dist/NamirasoftInferenceServerModel.js +72 -0
- package/dist/NamirasoftInferenceServerModel.js.map +1 -0
- package/dist/NamirasoftInferenceServerModelCategory.d.ts +17 -0
- package/dist/NamirasoftInferenceServerModelCategory.js +56 -0
- package/dist/NamirasoftInferenceServerModelCategory.js.map +1 -0
- package/dist/NamirasoftInferenceServerModelField.d.ts +18 -0
- package/dist/NamirasoftInferenceServerModelField.js +64 -0
- package/dist/NamirasoftInferenceServerModelField.js.map +1 -0
- package/dist/NamirasoftInferenceServerModelTag.d.ts +18 -0
- package/dist/NamirasoftInferenceServerModelTag.js +64 -0
- package/dist/NamirasoftInferenceServerModelTag.js.map +1 -0
- package/dist/NamirasoftInferenceServerUsage.d.ts +8 -0
- package/dist/NamirasoftInferenceServerUsage.js +29 -0
- package/dist/NamirasoftInferenceServerUsage.js.map +1 -0
- package/dist/NamirasoftInferenceServerValue.d.ts +7 -0
- package/dist/NamirasoftInferenceServerValue.js +29 -0
- package/dist/NamirasoftInferenceServerValue.js.map +1 -0
- package/dist/command/HealthCommand.d.ts +4 -0
- package/dist/command/HealthCommand.js +17 -0
- package/dist/command/HealthCommand.js.map +1 -0
- package/dist/command/HealthLivenessCommand.d.ts +5 -0
- package/dist/command/HealthLivenessCommand.js +38 -0
- package/dist/command/HealthLivenessCommand.js.map +1 -0
- package/dist/command/HealthReadinessCommand.d.ts +5 -0
- package/dist/command/HealthReadinessCommand.js +38 -0
- package/dist/command/HealthReadinessCommand.js.map +1 -0
- package/dist/command/HealthzCommand.d.ts +4 -0
- package/dist/command/HealthzCommand.js +15 -0
- package/dist/command/HealthzCommand.js.map +1 -0
- package/dist/command/HealthzGetCommand.d.ts +5 -0
- package/dist/command/HealthzGetCommand.js +38 -0
- package/dist/command/HealthzGetCommand.js.map +1 -0
- package/dist/command/MetricsCommand.d.ts +4 -0
- package/dist/command/MetricsCommand.js +15 -0
- package/dist/command/MetricsCommand.js.map +1 -0
- package/dist/command/MetricsGetCommand.d.ts +5 -0
- package/dist/command/MetricsGetCommand.js +38 -0
- package/dist/command/MetricsGetCommand.js.map +1 -0
- package/dist/command/ModelAskCommand.d.ts +5 -0
- package/dist/command/ModelAskCommand.js +76 -0
- package/dist/command/ModelAskCommand.js.map +1 -0
- package/dist/command/ModelCategoryCommand.d.ts +4 -0
- package/dist/command/ModelCategoryCommand.js +21 -0
- package/dist/command/ModelCategoryCommand.js.map +1 -0
- package/dist/command/ModelCategoryCreateCommand.d.ts +5 -0
- package/dist/command/ModelCategoryCreateCommand.js +49 -0
- package/dist/command/ModelCategoryCreateCommand.js.map +1 -0
- package/dist/command/ModelCategoryDeleteCommand.d.ts +5 -0
- package/dist/command/ModelCategoryDeleteCommand.js +38 -0
- package/dist/command/ModelCategoryDeleteCommand.js.map +1 -0
- package/dist/command/ModelCategoryGetCommand.d.ts +5 -0
- package/dist/command/ModelCategoryGetCommand.js +38 -0
- package/dist/command/ModelCategoryGetCommand.js.map +1 -0
- package/dist/command/ModelCategoryListCommand.d.ts +5 -0
- package/dist/command/ModelCategoryListCommand.js +38 -0
- package/dist/command/ModelCategoryListCommand.js.map +1 -0
- package/dist/command/ModelCommand.d.ts +4 -0
- package/dist/command/ModelCommand.js +25 -0
- package/dist/command/ModelCommand.js.map +1 -0
- package/dist/command/ModelCreateCommand.d.ts +5 -0
- package/dist/command/ModelCreateCommand.js +157 -0
- package/dist/command/ModelCreateCommand.js.map +1 -0
- package/dist/command/ModelDeleteCommand.d.ts +5 -0
- package/dist/command/ModelDeleteCommand.js +38 -0
- package/dist/command/ModelDeleteCommand.js.map +1 -0
- package/dist/command/ModelFieldCommand.d.ts +4 -0
- package/dist/command/ModelFieldCommand.js +23 -0
- package/dist/command/ModelFieldCommand.js.map +1 -0
- package/dist/command/ModelFieldCreateCommand.d.ts +5 -0
- package/dist/command/ModelFieldCreateCommand.js +58 -0
- package/dist/command/ModelFieldCreateCommand.js.map +1 -0
- package/dist/command/ModelFieldDeleteCommand.d.ts +5 -0
- package/dist/command/ModelFieldDeleteCommand.js +38 -0
- package/dist/command/ModelFieldDeleteCommand.js.map +1 -0
- package/dist/command/ModelFieldGetCommand.d.ts +5 -0
- package/dist/command/ModelFieldGetCommand.js +38 -0
- package/dist/command/ModelFieldGetCommand.js.map +1 -0
- package/dist/command/ModelFieldListCommand.d.ts +5 -0
- package/dist/command/ModelFieldListCommand.js +38 -0
- package/dist/command/ModelFieldListCommand.js.map +1 -0
- package/dist/command/ModelFieldUpdateCommand.d.ts +5 -0
- package/dist/command/ModelFieldUpdateCommand.js +58 -0
- package/dist/command/ModelFieldUpdateCommand.js.map +1 -0
- package/dist/command/ModelGetCommand.d.ts +5 -0
- package/dist/command/ModelGetCommand.js +38 -0
- package/dist/command/ModelGetCommand.js.map +1 -0
- package/dist/command/ModelListCommand.d.ts +5 -0
- package/dist/command/ModelListCommand.js +38 -0
- package/dist/command/ModelListCommand.js.map +1 -0
- package/dist/command/ModelTagCommand.d.ts +4 -0
- package/dist/command/ModelTagCommand.js +23 -0
- package/dist/command/ModelTagCommand.js.map +1 -0
- package/dist/command/ModelTagCreateCommand.d.ts +5 -0
- package/dist/command/ModelTagCreateCommand.js +58 -0
- package/dist/command/ModelTagCreateCommand.js.map +1 -0
- package/dist/command/ModelTagDeleteCommand.d.ts +5 -0
- package/dist/command/ModelTagDeleteCommand.js +38 -0
- package/dist/command/ModelTagDeleteCommand.js.map +1 -0
- package/dist/command/ModelTagGetCommand.d.ts +5 -0
- package/dist/command/ModelTagGetCommand.js +38 -0
- package/dist/command/ModelTagGetCommand.js.map +1 -0
- package/dist/command/ModelTagListCommand.d.ts +5 -0
- package/dist/command/ModelTagListCommand.js +38 -0
- package/dist/command/ModelTagListCommand.js.map +1 -0
- package/dist/command/ModelTagUpdateCommand.d.ts +5 -0
- package/dist/command/ModelTagUpdateCommand.js +58 -0
- package/dist/command/ModelTagUpdateCommand.js.map +1 -0
- package/dist/command/ModelUpdateCommand.d.ts +5 -0
- package/dist/command/ModelUpdateCommand.js +157 -0
- package/dist/command/ModelUpdateCommand.js.map +1 -0
- package/dist/command/UsageCommand.d.ts +4 -0
- package/dist/command/UsageCommand.js +15 -0
- package/dist/command/UsageCommand.js.map +1 -0
- package/dist/command/UsageSummaryCommand.d.ts +5 -0
- package/dist/command/UsageSummaryCommand.js +38 -0
- package/dist/command/UsageSummaryCommand.js.map +1 -0
- package/dist/command/ValueCommand.d.ts +4 -0
- package/dist/command/ValueCommand.js +15 -0
- package/dist/command/ValueCommand.js.map +1 -0
- package/dist/command/ValueListCommand.d.ts +5 -0
- package/dist/command/ValueListCommand.js +38 -0
- package/dist/command/ValueListCommand.js.map +1 -0
- package/dist/command/cli.d.ts +2 -0
- package/dist/command/cli.js +30 -0
- package/dist/command/cli.js.map +1 -0
- package/dist/enum/InteractionStatus.d.ts +5 -0
- package/dist/enum/InteractionStatus.js +10 -0
- package/dist/enum/InteractionStatus.js.map +1 -0
- package/dist/enum/ModelModelCompany.d.ts +6 -0
- package/dist/enum/ModelModelCompany.js +11 -0
- package/dist/enum/ModelModelCompany.js.map +1 -0
- package/dist/enum/ModelModelName.d.ts +11 -0
- package/dist/enum/ModelModelName.js +16 -0
- package/dist/enum/ModelModelName.js.map +1 -0
- package/dist/index.d.ts +64 -0
- package/dist/index.js +81 -0
- package/dist/index.js.map +1 -0
- package/dist/meta/ModelCategoryMetaTable.d.ts +15 -0
- package/dist/meta/ModelCategoryMetaTable.js +39 -0
- package/dist/meta/ModelCategoryMetaTable.js.map +1 -0
- package/dist/meta/ModelFieldMetaTable.d.ts +16 -0
- package/dist/meta/ModelFieldMetaTable.js +39 -0
- package/dist/meta/ModelFieldMetaTable.js.map +1 -0
- package/dist/meta/ModelMetaTable.d.ts +62 -0
- package/dist/meta/ModelMetaTable.js +85 -0
- package/dist/meta/ModelMetaTable.js.map +1 -0
- package/dist/meta/ModelTagMetaTable.d.ts +16 -0
- package/dist/meta/ModelTagMetaTable.js +39 -0
- package/dist/meta/ModelTagMetaTable.js.map +1 -0
- package/dist/meta/NamirasoftInferenceMetaDatabase.d.ts +19 -0
- package/dist/meta/NamirasoftInferenceMetaDatabase.js +33 -0
- package/dist/meta/NamirasoftInferenceMetaDatabase.js.map +1 -0
- package/dist/row/EntityCategoryInputRow.d.ts +3 -0
- package/dist/row/EntityCategoryInputRow.js +3 -0
- package/dist/row/EntityCategoryInputRow.js.map +1 -0
- package/dist/row/EntityFieldInputRow.d.ts +4 -0
- package/dist/row/EntityFieldInputRow.js +3 -0
- package/dist/row/EntityFieldInputRow.js.map +1 -0
- package/dist/row/EntityTagInputRow.d.ts +4 -0
- package/dist/row/EntityTagInputRow.js +3 -0
- package/dist/row/EntityTagInputRow.js.map +1 -0
- package/dist/row/InteractionRow.d.ts +22 -0
- package/dist/row/InteractionRow.js +3 -0
- package/dist/row/InteractionRow.js.map +1 -0
- package/dist/row/ModelCategoryRow.d.ts +8 -0
- package/dist/row/ModelCategoryRow.js +3 -0
- package/dist/row/ModelCategoryRow.js.map +1 -0
- package/dist/row/ModelFieldRow.d.ts +9 -0
- package/dist/row/ModelFieldRow.js +3 -0
- package/dist/row/ModelFieldRow.js.map +1 -0
- package/dist/row/ModelInputRow.d.ts +20 -0
- package/dist/row/ModelInputRow.js +3 -0
- package/dist/row/ModelInputRow.js.map +1 -0
- package/dist/row/ModelRow.d.ts +57 -0
- package/dist/row/ModelRow.js +3 -0
- package/dist/row/ModelRow.js.map +1 -0
- package/dist/row/ModelTagRow.d.ts +9 -0
- package/dist/row/ModelTagRow.js +3 -0
- package/dist/row/ModelTagRow.js.map +1 -0
- package/dist/row/UsageSummaryResponseRow.d.ts +9 -0
- package/dist/row/UsageSummaryResponseRow.js +3 -0
- package/dist/row/UsageSummaryResponseRow.js.map +1 -0
- package/logo.png +0 -0
- package/package.json +28 -0
- package/src/NamirasoftInferenceServer.ts +57 -0
- package/src/NamirasoftInferenceServerBase.ts +30 -0
- package/src/NamirasoftInferenceServerHealth.ts +43 -0
- package/src/NamirasoftInferenceServerHealthz.ts +37 -0
- package/src/NamirasoftInferenceServerMetrics.ts +37 -0
- package/src/NamirasoftInferenceServerModel.ts +79 -0
- package/src/NamirasoftInferenceServerModelCategory.ts +64 -0
- package/src/NamirasoftInferenceServerModelField.ts +71 -0
- package/src/NamirasoftInferenceServerModelTag.ts +71 -0
- package/src/NamirasoftInferenceServerUsage.ts +39 -0
- package/src/NamirasoftInferenceServerValue.ts +38 -0
- package/src/command/HealthCommand.ts +34 -0
- package/src/command/HealthLivenessCommand.ts +45 -0
- package/src/command/HealthReadinessCommand.ts +45 -0
- package/src/command/HealthzCommand.ts +32 -0
- package/src/command/HealthzGetCommand.ts +45 -0
- package/src/command/MetricsCommand.ts +32 -0
- package/src/command/MetricsGetCommand.ts +45 -0
- package/src/command/ModelAskCommand.ts +83 -0
- package/src/command/ModelCategoryCommand.ts +38 -0
- package/src/command/ModelCategoryCreateCommand.ts +56 -0
- package/src/command/ModelCategoryDeleteCommand.ts +45 -0
- package/src/command/ModelCategoryGetCommand.ts +45 -0
- package/src/command/ModelCategoryListCommand.ts +45 -0
- package/src/command/ModelCommand.ts +42 -0
- package/src/command/ModelCreateCommand.ts +164 -0
- package/src/command/ModelDeleteCommand.ts +45 -0
- package/src/command/ModelFieldCommand.ts +40 -0
- package/src/command/ModelFieldCreateCommand.ts +65 -0
- package/src/command/ModelFieldDeleteCommand.ts +45 -0
- package/src/command/ModelFieldGetCommand.ts +45 -0
- package/src/command/ModelFieldListCommand.ts +45 -0
- package/src/command/ModelFieldUpdateCommand.ts +65 -0
- package/src/command/ModelGetCommand.ts +45 -0
- package/src/command/ModelListCommand.ts +45 -0
- package/src/command/ModelTagCommand.ts +40 -0
- package/src/command/ModelTagCreateCommand.ts +65 -0
- package/src/command/ModelTagDeleteCommand.ts +45 -0
- package/src/command/ModelTagGetCommand.ts +45 -0
- package/src/command/ModelTagListCommand.ts +45 -0
- package/src/command/ModelTagUpdateCommand.ts +65 -0
- package/src/command/ModelUpdateCommand.ts +164 -0
- package/src/command/UsageCommand.ts +32 -0
- package/src/command/UsageSummaryCommand.ts +45 -0
- package/src/command/ValueCommand.ts +32 -0
- package/src/command/ValueListCommand.ts +45 -0
- package/src/command/cli.ts +49 -0
- package/src/enum/InteractionStatus.ts +26 -0
- package/src/enum/ModelModelCompany.ts +27 -0
- package/src/enum/ModelModelName.ts +32 -0
- package/src/index.ts +84 -0
- package/src/meta/ModelCategoryMetaTable.ts +60 -0
- package/src/meta/ModelFieldMetaTable.ts +61 -0
- package/src/meta/ModelMetaTable.ts +153 -0
- package/src/meta/ModelTagMetaTable.ts +61 -0
- package/src/meta/NamirasoftInferenceMetaDatabase.ts +60 -0
- package/src/row/EntityCategoryInputRow.ts +24 -0
- package/src/row/EntityFieldInputRow.ts +25 -0
- package/src/row/EntityTagInputRow.ts +25 -0
- package/src/row/InteractionRow.ts +44 -0
- package/src/row/ModelCategoryRow.ts +29 -0
- package/src/row/ModelFieldRow.ts +30 -0
- package/src/row/ModelInputRow.ts +42 -0
- package/src/row/ModelRow.ts +79 -0
- package/src/row/ModelTagRow.ts +30 -0
- package/src/row/UsageSummaryResponseRow.ts +30 -0
- package/tsconfig.json +45 -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 ModelDeleteCommand 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 account config \nor \nns-inference 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.model.Delete(this.arg_values[0]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
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 { ModelFieldCreateCommand } from "./ModelFieldCreateCommand";
|
|
23
|
+
import { ModelFieldDeleteCommand } from "./ModelFieldDeleteCommand";
|
|
24
|
+
import { ModelFieldGetCommand } from "./ModelFieldGetCommand";
|
|
25
|
+
import { ModelFieldListCommand } from "./ModelFieldListCommand";
|
|
26
|
+
import { ModelFieldUpdateCommand } from "./ModelFieldUpdateCommand";
|
|
27
|
+
|
|
28
|
+
export class ModelFieldCommand extends BaseNavigatorCommand
|
|
29
|
+
{
|
|
30
|
+
constructor(argv: string[])
|
|
31
|
+
{
|
|
32
|
+
super(argv, {
|
|
33
|
+
"list": ModelFieldListCommand,
|
|
34
|
+
"get": ModelFieldGetCommand,
|
|
35
|
+
"create": ModelFieldCreateCommand,
|
|
36
|
+
"update": ModelFieldUpdateCommand,
|
|
37
|
+
"delete": ModelFieldDeleteCommand,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
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 ModelFieldCreateCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, [], [
|
|
31
|
+
{
|
|
32
|
+
name: "field_id",
|
|
33
|
+
short: "",
|
|
34
|
+
description: "Provides the value of 'field_id' in body",
|
|
35
|
+
optional: false,
|
|
36
|
+
args: ["field_id"],
|
|
37
|
+
defaults: [""]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "value",
|
|
41
|
+
short: "",
|
|
42
|
+
description: "Provides the value of 'value' in body",
|
|
43
|
+
optional: true,
|
|
44
|
+
args: ["value"],
|
|
45
|
+
defaults: [""]
|
|
46
|
+
}
|
|
47
|
+
]);
|
|
48
|
+
}
|
|
49
|
+
override async exec()
|
|
50
|
+
{
|
|
51
|
+
let token = this.app.storage.getNSAToken();
|
|
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.");
|
|
54
|
+
let storage = new IStorageMemoryDedicated();
|
|
55
|
+
let token_manager = new TokenManager(storage, () => { });
|
|
56
|
+
token_manager.setValue(token, false);
|
|
57
|
+
let url = this.app.storage.getItem("ns-inference-server-url");
|
|
58
|
+
let server = new NamirasoftInferenceServer(url, token_manager, e => this.app.logger.error(e.message));
|
|
59
|
+
let ans = await server.model_field.Create({
|
|
60
|
+
field_id: this.option_values.field_id,
|
|
61
|
+
value: this.option_values.value
|
|
62
|
+
});
|
|
63
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
64
|
+
}
|
|
65
|
+
};
|
|
@@ -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 ModelFieldDeleteCommand 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 account config \nor \nns-inference 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.model_field.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 ModelFieldGetCommand 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 account config \nor \nns-inference 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.model_field.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 ModelFieldListCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["filters", "page", "size", "sorts"], []);
|
|
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 account config \nor \nns-inference 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.model_field.List(this.arg_values[0], this.arg_values[1], this.arg_values[2], this.arg_values[3]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
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 ModelFieldUpdateCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["id"], [
|
|
31
|
+
{
|
|
32
|
+
name: "field_id",
|
|
33
|
+
short: "",
|
|
34
|
+
description: "Provides the value of 'field_id' in body",
|
|
35
|
+
optional: false,
|
|
36
|
+
args: ["field_id"],
|
|
37
|
+
defaults: [""]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "value",
|
|
41
|
+
short: "",
|
|
42
|
+
description: "Provides the value of 'value' in body",
|
|
43
|
+
optional: true,
|
|
44
|
+
args: ["value"],
|
|
45
|
+
defaults: [""]
|
|
46
|
+
}
|
|
47
|
+
]);
|
|
48
|
+
}
|
|
49
|
+
override async exec()
|
|
50
|
+
{
|
|
51
|
+
let token = this.app.storage.getNSAToken();
|
|
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.");
|
|
54
|
+
let storage = new IStorageMemoryDedicated();
|
|
55
|
+
let token_manager = new TokenManager(storage, () => { });
|
|
56
|
+
token_manager.setValue(token, false);
|
|
57
|
+
let url = this.app.storage.getItem("ns-inference-server-url");
|
|
58
|
+
let server = new NamirasoftInferenceServer(url, token_manager, e => this.app.logger.error(e.message));
|
|
59
|
+
let ans = await server.model_field.Update(this.arg_values[0], {
|
|
60
|
+
field_id: this.option_values.field_id,
|
|
61
|
+
value: this.option_values.value
|
|
62
|
+
});
|
|
63
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
64
|
+
}
|
|
65
|
+
};
|
|
@@ -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 ModelGetCommand 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 account config \nor \nns-inference 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.model.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 ModelListCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["filters", "page", "size", "sorts"], []);
|
|
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 account config \nor \nns-inference 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.model.List(this.arg_values[0], this.arg_values[1], this.arg_values[2], this.arg_values[3]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
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 { ModelTagCreateCommand } from "./ModelTagCreateCommand";
|
|
23
|
+
import { ModelTagDeleteCommand } from "./ModelTagDeleteCommand";
|
|
24
|
+
import { ModelTagGetCommand } from "./ModelTagGetCommand";
|
|
25
|
+
import { ModelTagListCommand } from "./ModelTagListCommand";
|
|
26
|
+
import { ModelTagUpdateCommand } from "./ModelTagUpdateCommand";
|
|
27
|
+
|
|
28
|
+
export class ModelTagCommand extends BaseNavigatorCommand
|
|
29
|
+
{
|
|
30
|
+
constructor(argv: string[])
|
|
31
|
+
{
|
|
32
|
+
super(argv, {
|
|
33
|
+
"list": ModelTagListCommand,
|
|
34
|
+
"get": ModelTagGetCommand,
|
|
35
|
+
"create": ModelTagCreateCommand,
|
|
36
|
+
"update": ModelTagUpdateCommand,
|
|
37
|
+
"delete": ModelTagDeleteCommand,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
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 ModelTagCreateCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, [], [
|
|
31
|
+
{
|
|
32
|
+
name: "name",
|
|
33
|
+
short: "",
|
|
34
|
+
description: "Provides the value of 'name' in body",
|
|
35
|
+
optional: false,
|
|
36
|
+
args: ["name"],
|
|
37
|
+
defaults: [""]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "value",
|
|
41
|
+
short: "",
|
|
42
|
+
description: "Provides the value of 'value' in body",
|
|
43
|
+
optional: true,
|
|
44
|
+
args: ["value"],
|
|
45
|
+
defaults: [""]
|
|
46
|
+
}
|
|
47
|
+
]);
|
|
48
|
+
}
|
|
49
|
+
override async exec()
|
|
50
|
+
{
|
|
51
|
+
let token = this.app.storage.getNSAToken();
|
|
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.");
|
|
54
|
+
let storage = new IStorageMemoryDedicated();
|
|
55
|
+
let token_manager = new TokenManager(storage, () => { });
|
|
56
|
+
token_manager.setValue(token, false);
|
|
57
|
+
let url = this.app.storage.getItem("ns-inference-server-url");
|
|
58
|
+
let server = new NamirasoftInferenceServer(url, token_manager, e => this.app.logger.error(e.message));
|
|
59
|
+
let ans = await server.model_tag.Create({
|
|
60
|
+
name: this.option_values.name,
|
|
61
|
+
value: this.option_values.value
|
|
62
|
+
});
|
|
63
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
64
|
+
}
|
|
65
|
+
};
|
|
@@ -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 ModelTagDeleteCommand 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 account config \nor \nns-inference 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.model_tag.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 ModelTagGetCommand 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 account config \nor \nns-inference 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.model_tag.Get(this.arg_values[0]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|