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,43 @@
|
|
|
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 { BaseServerConfig } from "namirasoft-core";
|
|
22
|
+
import { NamirasoftInferenceServer } from "./NamirasoftInferenceServer";
|
|
23
|
+
import { NamirasoftInferenceServerBase } from "./NamirasoftInferenceServerBase";
|
|
24
|
+
|
|
25
|
+
export class NamirasoftInferenceServerHealth extends NamirasoftInferenceServerBase
|
|
26
|
+
{
|
|
27
|
+
constructor(server: NamirasoftInferenceServer)
|
|
28
|
+
{
|
|
29
|
+
super(server);
|
|
30
|
+
this.Liveness = this.Liveness.bind(this);
|
|
31
|
+
this.Readiness = this.Readiness.bind(this);
|
|
32
|
+
}
|
|
33
|
+
async Liveness(config?: BaseServerConfig<any>): Promise<void>
|
|
34
|
+
{
|
|
35
|
+
let path = `/health/liveness`;
|
|
36
|
+
await this.server._get<void>(path, {}, config);
|
|
37
|
+
}
|
|
38
|
+
async Readiness(config?: BaseServerConfig<any>): Promise<void>
|
|
39
|
+
{
|
|
40
|
+
let path = `/health/readiness`;
|
|
41
|
+
await this.server._get<void>(path, {}, config);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
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 { BaseServerConfig } from "namirasoft-core";
|
|
22
|
+
import { NamirasoftInferenceServer } from "./NamirasoftInferenceServer";
|
|
23
|
+
import { NamirasoftInferenceServerBase } from "./NamirasoftInferenceServerBase";
|
|
24
|
+
|
|
25
|
+
export class NamirasoftInferenceServerHealthz extends NamirasoftInferenceServerBase
|
|
26
|
+
{
|
|
27
|
+
constructor(server: NamirasoftInferenceServer)
|
|
28
|
+
{
|
|
29
|
+
super(server);
|
|
30
|
+
this.Get = this.Get.bind(this);
|
|
31
|
+
}
|
|
32
|
+
async Get(config?: BaseServerConfig<any>): Promise<void>
|
|
33
|
+
{
|
|
34
|
+
let path = `/healthz`;
|
|
35
|
+
await this.server._get<void>(path, {}, config);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
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 { BaseServerConfig } from "namirasoft-core";
|
|
22
|
+
import { NamirasoftInferenceServer } from "./NamirasoftInferenceServer";
|
|
23
|
+
import { NamirasoftInferenceServerBase } from "./NamirasoftInferenceServerBase";
|
|
24
|
+
|
|
25
|
+
export class NamirasoftInferenceServerMetrics extends NamirasoftInferenceServerBase
|
|
26
|
+
{
|
|
27
|
+
constructor(server: NamirasoftInferenceServer)
|
|
28
|
+
{
|
|
29
|
+
super(server);
|
|
30
|
+
this.Get = this.Get.bind(this);
|
|
31
|
+
}
|
|
32
|
+
async Get(config?: BaseServerConfig<any>): Promise<void>
|
|
33
|
+
{
|
|
34
|
+
let path = `/metrics`;
|
|
35
|
+
await this.server._get<void>(path, {}, config);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
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 { BaseServerConfig } from "namirasoft-core";
|
|
22
|
+
import { FilterItem } from "namirasoft-core";
|
|
23
|
+
import { InteractionRow } from "./row/InteractionRow";
|
|
24
|
+
import { ModelInputRow } from "./row/ModelInputRow";
|
|
25
|
+
import { ModelRow } from "./row/ModelRow";
|
|
26
|
+
import { NamirasoftInferenceServer } from "./NamirasoftInferenceServer";
|
|
27
|
+
import { NamirasoftInferenceServerBase } from "./NamirasoftInferenceServerBase";
|
|
28
|
+
import { SortItem } from "namirasoft-core";
|
|
29
|
+
|
|
30
|
+
export class NamirasoftInferenceServerModel extends NamirasoftInferenceServerBase
|
|
31
|
+
{
|
|
32
|
+
constructor(server: NamirasoftInferenceServer)
|
|
33
|
+
{
|
|
34
|
+
super(server);
|
|
35
|
+
this.List = this.List.bind(this);
|
|
36
|
+
this.Get = this.Get.bind(this);
|
|
37
|
+
this.Create = this.Create.bind(this);
|
|
38
|
+
this.Update = this.Update.bind(this);
|
|
39
|
+
this.Delete = this.Delete.bind(this);
|
|
40
|
+
this.Ask = this.Ask.bind(this);
|
|
41
|
+
}
|
|
42
|
+
async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], config?: BaseServerConfig<any>): Promise<{ rows: ModelRow[], count: number }>
|
|
43
|
+
{
|
|
44
|
+
let filters_string_value: string = FilterItem.stringify(filters);
|
|
45
|
+
let sorts_string_value: string = SortItem.stringify(sorts);
|
|
46
|
+
let path = `/model/list`;
|
|
47
|
+
let { data } = await this.server._get<{ rows: ModelRow[], count: number }>(path, { filters: filters_string_value, page, size, sorts: sorts_string_value }, config);
|
|
48
|
+
return data;
|
|
49
|
+
}
|
|
50
|
+
async Get(id: (string | null), config?: BaseServerConfig<any>): Promise<ModelRow>
|
|
51
|
+
{
|
|
52
|
+
let path = `/model/${id}`;
|
|
53
|
+
let { data } = await this.server._get<ModelRow>(path, {}, config);
|
|
54
|
+
return data;
|
|
55
|
+
}
|
|
56
|
+
async Create(body: ModelInputRow, config?: BaseServerConfig<any>): Promise<ModelRow>
|
|
57
|
+
{
|
|
58
|
+
let path = `/model`;
|
|
59
|
+
let { data } = await this.server._post<ModelRow>(path, {}, body, config);
|
|
60
|
+
return data;
|
|
61
|
+
}
|
|
62
|
+
async Update(id: (string | null), body: ModelInputRow, config?: BaseServerConfig<any>): Promise<ModelRow>
|
|
63
|
+
{
|
|
64
|
+
let path = `/model/${id}`;
|
|
65
|
+
let { data } = await this.server._put<ModelRow>(path, {}, body, config);
|
|
66
|
+
return data;
|
|
67
|
+
}
|
|
68
|
+
async Delete(id: string, config?: BaseServerConfig<any>): Promise<void>
|
|
69
|
+
{
|
|
70
|
+
let path = `/model/${id}`;
|
|
71
|
+
await this.server._delete<void>(path, {}, config);
|
|
72
|
+
}
|
|
73
|
+
async Ask(model_id: string, body: { chat_id: (string | null), run_id: (string | null), message: string, memory_limit: (number | null) }, config?: BaseServerConfig<any>): Promise<InteractionRow>
|
|
74
|
+
{
|
|
75
|
+
let path = `/model/${model_id}/ask`;
|
|
76
|
+
let { data } = await this.server._post<InteractionRow>(path, {}, body, config);
|
|
77
|
+
return data;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
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 { BaseServerConfig } from "namirasoft-core";
|
|
22
|
+
import { EntityCategoryInputRow } from "./row/EntityCategoryInputRow";
|
|
23
|
+
import { FilterItem } from "namirasoft-core";
|
|
24
|
+
import { ModelCategoryRow } from "./row/ModelCategoryRow";
|
|
25
|
+
import { NamirasoftInferenceServer } from "./NamirasoftInferenceServer";
|
|
26
|
+
import { NamirasoftInferenceServerBase } from "./NamirasoftInferenceServerBase";
|
|
27
|
+
import { SortItem } from "namirasoft-core";
|
|
28
|
+
|
|
29
|
+
export class NamirasoftInferenceServerModelCategory extends NamirasoftInferenceServerBase
|
|
30
|
+
{
|
|
31
|
+
constructor(server: NamirasoftInferenceServer)
|
|
32
|
+
{
|
|
33
|
+
super(server);
|
|
34
|
+
this.List = this.List.bind(this);
|
|
35
|
+
this.Get = this.Get.bind(this);
|
|
36
|
+
this.Create = this.Create.bind(this);
|
|
37
|
+
this.Delete = this.Delete.bind(this);
|
|
38
|
+
}
|
|
39
|
+
async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], config?: BaseServerConfig<any>): Promise<{ rows: ModelCategoryRow[], count: number }>
|
|
40
|
+
{
|
|
41
|
+
let filters_string_value: string = FilterItem.stringify(filters);
|
|
42
|
+
let sorts_string_value: string = SortItem.stringify(sorts);
|
|
43
|
+
let path = `model/category/list`;
|
|
44
|
+
let { data } = await this.server._get<{ rows: ModelCategoryRow[], count: number }>(path, { filters: filters_string_value, page, size, sorts: sorts_string_value }, config);
|
|
45
|
+
return data;
|
|
46
|
+
}
|
|
47
|
+
async Get(id: string, config?: BaseServerConfig<any>): Promise<ModelCategoryRow>
|
|
48
|
+
{
|
|
49
|
+
let path = `model/category/${id}`;
|
|
50
|
+
let { data } = await this.server._get<ModelCategoryRow>(path, {}, config);
|
|
51
|
+
return data;
|
|
52
|
+
}
|
|
53
|
+
async Create(body: EntityCategoryInputRow, config?: BaseServerConfig<any>): Promise<ModelCategoryRow>
|
|
54
|
+
{
|
|
55
|
+
let path = `model/category`;
|
|
56
|
+
let { data } = await this.server._post<ModelCategoryRow>(path, {}, body, config);
|
|
57
|
+
return data;
|
|
58
|
+
}
|
|
59
|
+
async Delete(id: number, config?: BaseServerConfig<any>): Promise<void>
|
|
60
|
+
{
|
|
61
|
+
let path = `model/category/${id}`;
|
|
62
|
+
await this.server._delete<void>(path, {}, config);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
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 { BaseServerConfig } from "namirasoft-core";
|
|
22
|
+
import { EntityFieldInputRow } from "./row/EntityFieldInputRow";
|
|
23
|
+
import { FilterItem } from "namirasoft-core";
|
|
24
|
+
import { ModelFieldRow } from "./row/ModelFieldRow";
|
|
25
|
+
import { NamirasoftInferenceServer } from "./NamirasoftInferenceServer";
|
|
26
|
+
import { NamirasoftInferenceServerBase } from "./NamirasoftInferenceServerBase";
|
|
27
|
+
import { SortItem } from "namirasoft-core";
|
|
28
|
+
|
|
29
|
+
export class NamirasoftInferenceServerModelField extends NamirasoftInferenceServerBase
|
|
30
|
+
{
|
|
31
|
+
constructor(server: NamirasoftInferenceServer)
|
|
32
|
+
{
|
|
33
|
+
super(server);
|
|
34
|
+
this.List = this.List.bind(this);
|
|
35
|
+
this.Get = this.Get.bind(this);
|
|
36
|
+
this.Create = this.Create.bind(this);
|
|
37
|
+
this.Update = this.Update.bind(this);
|
|
38
|
+
this.Delete = this.Delete.bind(this);
|
|
39
|
+
}
|
|
40
|
+
async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], config?: BaseServerConfig<any>): Promise<{ rows: ModelFieldRow[], count: number }>
|
|
41
|
+
{
|
|
42
|
+
let filters_string_value: string = FilterItem.stringify(filters);
|
|
43
|
+
let sorts_string_value: string = SortItem.stringify(sorts);
|
|
44
|
+
let path = `model/field/list`;
|
|
45
|
+
let { data } = await this.server._get<{ rows: ModelFieldRow[], count: number }>(path, { filters: filters_string_value, page, size, sorts: sorts_string_value }, config);
|
|
46
|
+
return data;
|
|
47
|
+
}
|
|
48
|
+
async Get(id: string, config?: BaseServerConfig<any>): Promise<ModelFieldRow>
|
|
49
|
+
{
|
|
50
|
+
let path = `model/field/${id}`;
|
|
51
|
+
let { data } = await this.server._get<ModelFieldRow>(path, {}, config);
|
|
52
|
+
return data;
|
|
53
|
+
}
|
|
54
|
+
async Create(body: EntityFieldInputRow, config?: BaseServerConfig<any>): Promise<ModelFieldRow>
|
|
55
|
+
{
|
|
56
|
+
let path = `model/field`;
|
|
57
|
+
let { data } = await this.server._post<ModelFieldRow>(path, {}, body, config);
|
|
58
|
+
return data;
|
|
59
|
+
}
|
|
60
|
+
async Update(id: number, body: EntityFieldInputRow, config?: BaseServerConfig<any>): Promise<ModelFieldRow>
|
|
61
|
+
{
|
|
62
|
+
let path = `model/field/${id}`;
|
|
63
|
+
let { data } = await this.server._put<ModelFieldRow>(path, {}, body, config);
|
|
64
|
+
return data;
|
|
65
|
+
}
|
|
66
|
+
async Delete(id: number, config?: BaseServerConfig<any>): Promise<void>
|
|
67
|
+
{
|
|
68
|
+
let path = `model/field/${id}`;
|
|
69
|
+
await this.server._delete<void>(path, {}, config);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
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 { BaseServerConfig } from "namirasoft-core";
|
|
22
|
+
import { EntityTagInputRow } from "./row/EntityTagInputRow";
|
|
23
|
+
import { FilterItem } from "namirasoft-core";
|
|
24
|
+
import { ModelTagRow } from "./row/ModelTagRow";
|
|
25
|
+
import { NamirasoftInferenceServer } from "./NamirasoftInferenceServer";
|
|
26
|
+
import { NamirasoftInferenceServerBase } from "./NamirasoftInferenceServerBase";
|
|
27
|
+
import { SortItem } from "namirasoft-core";
|
|
28
|
+
|
|
29
|
+
export class NamirasoftInferenceServerModelTag extends NamirasoftInferenceServerBase
|
|
30
|
+
{
|
|
31
|
+
constructor(server: NamirasoftInferenceServer)
|
|
32
|
+
{
|
|
33
|
+
super(server);
|
|
34
|
+
this.List = this.List.bind(this);
|
|
35
|
+
this.Get = this.Get.bind(this);
|
|
36
|
+
this.Create = this.Create.bind(this);
|
|
37
|
+
this.Update = this.Update.bind(this);
|
|
38
|
+
this.Delete = this.Delete.bind(this);
|
|
39
|
+
}
|
|
40
|
+
async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], config?: BaseServerConfig<any>): Promise<{ rows: ModelTagRow[], count: number }>
|
|
41
|
+
{
|
|
42
|
+
let filters_string_value: string = FilterItem.stringify(filters);
|
|
43
|
+
let sorts_string_value: string = SortItem.stringify(sorts);
|
|
44
|
+
let path = `model/tag/list`;
|
|
45
|
+
let { data } = await this.server._get<{ rows: ModelTagRow[], count: number }>(path, { filters: filters_string_value, page, size, sorts: sorts_string_value }, config);
|
|
46
|
+
return data;
|
|
47
|
+
}
|
|
48
|
+
async Get(id: string, config?: BaseServerConfig<any>): Promise<ModelTagRow>
|
|
49
|
+
{
|
|
50
|
+
let path = `model/tag/${id}`;
|
|
51
|
+
let { data } = await this.server._get<ModelTagRow>(path, {}, config);
|
|
52
|
+
return data;
|
|
53
|
+
}
|
|
54
|
+
async Create(body: EntityTagInputRow, config?: BaseServerConfig<any>): Promise<ModelTagRow>
|
|
55
|
+
{
|
|
56
|
+
let path = `model/tag`;
|
|
57
|
+
let { data } = await this.server._post<ModelTagRow>(path, {}, body, config);
|
|
58
|
+
return data;
|
|
59
|
+
}
|
|
60
|
+
async Update(id: number, body: EntityTagInputRow, config?: BaseServerConfig<any>): Promise<ModelTagRow>
|
|
61
|
+
{
|
|
62
|
+
let path = `model/tag/${id}`;
|
|
63
|
+
let { data } = await this.server._put<ModelTagRow>(path, {}, body, config);
|
|
64
|
+
return data;
|
|
65
|
+
}
|
|
66
|
+
async Delete(id: number, config?: BaseServerConfig<any>): Promise<void>
|
|
67
|
+
{
|
|
68
|
+
let path = `model/tag/${id}`;
|
|
69
|
+
await this.server._delete<void>(path, {}, config);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
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 { BaseServerConfig } from "namirasoft-core";
|
|
22
|
+
import { NamirasoftInferenceServer } from "./NamirasoftInferenceServer";
|
|
23
|
+
import { NamirasoftInferenceServerBase } from "./NamirasoftInferenceServerBase";
|
|
24
|
+
import { UsageSummaryResponseRow } from "./row/UsageSummaryResponseRow";
|
|
25
|
+
|
|
26
|
+
export class NamirasoftInferenceServerUsage extends NamirasoftInferenceServerBase
|
|
27
|
+
{
|
|
28
|
+
constructor(server: NamirasoftInferenceServer)
|
|
29
|
+
{
|
|
30
|
+
super(server);
|
|
31
|
+
this.Summary = this.Summary.bind(this);
|
|
32
|
+
}
|
|
33
|
+
async Summary(model_id: (string | null), started_at: string, ended_at: string, config?: BaseServerConfig<any>): Promise<UsageSummaryResponseRow>
|
|
34
|
+
{
|
|
35
|
+
let path = `/usage/summary`;
|
|
36
|
+
let { data } = await this.server._get<UsageSummaryResponseRow>(path, { model_id, started_at, ended_at }, config);
|
|
37
|
+
return data;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
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 { BaseServerConfig } from "namirasoft-core";
|
|
22
|
+
import { NamirasoftInferenceServer } from "./NamirasoftInferenceServer";
|
|
23
|
+
import { NamirasoftInferenceServerBase } from "./NamirasoftInferenceServerBase";
|
|
24
|
+
|
|
25
|
+
export class NamirasoftInferenceServerValue extends NamirasoftInferenceServerBase
|
|
26
|
+
{
|
|
27
|
+
constructor(server: NamirasoftInferenceServer)
|
|
28
|
+
{
|
|
29
|
+
super(server);
|
|
30
|
+
this.List = this.List.bind(this);
|
|
31
|
+
}
|
|
32
|
+
async List(table: string, column: string, search: (string | null), field_id: (string | null), limit: (number | null), config?: BaseServerConfig<any>): Promise<string[]>
|
|
33
|
+
{
|
|
34
|
+
let path = `/value/list/${table}/${column}`;
|
|
35
|
+
let { data } = await this.server._get<string[]>(path, { search, field_id, limit }, config);
|
|
36
|
+
return data;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
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 { HealthLivenessCommand } from "./HealthLivenessCommand";
|
|
23
|
+
import { HealthReadinessCommand } from "./HealthReadinessCommand";
|
|
24
|
+
|
|
25
|
+
export class HealthCommand extends BaseNavigatorCommand
|
|
26
|
+
{
|
|
27
|
+
constructor(argv: string[])
|
|
28
|
+
{
|
|
29
|
+
super(argv, {
|
|
30
|
+
"liveness": HealthLivenessCommand,
|
|
31
|
+
"readiness": HealthReadinessCommand,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
};
|
|
@@ -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 HealthLivenessCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, [], []);
|
|
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.health.Liveness();
|
|
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 HealthReadinessCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, [], []);
|
|
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.health.Readiness();
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
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 { HealthzGetCommand } from "./HealthzGetCommand";
|
|
23
|
+
|
|
24
|
+
export class HealthzCommand extends BaseNavigatorCommand
|
|
25
|
+
{
|
|
26
|
+
constructor(argv: string[])
|
|
27
|
+
{
|
|
28
|
+
super(argv, {
|
|
29
|
+
"get": HealthzGetCommand,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
};
|