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.
Files changed (207) hide show
  1. package/dist/NamirasoftInferenceServer.d.ts +4 -0
  2. package/dist/NamirasoftInferenceServer.js +5 -1
  3. package/dist/NamirasoftInferenceServer.js.map +1 -1
  4. package/dist/NamirasoftInferenceServerLLM.d.ts +8 -0
  5. package/dist/NamirasoftInferenceServerLLM.js +29 -0
  6. package/dist/NamirasoftInferenceServerLLM.js.map +1 -0
  7. package/dist/NamirasoftInferenceServerLoadBalancer.d.ts +26 -0
  8. package/dist/NamirasoftInferenceServerLoadBalancer.js +72 -0
  9. package/dist/NamirasoftInferenceServerLoadBalancer.js.map +1 -0
  10. package/dist/NamirasoftInferenceServerModel.d.ts +1 -1
  11. package/dist/NamirasoftInferenceServerModel.js +2 -2
  12. package/dist/NamirasoftInferenceServerModel.js.map +1 -1
  13. package/dist/NamirasoftInferenceServerModelCategory.d.ts +1 -1
  14. package/dist/NamirasoftInferenceServerModelCategory.js +2 -2
  15. package/dist/NamirasoftInferenceServerModelCategory.js.map +1 -1
  16. package/dist/NamirasoftInferenceServerModelField.d.ts +1 -1
  17. package/dist/NamirasoftInferenceServerModelField.js +2 -2
  18. package/dist/NamirasoftInferenceServerModelField.js.map +1 -1
  19. package/dist/NamirasoftInferenceServerModelTag.d.ts +1 -1
  20. package/dist/NamirasoftInferenceServerModelTag.js +2 -2
  21. package/dist/NamirasoftInferenceServerModelTag.js.map +1 -1
  22. package/dist/command/HealthLivenessCommand.js +1 -1
  23. package/dist/command/HealthLivenessCommand.js.map +1 -1
  24. package/dist/command/HealthReadinessCommand.js +1 -1
  25. package/dist/command/HealthReadinessCommand.js.map +1 -1
  26. package/dist/command/HealthzGetCommand.js +1 -1
  27. package/dist/command/HealthzGetCommand.js.map +1 -1
  28. package/dist/command/LLMCommand.d.ts +4 -0
  29. package/dist/command/LLMCommand.js +15 -0
  30. package/dist/command/LLMCommand.js.map +1 -0
  31. package/dist/command/LLMListCommand.d.ts +5 -0
  32. package/dist/command/LLMListCommand.js +38 -0
  33. package/dist/command/LLMListCommand.js.map +1 -0
  34. package/dist/command/LoadBalancerAskCommand.d.ts +5 -0
  35. package/dist/command/LoadBalancerAskCommand.js +76 -0
  36. package/dist/command/LoadBalancerAskCommand.js.map +1 -0
  37. package/dist/command/LoadBalancerCommand.d.ts +4 -0
  38. package/dist/command/LoadBalancerCommand.js +25 -0
  39. package/dist/command/LoadBalancerCommand.js.map +1 -0
  40. package/dist/command/LoadBalancerCreateCommand.d.ts +5 -0
  41. package/dist/command/LoadBalancerCreateCommand.js +85 -0
  42. package/dist/command/LoadBalancerCreateCommand.js.map +1 -0
  43. package/dist/command/LoadBalancerDeleteCommand.d.ts +5 -0
  44. package/dist/command/LoadBalancerDeleteCommand.js +38 -0
  45. package/dist/command/LoadBalancerDeleteCommand.js.map +1 -0
  46. package/dist/command/LoadBalancerGetCommand.d.ts +5 -0
  47. package/dist/command/LoadBalancerGetCommand.js +38 -0
  48. package/dist/command/LoadBalancerGetCommand.js.map +1 -0
  49. package/dist/command/LoadBalancerListCommand.d.ts +5 -0
  50. package/dist/command/LoadBalancerListCommand.js +38 -0
  51. package/dist/command/LoadBalancerListCommand.js.map +1 -0
  52. package/dist/command/LoadBalancerUpdateCommand.d.ts +5 -0
  53. package/dist/command/LoadBalancerUpdateCommand.js +85 -0
  54. package/dist/command/LoadBalancerUpdateCommand.js.map +1 -0
  55. package/dist/command/MetricsGetCommand.js +1 -1
  56. package/dist/command/MetricsGetCommand.js.map +1 -1
  57. package/dist/command/ModelAskCommand.js +1 -1
  58. package/dist/command/ModelAskCommand.js.map +1 -1
  59. package/dist/command/ModelCategoryCreateCommand.js +1 -1
  60. package/dist/command/ModelCategoryCreateCommand.js.map +1 -1
  61. package/dist/command/ModelCategoryDeleteCommand.js +1 -1
  62. package/dist/command/ModelCategoryDeleteCommand.js.map +1 -1
  63. package/dist/command/ModelCategoryGetCommand.js +1 -1
  64. package/dist/command/ModelCategoryGetCommand.js.map +1 -1
  65. package/dist/command/ModelCategoryListCommand.js +3 -3
  66. package/dist/command/ModelCategoryListCommand.js.map +1 -1
  67. package/dist/command/ModelCreateCommand.js +1 -1
  68. package/dist/command/ModelCreateCommand.js.map +1 -1
  69. package/dist/command/ModelDeleteCommand.js +1 -1
  70. package/dist/command/ModelDeleteCommand.js.map +1 -1
  71. package/dist/command/ModelFieldCreateCommand.js +1 -1
  72. package/dist/command/ModelFieldCreateCommand.js.map +1 -1
  73. package/dist/command/ModelFieldDeleteCommand.js +1 -1
  74. package/dist/command/ModelFieldDeleteCommand.js.map +1 -1
  75. package/dist/command/ModelFieldGetCommand.js +1 -1
  76. package/dist/command/ModelFieldGetCommand.js.map +1 -1
  77. package/dist/command/ModelFieldListCommand.js +3 -3
  78. package/dist/command/ModelFieldListCommand.js.map +1 -1
  79. package/dist/command/ModelFieldUpdateCommand.js +1 -1
  80. package/dist/command/ModelFieldUpdateCommand.js.map +1 -1
  81. package/dist/command/ModelGetCommand.js +1 -1
  82. package/dist/command/ModelGetCommand.js.map +1 -1
  83. package/dist/command/ModelListCommand.js +3 -3
  84. package/dist/command/ModelListCommand.js.map +1 -1
  85. package/dist/command/ModelTagCreateCommand.js +1 -1
  86. package/dist/command/ModelTagCreateCommand.js.map +1 -1
  87. package/dist/command/ModelTagDeleteCommand.js +1 -1
  88. package/dist/command/ModelTagDeleteCommand.js.map +1 -1
  89. package/dist/command/ModelTagGetCommand.js +1 -1
  90. package/dist/command/ModelTagGetCommand.js.map +1 -1
  91. package/dist/command/ModelTagListCommand.js +3 -3
  92. package/dist/command/ModelTagListCommand.js.map +1 -1
  93. package/dist/command/ModelTagUpdateCommand.js +1 -1
  94. package/dist/command/ModelTagUpdateCommand.js.map +1 -1
  95. package/dist/command/ModelUpdateCommand.js +1 -1
  96. package/dist/command/ModelUpdateCommand.js.map +1 -1
  97. package/dist/command/UsageSummaryCommand.js +1 -1
  98. package/dist/command/UsageSummaryCommand.js.map +1 -1
  99. package/dist/command/ValueListCommand.js +1 -1
  100. package/dist/command/ValueListCommand.js.map +1 -1
  101. package/dist/command/cli.js +5 -1
  102. package/dist/command/cli.js.map +1 -1
  103. package/dist/enum/LoadBalancerAlgorithm.d.ts +5 -0
  104. package/dist/enum/LoadBalancerAlgorithm.js +10 -0
  105. package/dist/enum/LoadBalancerAlgorithm.js.map +1 -0
  106. package/dist/enum/ModelCompanyType.d.ts +6 -0
  107. package/dist/enum/ModelCompanyType.js +11 -0
  108. package/dist/enum/ModelCompanyType.js.map +1 -0
  109. package/dist/index.d.ts +21 -0
  110. package/dist/index.js +21 -0
  111. package/dist/index.js.map +1 -1
  112. package/dist/meta/LoadBalancerMetaTable.d.ts +17 -0
  113. package/dist/meta/LoadBalancerMetaTable.js +40 -0
  114. package/dist/meta/LoadBalancerMetaTable.js.map +1 -0
  115. package/dist/meta/ModelCategoryMetaTable.js +1 -1
  116. package/dist/meta/ModelCategoryMetaTable.js.map +1 -1
  117. package/dist/meta/ModelFieldMetaTable.js +1 -1
  118. package/dist/meta/ModelFieldMetaTable.js.map +1 -1
  119. package/dist/meta/ModelMetaTable.js +1 -1
  120. package/dist/meta/ModelMetaTable.js.map +1 -1
  121. package/dist/meta/ModelTagMetaTable.js +1 -1
  122. package/dist/meta/ModelTagMetaTable.js.map +1 -1
  123. package/dist/meta/NamirasoftInferenceMetaDatabase.d.ts +2 -0
  124. package/dist/meta/NamirasoftInferenceMetaDatabase.js +2 -0
  125. package/dist/meta/NamirasoftInferenceMetaDatabase.js.map +1 -1
  126. package/dist/row/LLMItemRow.d.ts +7 -0
  127. package/dist/row/LLMItemRow.js +3 -0
  128. package/dist/row/LLMItemRow.js.map +1 -0
  129. package/dist/row/LLMListResponseRow.d.ts +5 -0
  130. package/dist/row/LLMListResponseRow.js +3 -0
  131. package/dist/row/LLMListResponseRow.js.map +1 -0
  132. package/dist/row/LoadBalancerFullRow.d.ts +13 -0
  133. package/dist/row/LoadBalancerFullRow.js +3 -0
  134. package/dist/row/LoadBalancerFullRow.js.map +1 -0
  135. package/dist/row/LoadBalancerInputRow.d.ts +9 -0
  136. package/dist/row/LoadBalancerInputRow.js +3 -0
  137. package/dist/row/LoadBalancerInputRow.js.map +1 -0
  138. package/dist/row/LoadBalancerModelInputRow.d.ts +4 -0
  139. package/dist/row/LoadBalancerModelInputRow.js +3 -0
  140. package/dist/row/LoadBalancerModelInputRow.js.map +1 -0
  141. package/dist/row/LoadBalancerModelRow.d.ts +8 -0
  142. package/dist/row/LoadBalancerModelRow.js +3 -0
  143. package/dist/row/LoadBalancerModelRow.js.map +1 -0
  144. package/dist/row/LoadBalancerRow.d.ts +11 -0
  145. package/dist/row/LoadBalancerRow.js +3 -0
  146. package/dist/row/LoadBalancerRow.js.map +1 -0
  147. package/logo.png +0 -0
  148. package/package.json +3 -3
  149. package/src/NamirasoftInferenceServer.ts +7 -1
  150. package/src/NamirasoftInferenceServerLLM.ts +39 -0
  151. package/src/NamirasoftInferenceServerLoadBalancer.ts +80 -0
  152. package/src/NamirasoftInferenceServerModel.ts +2 -2
  153. package/src/NamirasoftInferenceServerModelCategory.ts +2 -2
  154. package/src/NamirasoftInferenceServerModelField.ts +2 -2
  155. package/src/NamirasoftInferenceServerModelTag.ts +2 -2
  156. package/src/command/HealthLivenessCommand.ts +1 -1
  157. package/src/command/HealthReadinessCommand.ts +1 -1
  158. package/src/command/HealthzGetCommand.ts +1 -1
  159. package/src/command/LLMCommand.ts +32 -0
  160. package/src/command/LLMListCommand.ts +45 -0
  161. package/src/command/LoadBalancerAskCommand.ts +83 -0
  162. package/src/command/LoadBalancerCommand.ts +42 -0
  163. package/src/command/LoadBalancerCreateCommand.ts +92 -0
  164. package/src/command/LoadBalancerDeleteCommand.ts +45 -0
  165. package/src/command/LoadBalancerGetCommand.ts +45 -0
  166. package/src/command/LoadBalancerListCommand.ts +45 -0
  167. package/src/command/LoadBalancerUpdateCommand.ts +92 -0
  168. package/src/command/MetricsGetCommand.ts +1 -1
  169. package/src/command/ModelAskCommand.ts +1 -1
  170. package/src/command/ModelCategoryCreateCommand.ts +1 -1
  171. package/src/command/ModelCategoryDeleteCommand.ts +1 -1
  172. package/src/command/ModelCategoryGetCommand.ts +1 -1
  173. package/src/command/ModelCategoryListCommand.ts +3 -3
  174. package/src/command/ModelCreateCommand.ts +1 -1
  175. package/src/command/ModelDeleteCommand.ts +1 -1
  176. package/src/command/ModelFieldCreateCommand.ts +1 -1
  177. package/src/command/ModelFieldDeleteCommand.ts +1 -1
  178. package/src/command/ModelFieldGetCommand.ts +1 -1
  179. package/src/command/ModelFieldListCommand.ts +3 -3
  180. package/src/command/ModelFieldUpdateCommand.ts +1 -1
  181. package/src/command/ModelGetCommand.ts +1 -1
  182. package/src/command/ModelListCommand.ts +3 -3
  183. package/src/command/ModelTagCreateCommand.ts +1 -1
  184. package/src/command/ModelTagDeleteCommand.ts +1 -1
  185. package/src/command/ModelTagGetCommand.ts +1 -1
  186. package/src/command/ModelTagListCommand.ts +3 -3
  187. package/src/command/ModelTagUpdateCommand.ts +1 -1
  188. package/src/command/ModelUpdateCommand.ts +1 -1
  189. package/src/command/UsageSummaryCommand.ts +1 -1
  190. package/src/command/ValueListCommand.ts +1 -1
  191. package/src/command/cli.ts +6 -2
  192. package/src/enum/LoadBalancerAlgorithm.ts +26 -0
  193. package/src/enum/ModelCompanyType.ts +27 -0
  194. package/src/index.ts +21 -0
  195. package/src/meta/LoadBalancerMetaTable.ts +63 -0
  196. package/src/meta/ModelCategoryMetaTable.ts +1 -1
  197. package/src/meta/ModelFieldMetaTable.ts +1 -1
  198. package/src/meta/ModelMetaTable.ts +1 -1
  199. package/src/meta/ModelTagMetaTable.ts +1 -1
  200. package/src/meta/NamirasoftInferenceMetaDatabase.ts +3 -0
  201. package/src/row/LLMItemRow.ts +29 -0
  202. package/src/row/LLMListResponseRow.ts +27 -0
  203. package/src/row/LoadBalancerFullRow.ts +35 -0
  204. package/src/row/LoadBalancerInputRow.ts +31 -0
  205. package/src/row/LoadBalancerModelInputRow.ts +25 -0
  206. package/src/row/LoadBalancerModelRow.ts +29 -0
  207. 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
  };