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.
Files changed (267) hide show
  1. package/dist/NamirasoftInferenceServer.d.ts +23 -0
  2. package/dist/NamirasoftInferenceServer.js +30 -0
  3. package/dist/NamirasoftInferenceServer.js.map +1 -0
  4. package/dist/NamirasoftInferenceServerBase.d.ts +5 -0
  5. package/dist/NamirasoftInferenceServerBase.js +11 -0
  6. package/dist/NamirasoftInferenceServerBase.js.map +1 -0
  7. package/dist/NamirasoftInferenceServerHealth.d.ts +8 -0
  8. package/dist/NamirasoftInferenceServerHealth.js +35 -0
  9. package/dist/NamirasoftInferenceServerHealth.js.map +1 -0
  10. package/dist/NamirasoftInferenceServerHealthz.d.ts +7 -0
  11. package/dist/NamirasoftInferenceServerHealthz.js +28 -0
  12. package/dist/NamirasoftInferenceServerHealthz.js.map +1 -0
  13. package/dist/NamirasoftInferenceServerMetrics.d.ts +7 -0
  14. package/dist/NamirasoftInferenceServerMetrics.js +28 -0
  15. package/dist/NamirasoftInferenceServerMetrics.js.map +1 -0
  16. package/dist/NamirasoftInferenceServerModel.d.ts +25 -0
  17. package/dist/NamirasoftInferenceServerModel.js +72 -0
  18. package/dist/NamirasoftInferenceServerModel.js.map +1 -0
  19. package/dist/NamirasoftInferenceServerModelCategory.d.ts +17 -0
  20. package/dist/NamirasoftInferenceServerModelCategory.js +56 -0
  21. package/dist/NamirasoftInferenceServerModelCategory.js.map +1 -0
  22. package/dist/NamirasoftInferenceServerModelField.d.ts +18 -0
  23. package/dist/NamirasoftInferenceServerModelField.js +64 -0
  24. package/dist/NamirasoftInferenceServerModelField.js.map +1 -0
  25. package/dist/NamirasoftInferenceServerModelTag.d.ts +18 -0
  26. package/dist/NamirasoftInferenceServerModelTag.js +64 -0
  27. package/dist/NamirasoftInferenceServerModelTag.js.map +1 -0
  28. package/dist/NamirasoftInferenceServerUsage.d.ts +8 -0
  29. package/dist/NamirasoftInferenceServerUsage.js +29 -0
  30. package/dist/NamirasoftInferenceServerUsage.js.map +1 -0
  31. package/dist/NamirasoftInferenceServerValue.d.ts +7 -0
  32. package/dist/NamirasoftInferenceServerValue.js +29 -0
  33. package/dist/NamirasoftInferenceServerValue.js.map +1 -0
  34. package/dist/command/HealthCommand.d.ts +4 -0
  35. package/dist/command/HealthCommand.js +17 -0
  36. package/dist/command/HealthCommand.js.map +1 -0
  37. package/dist/command/HealthLivenessCommand.d.ts +5 -0
  38. package/dist/command/HealthLivenessCommand.js +38 -0
  39. package/dist/command/HealthLivenessCommand.js.map +1 -0
  40. package/dist/command/HealthReadinessCommand.d.ts +5 -0
  41. package/dist/command/HealthReadinessCommand.js +38 -0
  42. package/dist/command/HealthReadinessCommand.js.map +1 -0
  43. package/dist/command/HealthzCommand.d.ts +4 -0
  44. package/dist/command/HealthzCommand.js +15 -0
  45. package/dist/command/HealthzCommand.js.map +1 -0
  46. package/dist/command/HealthzGetCommand.d.ts +5 -0
  47. package/dist/command/HealthzGetCommand.js +38 -0
  48. package/dist/command/HealthzGetCommand.js.map +1 -0
  49. package/dist/command/MetricsCommand.d.ts +4 -0
  50. package/dist/command/MetricsCommand.js +15 -0
  51. package/dist/command/MetricsCommand.js.map +1 -0
  52. package/dist/command/MetricsGetCommand.d.ts +5 -0
  53. package/dist/command/MetricsGetCommand.js +38 -0
  54. package/dist/command/MetricsGetCommand.js.map +1 -0
  55. package/dist/command/ModelAskCommand.d.ts +5 -0
  56. package/dist/command/ModelAskCommand.js +76 -0
  57. package/dist/command/ModelAskCommand.js.map +1 -0
  58. package/dist/command/ModelCategoryCommand.d.ts +4 -0
  59. package/dist/command/ModelCategoryCommand.js +21 -0
  60. package/dist/command/ModelCategoryCommand.js.map +1 -0
  61. package/dist/command/ModelCategoryCreateCommand.d.ts +5 -0
  62. package/dist/command/ModelCategoryCreateCommand.js +49 -0
  63. package/dist/command/ModelCategoryCreateCommand.js.map +1 -0
  64. package/dist/command/ModelCategoryDeleteCommand.d.ts +5 -0
  65. package/dist/command/ModelCategoryDeleteCommand.js +38 -0
  66. package/dist/command/ModelCategoryDeleteCommand.js.map +1 -0
  67. package/dist/command/ModelCategoryGetCommand.d.ts +5 -0
  68. package/dist/command/ModelCategoryGetCommand.js +38 -0
  69. package/dist/command/ModelCategoryGetCommand.js.map +1 -0
  70. package/dist/command/ModelCategoryListCommand.d.ts +5 -0
  71. package/dist/command/ModelCategoryListCommand.js +38 -0
  72. package/dist/command/ModelCategoryListCommand.js.map +1 -0
  73. package/dist/command/ModelCommand.d.ts +4 -0
  74. package/dist/command/ModelCommand.js +25 -0
  75. package/dist/command/ModelCommand.js.map +1 -0
  76. package/dist/command/ModelCreateCommand.d.ts +5 -0
  77. package/dist/command/ModelCreateCommand.js +157 -0
  78. package/dist/command/ModelCreateCommand.js.map +1 -0
  79. package/dist/command/ModelDeleteCommand.d.ts +5 -0
  80. package/dist/command/ModelDeleteCommand.js +38 -0
  81. package/dist/command/ModelDeleteCommand.js.map +1 -0
  82. package/dist/command/ModelFieldCommand.d.ts +4 -0
  83. package/dist/command/ModelFieldCommand.js +23 -0
  84. package/dist/command/ModelFieldCommand.js.map +1 -0
  85. package/dist/command/ModelFieldCreateCommand.d.ts +5 -0
  86. package/dist/command/ModelFieldCreateCommand.js +58 -0
  87. package/dist/command/ModelFieldCreateCommand.js.map +1 -0
  88. package/dist/command/ModelFieldDeleteCommand.d.ts +5 -0
  89. package/dist/command/ModelFieldDeleteCommand.js +38 -0
  90. package/dist/command/ModelFieldDeleteCommand.js.map +1 -0
  91. package/dist/command/ModelFieldGetCommand.d.ts +5 -0
  92. package/dist/command/ModelFieldGetCommand.js +38 -0
  93. package/dist/command/ModelFieldGetCommand.js.map +1 -0
  94. package/dist/command/ModelFieldListCommand.d.ts +5 -0
  95. package/dist/command/ModelFieldListCommand.js +38 -0
  96. package/dist/command/ModelFieldListCommand.js.map +1 -0
  97. package/dist/command/ModelFieldUpdateCommand.d.ts +5 -0
  98. package/dist/command/ModelFieldUpdateCommand.js +58 -0
  99. package/dist/command/ModelFieldUpdateCommand.js.map +1 -0
  100. package/dist/command/ModelGetCommand.d.ts +5 -0
  101. package/dist/command/ModelGetCommand.js +38 -0
  102. package/dist/command/ModelGetCommand.js.map +1 -0
  103. package/dist/command/ModelListCommand.d.ts +5 -0
  104. package/dist/command/ModelListCommand.js +38 -0
  105. package/dist/command/ModelListCommand.js.map +1 -0
  106. package/dist/command/ModelTagCommand.d.ts +4 -0
  107. package/dist/command/ModelTagCommand.js +23 -0
  108. package/dist/command/ModelTagCommand.js.map +1 -0
  109. package/dist/command/ModelTagCreateCommand.d.ts +5 -0
  110. package/dist/command/ModelTagCreateCommand.js +58 -0
  111. package/dist/command/ModelTagCreateCommand.js.map +1 -0
  112. package/dist/command/ModelTagDeleteCommand.d.ts +5 -0
  113. package/dist/command/ModelTagDeleteCommand.js +38 -0
  114. package/dist/command/ModelTagDeleteCommand.js.map +1 -0
  115. package/dist/command/ModelTagGetCommand.d.ts +5 -0
  116. package/dist/command/ModelTagGetCommand.js +38 -0
  117. package/dist/command/ModelTagGetCommand.js.map +1 -0
  118. package/dist/command/ModelTagListCommand.d.ts +5 -0
  119. package/dist/command/ModelTagListCommand.js +38 -0
  120. package/dist/command/ModelTagListCommand.js.map +1 -0
  121. package/dist/command/ModelTagUpdateCommand.d.ts +5 -0
  122. package/dist/command/ModelTagUpdateCommand.js +58 -0
  123. package/dist/command/ModelTagUpdateCommand.js.map +1 -0
  124. package/dist/command/ModelUpdateCommand.d.ts +5 -0
  125. package/dist/command/ModelUpdateCommand.js +157 -0
  126. package/dist/command/ModelUpdateCommand.js.map +1 -0
  127. package/dist/command/UsageCommand.d.ts +4 -0
  128. package/dist/command/UsageCommand.js +15 -0
  129. package/dist/command/UsageCommand.js.map +1 -0
  130. package/dist/command/UsageSummaryCommand.d.ts +5 -0
  131. package/dist/command/UsageSummaryCommand.js +38 -0
  132. package/dist/command/UsageSummaryCommand.js.map +1 -0
  133. package/dist/command/ValueCommand.d.ts +4 -0
  134. package/dist/command/ValueCommand.js +15 -0
  135. package/dist/command/ValueCommand.js.map +1 -0
  136. package/dist/command/ValueListCommand.d.ts +5 -0
  137. package/dist/command/ValueListCommand.js +38 -0
  138. package/dist/command/ValueListCommand.js.map +1 -0
  139. package/dist/command/cli.d.ts +2 -0
  140. package/dist/command/cli.js +30 -0
  141. package/dist/command/cli.js.map +1 -0
  142. package/dist/enum/InteractionStatus.d.ts +5 -0
  143. package/dist/enum/InteractionStatus.js +10 -0
  144. package/dist/enum/InteractionStatus.js.map +1 -0
  145. package/dist/enum/ModelModelCompany.d.ts +6 -0
  146. package/dist/enum/ModelModelCompany.js +11 -0
  147. package/dist/enum/ModelModelCompany.js.map +1 -0
  148. package/dist/enum/ModelModelName.d.ts +11 -0
  149. package/dist/enum/ModelModelName.js +16 -0
  150. package/dist/enum/ModelModelName.js.map +1 -0
  151. package/dist/index.d.ts +64 -0
  152. package/dist/index.js +81 -0
  153. package/dist/index.js.map +1 -0
  154. package/dist/meta/ModelCategoryMetaTable.d.ts +15 -0
  155. package/dist/meta/ModelCategoryMetaTable.js +39 -0
  156. package/dist/meta/ModelCategoryMetaTable.js.map +1 -0
  157. package/dist/meta/ModelFieldMetaTable.d.ts +16 -0
  158. package/dist/meta/ModelFieldMetaTable.js +39 -0
  159. package/dist/meta/ModelFieldMetaTable.js.map +1 -0
  160. package/dist/meta/ModelMetaTable.d.ts +62 -0
  161. package/dist/meta/ModelMetaTable.js +85 -0
  162. package/dist/meta/ModelMetaTable.js.map +1 -0
  163. package/dist/meta/ModelTagMetaTable.d.ts +16 -0
  164. package/dist/meta/ModelTagMetaTable.js +39 -0
  165. package/dist/meta/ModelTagMetaTable.js.map +1 -0
  166. package/dist/meta/NamirasoftInferenceMetaDatabase.d.ts +19 -0
  167. package/dist/meta/NamirasoftInferenceMetaDatabase.js +33 -0
  168. package/dist/meta/NamirasoftInferenceMetaDatabase.js.map +1 -0
  169. package/dist/row/EntityCategoryInputRow.d.ts +3 -0
  170. package/dist/row/EntityCategoryInputRow.js +3 -0
  171. package/dist/row/EntityCategoryInputRow.js.map +1 -0
  172. package/dist/row/EntityFieldInputRow.d.ts +4 -0
  173. package/dist/row/EntityFieldInputRow.js +3 -0
  174. package/dist/row/EntityFieldInputRow.js.map +1 -0
  175. package/dist/row/EntityTagInputRow.d.ts +4 -0
  176. package/dist/row/EntityTagInputRow.js +3 -0
  177. package/dist/row/EntityTagInputRow.js.map +1 -0
  178. package/dist/row/InteractionRow.d.ts +22 -0
  179. package/dist/row/InteractionRow.js +3 -0
  180. package/dist/row/InteractionRow.js.map +1 -0
  181. package/dist/row/ModelCategoryRow.d.ts +8 -0
  182. package/dist/row/ModelCategoryRow.js +3 -0
  183. package/dist/row/ModelCategoryRow.js.map +1 -0
  184. package/dist/row/ModelFieldRow.d.ts +9 -0
  185. package/dist/row/ModelFieldRow.js +3 -0
  186. package/dist/row/ModelFieldRow.js.map +1 -0
  187. package/dist/row/ModelInputRow.d.ts +20 -0
  188. package/dist/row/ModelInputRow.js +3 -0
  189. package/dist/row/ModelInputRow.js.map +1 -0
  190. package/dist/row/ModelRow.d.ts +57 -0
  191. package/dist/row/ModelRow.js +3 -0
  192. package/dist/row/ModelRow.js.map +1 -0
  193. package/dist/row/ModelTagRow.d.ts +9 -0
  194. package/dist/row/ModelTagRow.js +3 -0
  195. package/dist/row/ModelTagRow.js.map +1 -0
  196. package/dist/row/UsageSummaryResponseRow.d.ts +9 -0
  197. package/dist/row/UsageSummaryResponseRow.js +3 -0
  198. package/dist/row/UsageSummaryResponseRow.js.map +1 -0
  199. package/logo.png +0 -0
  200. package/package.json +28 -0
  201. package/src/NamirasoftInferenceServer.ts +57 -0
  202. package/src/NamirasoftInferenceServerBase.ts +30 -0
  203. package/src/NamirasoftInferenceServerHealth.ts +43 -0
  204. package/src/NamirasoftInferenceServerHealthz.ts +37 -0
  205. package/src/NamirasoftInferenceServerMetrics.ts +37 -0
  206. package/src/NamirasoftInferenceServerModel.ts +79 -0
  207. package/src/NamirasoftInferenceServerModelCategory.ts +64 -0
  208. package/src/NamirasoftInferenceServerModelField.ts +71 -0
  209. package/src/NamirasoftInferenceServerModelTag.ts +71 -0
  210. package/src/NamirasoftInferenceServerUsage.ts +39 -0
  211. package/src/NamirasoftInferenceServerValue.ts +38 -0
  212. package/src/command/HealthCommand.ts +34 -0
  213. package/src/command/HealthLivenessCommand.ts +45 -0
  214. package/src/command/HealthReadinessCommand.ts +45 -0
  215. package/src/command/HealthzCommand.ts +32 -0
  216. package/src/command/HealthzGetCommand.ts +45 -0
  217. package/src/command/MetricsCommand.ts +32 -0
  218. package/src/command/MetricsGetCommand.ts +45 -0
  219. package/src/command/ModelAskCommand.ts +83 -0
  220. package/src/command/ModelCategoryCommand.ts +38 -0
  221. package/src/command/ModelCategoryCreateCommand.ts +56 -0
  222. package/src/command/ModelCategoryDeleteCommand.ts +45 -0
  223. package/src/command/ModelCategoryGetCommand.ts +45 -0
  224. package/src/command/ModelCategoryListCommand.ts +45 -0
  225. package/src/command/ModelCommand.ts +42 -0
  226. package/src/command/ModelCreateCommand.ts +164 -0
  227. package/src/command/ModelDeleteCommand.ts +45 -0
  228. package/src/command/ModelFieldCommand.ts +40 -0
  229. package/src/command/ModelFieldCreateCommand.ts +65 -0
  230. package/src/command/ModelFieldDeleteCommand.ts +45 -0
  231. package/src/command/ModelFieldGetCommand.ts +45 -0
  232. package/src/command/ModelFieldListCommand.ts +45 -0
  233. package/src/command/ModelFieldUpdateCommand.ts +65 -0
  234. package/src/command/ModelGetCommand.ts +45 -0
  235. package/src/command/ModelListCommand.ts +45 -0
  236. package/src/command/ModelTagCommand.ts +40 -0
  237. package/src/command/ModelTagCreateCommand.ts +65 -0
  238. package/src/command/ModelTagDeleteCommand.ts +45 -0
  239. package/src/command/ModelTagGetCommand.ts +45 -0
  240. package/src/command/ModelTagListCommand.ts +45 -0
  241. package/src/command/ModelTagUpdateCommand.ts +65 -0
  242. package/src/command/ModelUpdateCommand.ts +164 -0
  243. package/src/command/UsageCommand.ts +32 -0
  244. package/src/command/UsageSummaryCommand.ts +45 -0
  245. package/src/command/ValueCommand.ts +32 -0
  246. package/src/command/ValueListCommand.ts +45 -0
  247. package/src/command/cli.ts +49 -0
  248. package/src/enum/InteractionStatus.ts +26 -0
  249. package/src/enum/ModelModelCompany.ts +27 -0
  250. package/src/enum/ModelModelName.ts +32 -0
  251. package/src/index.ts +84 -0
  252. package/src/meta/ModelCategoryMetaTable.ts +60 -0
  253. package/src/meta/ModelFieldMetaTable.ts +61 -0
  254. package/src/meta/ModelMetaTable.ts +153 -0
  255. package/src/meta/ModelTagMetaTable.ts +61 -0
  256. package/src/meta/NamirasoftInferenceMetaDatabase.ts +60 -0
  257. package/src/row/EntityCategoryInputRow.ts +24 -0
  258. package/src/row/EntityFieldInputRow.ts +25 -0
  259. package/src/row/EntityTagInputRow.ts +25 -0
  260. package/src/row/InteractionRow.ts +44 -0
  261. package/src/row/ModelCategoryRow.ts +29 -0
  262. package/src/row/ModelFieldRow.ts +30 -0
  263. package/src/row/ModelInputRow.ts +42 -0
  264. package/src/row/ModelRow.ts +79 -0
  265. package/src/row/ModelTagRow.ts +30 -0
  266. package/src/row/UsageSummaryResponseRow.ts +30 -0
  267. 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 ModelTagListCommand 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_tag.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 ModelTagUpdateCommand extends BaseFinalCommand
27
+ {
28
+ constructor(argv: string[])
29
+ {
30
+ super(argv, ["id"], [
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.Update(this.arg_values[0], {
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,164 @@
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 ModelUpdateCommand 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: "model_company",
49
+ short: "",
50
+ description: "Provides the value of 'model_company' in body",
51
+ optional: false,
52
+ args: ["model_company"],
53
+ defaults: [""]
54
+ },
55
+ {
56
+ name: "model_name",
57
+ short: "",
58
+ description: "Provides the value of 'model_name' in body",
59
+ optional: false,
60
+ args: ["model_name"],
61
+ defaults: [""]
62
+ },
63
+ {
64
+ name: "model_api_key_credential_id",
65
+ short: "",
66
+ description: "Provides the value of 'model_api_key_credential_id' in body",
67
+ optional: true,
68
+ args: ["model_api_key_credential_id"],
69
+ defaults: [""]
70
+ },
71
+ {
72
+ name: "cost_limit_per_month",
73
+ short: "",
74
+ description: "Provides the value of 'cost_limit_per_month' in body",
75
+ optional: true,
76
+ args: ["cost_limit_per_month"],
77
+ defaults: [""]
78
+ },
79
+ {
80
+ name: "cost_limit_per_week",
81
+ short: "",
82
+ description: "Provides the value of 'cost_limit_per_week' in body",
83
+ optional: true,
84
+ args: ["cost_limit_per_week"],
85
+ defaults: [""]
86
+ },
87
+ {
88
+ name: "cost_limit_per_day",
89
+ short: "",
90
+ description: "Provides the value of 'cost_limit_per_day' in body",
91
+ optional: true,
92
+ args: ["cost_limit_per_day"],
93
+ defaults: [""]
94
+ },
95
+ {
96
+ name: "cost_limit_per_chat",
97
+ short: "",
98
+ description: "Provides the value of 'cost_limit_per_chat' in body",
99
+ optional: true,
100
+ args: ["cost_limit_per_chat"],
101
+ defaults: [""]
102
+ },
103
+ {
104
+ name: "cost_limit_per_run",
105
+ short: "",
106
+ description: "Provides the value of 'cost_limit_per_run' in body",
107
+ optional: true,
108
+ args: ["cost_limit_per_run"],
109
+ defaults: [""]
110
+ },
111
+ {
112
+ name: "model_category",
113
+ short: "",
114
+ description: "Provides the value of 'model_category' in body",
115
+ optional: false,
116
+ args: ["model_category"],
117
+ defaults: [""]
118
+ },
119
+ {
120
+ name: "model_field",
121
+ short: "",
122
+ description: "Provides the value of 'model_field' in body",
123
+ optional: false,
124
+ args: ["model_field"],
125
+ defaults: [""]
126
+ },
127
+ {
128
+ name: "model_tag",
129
+ short: "",
130
+ description: "Provides the value of 'model_tag' in body",
131
+ optional: false,
132
+ args: ["model_tag"],
133
+ defaults: [""]
134
+ }
135
+ ]);
136
+ }
137
+ override async exec()
138
+ {
139
+ let token = this.app.storage.getNSAToken();
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.");
142
+ let storage = new IStorageMemoryDedicated();
143
+ let token_manager = new TokenManager(storage, () => { });
144
+ token_manager.setValue(token, false);
145
+ let url = this.app.storage.getItem("ns-inference-server-url");
146
+ let server = new NamirasoftInferenceServer(url, token_manager, e => this.app.logger.error(e.message));
147
+ let ans = await server.model.Update(this.arg_values[0], {
148
+ workspace_id: this.option_values.workspace_id,
149
+ name: this.option_values.name,
150
+ model_company: this.option_values.model_company,
151
+ model_name: this.option_values.model_name,
152
+ model_api_key_credential_id: this.option_values.model_api_key_credential_id,
153
+ cost_limit_per_month: this.option_values.cost_limit_per_month,
154
+ cost_limit_per_week: this.option_values.cost_limit_per_week,
155
+ cost_limit_per_day: this.option_values.cost_limit_per_day,
156
+ cost_limit_per_chat: this.option_values.cost_limit_per_chat,
157
+ cost_limit_per_run: this.option_values.cost_limit_per_run,
158
+ model_category: this.option_values.model_category,
159
+ model_field: this.option_values.model_field,
160
+ model_tag: this.option_values.model_tag
161
+ });
162
+ this.app.logger.success(JSON.stringify(ans));
163
+ }
164
+ };
@@ -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 { UsageSummaryCommand } from "./UsageSummaryCommand";
23
+
24
+ export class UsageCommand extends BaseNavigatorCommand
25
+ {
26
+ constructor(argv: string[])
27
+ {
28
+ super(argv, {
29
+ "summary": UsageSummaryCommand,
30
+ });
31
+ }
32
+ };
@@ -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 UsageSummaryCommand extends BaseFinalCommand
27
+ {
28
+ constructor(argv: string[])
29
+ {
30
+ super(argv, ["model_id", "started_at", "ended_at"], []);
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.usage.Summary(this.arg_values[0], this.arg_values[1], this.arg_values[2]);
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 { ValueListCommand } from "./ValueListCommand";
23
+
24
+ export class ValueCommand extends BaseNavigatorCommand
25
+ {
26
+ constructor(argv: string[])
27
+ {
28
+ super(argv, {
29
+ "list": ValueListCommand,
30
+ });
31
+ }
32
+ };
@@ -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 ValueListCommand extends BaseFinalCommand
27
+ {
28
+ constructor(argv: string[])
29
+ {
30
+ super(argv, ["table", "column", "search", "field_id", "limit"], []);
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.value.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,49 @@
1
+ #!/usr/bin/env node
2
+ /****************************************************************/
3
+ /* */
4
+ /* This is an Auto-Generated File */
5
+ /* Made By */
6
+ /* Namirasoft SDK Generator NPM Package */
7
+ /* */
8
+ /****************************************************************/
9
+ /****************************************************************/
10
+ /* */
11
+ /* Please do not make any change to this file */
12
+ /* If any change is required, ns-sdkg command must be used */
13
+ /* */
14
+ /****************************************************************/
15
+ /****************************************************************/
16
+ /* */
17
+ /* Namira Software Corporation */
18
+ /* https://namirasoft.com */
19
+ /* */
20
+ /****************************************************************/
21
+
22
+ import { AccountCommand } from "namirasoft-account";
23
+ import { Application, BaseStorage } from "namirasoft-node-cli";
24
+ import { ConfigCommand } from "namirasoft-node-cli";
25
+ import { HealthCommand } from "./HealthCommand";
26
+ import { HealthzCommand } from "./HealthzCommand";
27
+ import { MetricsCommand } from "./MetricsCommand";
28
+ import { ModelCategoryCommand } from "./ModelCategoryCommand";
29
+ import { ModelCommand } from "./ModelCommand";
30
+ import { ModelFieldCommand } from "./ModelFieldCommand";
31
+ import { ModelTagCommand } from "./ModelTagCommand";
32
+ import { UsageCommand } from "./UsageCommand";
33
+ import { ValueCommand } from "./ValueCommand";
34
+
35
+ let app = new Application("ns-inference", new BaseStorage(),
36
+ {
37
+ "healthz": HealthzCommand,
38
+ "health": HealthCommand,
39
+ "metrics": MetricsCommand,
40
+ "value": ValueCommand,
41
+ "modelcategory": ModelCategoryCommand,
42
+ "modelfield": ModelFieldCommand,
43
+ "modeltag": ModelTagCommand,
44
+ "model": ModelCommand,
45
+ "usage": UsageCommand,
46
+ "account": AccountCommand,
47
+ "config": (argv: string[]) => new ConfigCommand(argv, ["ns-inference-server-url"])
48
+ });
49
+ app.run();
@@ -0,0 +1,26 @@
1
+ /****************************************************************/
2
+ /* */
3
+ /* This is an Auto-Generated File */
4
+ /* Made By */
5
+ /* Namirasoft SDK Generator NPM Package */
6
+ /* */
7
+ /****************************************************************/
8
+ /****************************************************************/
9
+ /* */
10
+ /* Please do not make any change to this file */
11
+ /* If any change is required, ns-sdkg command must be used */
12
+ /* */
13
+ /****************************************************************/
14
+ /****************************************************************/
15
+ /* */
16
+ /* Namira Software Corporation */
17
+ /* https://namirasoft.com */
18
+ /* */
19
+ /****************************************************************/
20
+
21
+ export enum InteractionStatus
22
+ {
23
+ Running = "Running",
24
+ Successful = "Successful",
25
+ Failed = "Failed",
26
+ }
@@ -0,0 +1,27 @@
1
+ /****************************************************************/
2
+ /* */
3
+ /* This is an Auto-Generated File */
4
+ /* Made By */
5
+ /* Namirasoft SDK Generator NPM Package */
6
+ /* */
7
+ /****************************************************************/
8
+ /****************************************************************/
9
+ /* */
10
+ /* Please do not make any change to this file */
11
+ /* If any change is required, ns-sdkg command must be used */
12
+ /* */
13
+ /****************************************************************/
14
+ /****************************************************************/
15
+ /* */
16
+ /* Namira Software Corporation */
17
+ /* https://namirasoft.com */
18
+ /* */
19
+ /****************************************************************/
20
+
21
+ export enum ModelModelCompany
22
+ {
23
+ OpenAI = "OpenAI",
24
+ Anthropic = "Anthropic",
25
+ DeepSeek = "DeepSeek",
26
+ Namirasoft = "Namirasoft",
27
+ }
@@ -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
+ export enum ModelModelName
22
+ {
23
+ Gpt4o = "Gpt4o",
24
+ Gpt4oMini = "Gpt4oMini",
25
+ Gpt5 = "Gpt5",
26
+ Gpt5Mini = "Gpt5Mini",
27
+ ClaudeHaiku45 = "ClaudeHaiku45",
28
+ ClaudeOpus47 = "ClaudeOpus47",
29
+ ClaudeSonnet46 = "ClaudeSonnet46",
30
+ V4Flash = "V4Flash",
31
+ V4Pro = "V4Pro",
32
+ }
package/src/index.ts ADDED
@@ -0,0 +1,84 @@
1
+ /****************************************************************/
2
+ /* */
3
+ /* This is an Auto-Generated File */
4
+ /* Made By */
5
+ /* Namirasoft SDK Generator NPM Package */
6
+ /* */
7
+ /****************************************************************/
8
+ /****************************************************************/
9
+ /* */
10
+ /* Please do not make any change to this file */
11
+ /* If any change is required, ns-sdkg command must be used */
12
+ /* */
13
+ /****************************************************************/
14
+ /****************************************************************/
15
+ /* */
16
+ /* Namira Software Corporation */
17
+ /* https://namirasoft.com */
18
+ /* */
19
+ /****************************************************************/
20
+
21
+ export * from "./NamirasoftInferenceServer";
22
+ export * from "./NamirasoftInferenceServerBase";
23
+ export * from "./NamirasoftInferenceServerHealth";
24
+ export * from "./NamirasoftInferenceServerHealthz";
25
+ export * from "./NamirasoftInferenceServerMetrics";
26
+ export * from "./NamirasoftInferenceServerModel";
27
+ export * from "./NamirasoftInferenceServerModelCategory";
28
+ export * from "./NamirasoftInferenceServerModelField";
29
+ export * from "./NamirasoftInferenceServerModelTag";
30
+ export * from "./NamirasoftInferenceServerUsage";
31
+ export * from "./NamirasoftInferenceServerValue";
32
+ export * from "./command/HealthCommand";
33
+ export * from "./command/HealthLivenessCommand";
34
+ export * from "./command/HealthReadinessCommand";
35
+ export * from "./command/HealthzCommand";
36
+ export * from "./command/HealthzGetCommand";
37
+ export * from "./command/MetricsCommand";
38
+ export * from "./command/MetricsGetCommand";
39
+ export * from "./command/ModelAskCommand";
40
+ export * from "./command/ModelCategoryCommand";
41
+ export * from "./command/ModelCategoryCreateCommand";
42
+ export * from "./command/ModelCategoryDeleteCommand";
43
+ export * from "./command/ModelCategoryGetCommand";
44
+ export * from "./command/ModelCategoryListCommand";
45
+ export * from "./command/ModelCommand";
46
+ export * from "./command/ModelCreateCommand";
47
+ export * from "./command/ModelDeleteCommand";
48
+ export * from "./command/ModelFieldCommand";
49
+ export * from "./command/ModelFieldCreateCommand";
50
+ export * from "./command/ModelFieldDeleteCommand";
51
+ export * from "./command/ModelFieldGetCommand";
52
+ export * from "./command/ModelFieldListCommand";
53
+ export * from "./command/ModelFieldUpdateCommand";
54
+ export * from "./command/ModelGetCommand";
55
+ export * from "./command/ModelListCommand";
56
+ export * from "./command/ModelTagCommand";
57
+ export * from "./command/ModelTagCreateCommand";
58
+ export * from "./command/ModelTagDeleteCommand";
59
+ export * from "./command/ModelTagGetCommand";
60
+ export * from "./command/ModelTagListCommand";
61
+ export * from "./command/ModelTagUpdateCommand";
62
+ export * from "./command/ModelUpdateCommand";
63
+ export * from "./command/UsageCommand";
64
+ export * from "./command/UsageSummaryCommand";
65
+ export * from "./command/ValueCommand";
66
+ export * from "./command/ValueListCommand";
67
+ export * from "./enum/InteractionStatus";
68
+ export * from "./enum/ModelModelCompany";
69
+ export * from "./enum/ModelModelName";
70
+ export * from "./meta/ModelCategoryMetaTable";
71
+ export * from "./meta/ModelFieldMetaTable";
72
+ export * from "./meta/ModelMetaTable";
73
+ export * from "./meta/ModelTagMetaTable";
74
+ export * from "./meta/NamirasoftInferenceMetaDatabase";
75
+ export * from "./row/EntityCategoryInputRow";
76
+ export * from "./row/EntityFieldInputRow";
77
+ export * from "./row/EntityTagInputRow";
78
+ export * from "./row/InteractionRow";
79
+ export * from "./row/ModelCategoryRow";
80
+ export * from "./row/ModelFieldRow";
81
+ export * from "./row/ModelInputRow";
82
+ export * from "./row/ModelRow";
83
+ export * from "./row/ModelTagRow";
84
+ export * from "./row/UsageSummaryResponseRow";