namirasoft-inference 1.4.1 → 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 (186) hide show
  1. package/dist/NamirasoftInferenceServer.d.ts +2 -0
  2. package/dist/NamirasoftInferenceServer.js +3 -1
  3. package/dist/NamirasoftInferenceServer.js.map +1 -1
  4. package/dist/NamirasoftInferenceServerLoadBalancer.d.ts +26 -0
  5. package/dist/NamirasoftInferenceServerLoadBalancer.js +72 -0
  6. package/dist/NamirasoftInferenceServerLoadBalancer.js.map +1 -0
  7. package/dist/NamirasoftInferenceServerModel.d.ts +1 -1
  8. package/dist/NamirasoftInferenceServerModel.js +2 -2
  9. package/dist/NamirasoftInferenceServerModel.js.map +1 -1
  10. package/dist/NamirasoftInferenceServerModelCategory.d.ts +1 -1
  11. package/dist/NamirasoftInferenceServerModelCategory.js +2 -2
  12. package/dist/NamirasoftInferenceServerModelCategory.js.map +1 -1
  13. package/dist/NamirasoftInferenceServerModelField.d.ts +1 -1
  14. package/dist/NamirasoftInferenceServerModelField.js +2 -2
  15. package/dist/NamirasoftInferenceServerModelField.js.map +1 -1
  16. package/dist/NamirasoftInferenceServerModelTag.d.ts +1 -1
  17. package/dist/NamirasoftInferenceServerModelTag.js +2 -2
  18. package/dist/NamirasoftInferenceServerModelTag.js.map +1 -1
  19. package/dist/command/HealthLivenessCommand.js +1 -1
  20. package/dist/command/HealthLivenessCommand.js.map +1 -1
  21. package/dist/command/HealthReadinessCommand.js +1 -1
  22. package/dist/command/HealthReadinessCommand.js.map +1 -1
  23. package/dist/command/HealthzGetCommand.js +1 -1
  24. package/dist/command/HealthzGetCommand.js.map +1 -1
  25. package/dist/command/LLMListCommand.js +1 -1
  26. package/dist/command/LLMListCommand.js.map +1 -1
  27. package/dist/command/LoadBalancerAskCommand.d.ts +5 -0
  28. package/dist/command/LoadBalancerAskCommand.js +76 -0
  29. package/dist/command/LoadBalancerAskCommand.js.map +1 -0
  30. package/dist/command/LoadBalancerCommand.d.ts +4 -0
  31. package/dist/command/LoadBalancerCommand.js +25 -0
  32. package/dist/command/LoadBalancerCommand.js.map +1 -0
  33. package/dist/command/LoadBalancerCreateCommand.d.ts +5 -0
  34. package/dist/command/LoadBalancerCreateCommand.js +85 -0
  35. package/dist/command/LoadBalancerCreateCommand.js.map +1 -0
  36. package/dist/command/LoadBalancerDeleteCommand.d.ts +5 -0
  37. package/dist/command/LoadBalancerDeleteCommand.js +38 -0
  38. package/dist/command/LoadBalancerDeleteCommand.js.map +1 -0
  39. package/dist/command/LoadBalancerGetCommand.d.ts +5 -0
  40. package/dist/command/LoadBalancerGetCommand.js +38 -0
  41. package/dist/command/LoadBalancerGetCommand.js.map +1 -0
  42. package/dist/command/LoadBalancerListCommand.d.ts +5 -0
  43. package/dist/command/LoadBalancerListCommand.js +38 -0
  44. package/dist/command/LoadBalancerListCommand.js.map +1 -0
  45. package/dist/command/LoadBalancerUpdateCommand.d.ts +5 -0
  46. package/dist/command/LoadBalancerUpdateCommand.js +85 -0
  47. package/dist/command/LoadBalancerUpdateCommand.js.map +1 -0
  48. package/dist/command/MetricsGetCommand.js +1 -1
  49. package/dist/command/MetricsGetCommand.js.map +1 -1
  50. package/dist/command/ModelAskCommand.js +1 -1
  51. package/dist/command/ModelAskCommand.js.map +1 -1
  52. package/dist/command/ModelCategoryCreateCommand.js +1 -1
  53. package/dist/command/ModelCategoryCreateCommand.js.map +1 -1
  54. package/dist/command/ModelCategoryDeleteCommand.js +1 -1
  55. package/dist/command/ModelCategoryDeleteCommand.js.map +1 -1
  56. package/dist/command/ModelCategoryGetCommand.js +1 -1
  57. package/dist/command/ModelCategoryGetCommand.js.map +1 -1
  58. package/dist/command/ModelCategoryListCommand.js +3 -3
  59. package/dist/command/ModelCategoryListCommand.js.map +1 -1
  60. package/dist/command/ModelCreateCommand.js +1 -1
  61. package/dist/command/ModelCreateCommand.js.map +1 -1
  62. package/dist/command/ModelDeleteCommand.js +1 -1
  63. package/dist/command/ModelDeleteCommand.js.map +1 -1
  64. package/dist/command/ModelFieldCreateCommand.js +1 -1
  65. package/dist/command/ModelFieldCreateCommand.js.map +1 -1
  66. package/dist/command/ModelFieldDeleteCommand.js +1 -1
  67. package/dist/command/ModelFieldDeleteCommand.js.map +1 -1
  68. package/dist/command/ModelFieldGetCommand.js +1 -1
  69. package/dist/command/ModelFieldGetCommand.js.map +1 -1
  70. package/dist/command/ModelFieldListCommand.js +3 -3
  71. package/dist/command/ModelFieldListCommand.js.map +1 -1
  72. package/dist/command/ModelFieldUpdateCommand.js +1 -1
  73. package/dist/command/ModelFieldUpdateCommand.js.map +1 -1
  74. package/dist/command/ModelGetCommand.js +1 -1
  75. package/dist/command/ModelGetCommand.js.map +1 -1
  76. package/dist/command/ModelListCommand.js +3 -3
  77. package/dist/command/ModelListCommand.js.map +1 -1
  78. package/dist/command/ModelTagCreateCommand.js +1 -1
  79. package/dist/command/ModelTagCreateCommand.js.map +1 -1
  80. package/dist/command/ModelTagDeleteCommand.js +1 -1
  81. package/dist/command/ModelTagDeleteCommand.js.map +1 -1
  82. package/dist/command/ModelTagGetCommand.js +1 -1
  83. package/dist/command/ModelTagGetCommand.js.map +1 -1
  84. package/dist/command/ModelTagListCommand.js +3 -3
  85. package/dist/command/ModelTagListCommand.js.map +1 -1
  86. package/dist/command/ModelTagUpdateCommand.js +1 -1
  87. package/dist/command/ModelTagUpdateCommand.js.map +1 -1
  88. package/dist/command/ModelUpdateCommand.js +1 -1
  89. package/dist/command/ModelUpdateCommand.js.map +1 -1
  90. package/dist/command/UsageSummaryCommand.js +1 -1
  91. package/dist/command/UsageSummaryCommand.js.map +1 -1
  92. package/dist/command/ValueListCommand.js +1 -1
  93. package/dist/command/ValueListCommand.js.map +1 -1
  94. package/dist/command/cli.js +3 -1
  95. package/dist/command/cli.js.map +1 -1
  96. package/dist/enum/LoadBalancerAlgorithm.d.ts +5 -0
  97. package/dist/enum/LoadBalancerAlgorithm.js +10 -0
  98. package/dist/enum/LoadBalancerAlgorithm.js.map +1 -0
  99. package/dist/index.d.ts +15 -0
  100. package/dist/index.js +15 -0
  101. package/dist/index.js.map +1 -1
  102. package/dist/meta/LoadBalancerMetaTable.d.ts +17 -0
  103. package/dist/meta/LoadBalancerMetaTable.js +40 -0
  104. package/dist/meta/LoadBalancerMetaTable.js.map +1 -0
  105. package/dist/meta/ModelCategoryMetaTable.js +1 -1
  106. package/dist/meta/ModelCategoryMetaTable.js.map +1 -1
  107. package/dist/meta/ModelFieldMetaTable.js +1 -1
  108. package/dist/meta/ModelFieldMetaTable.js.map +1 -1
  109. package/dist/meta/ModelMetaTable.js +1 -1
  110. package/dist/meta/ModelMetaTable.js.map +1 -1
  111. package/dist/meta/ModelTagMetaTable.js +1 -1
  112. package/dist/meta/ModelTagMetaTable.js.map +1 -1
  113. package/dist/meta/NamirasoftInferenceMetaDatabase.d.ts +2 -0
  114. package/dist/meta/NamirasoftInferenceMetaDatabase.js +2 -0
  115. package/dist/meta/NamirasoftInferenceMetaDatabase.js.map +1 -1
  116. package/dist/row/LoadBalancerFullRow.d.ts +13 -0
  117. package/dist/row/LoadBalancerFullRow.js +3 -0
  118. package/dist/row/LoadBalancerFullRow.js.map +1 -0
  119. package/dist/row/LoadBalancerInputRow.d.ts +9 -0
  120. package/dist/row/LoadBalancerInputRow.js +3 -0
  121. package/dist/row/LoadBalancerInputRow.js.map +1 -0
  122. package/dist/row/LoadBalancerModelInputRow.d.ts +4 -0
  123. package/dist/row/LoadBalancerModelInputRow.js +3 -0
  124. package/dist/row/LoadBalancerModelInputRow.js.map +1 -0
  125. package/dist/row/LoadBalancerModelRow.d.ts +8 -0
  126. package/dist/row/LoadBalancerModelRow.js +3 -0
  127. package/dist/row/LoadBalancerModelRow.js.map +1 -0
  128. package/dist/row/LoadBalancerRow.d.ts +11 -0
  129. package/dist/row/LoadBalancerRow.js +3 -0
  130. package/dist/row/LoadBalancerRow.js.map +1 -0
  131. package/logo.png +0 -0
  132. package/package.json +3 -3
  133. package/src/NamirasoftInferenceServer.ts +4 -1
  134. package/src/NamirasoftInferenceServerLoadBalancer.ts +80 -0
  135. package/src/NamirasoftInferenceServerModel.ts +2 -2
  136. package/src/NamirasoftInferenceServerModelCategory.ts +2 -2
  137. package/src/NamirasoftInferenceServerModelField.ts +2 -2
  138. package/src/NamirasoftInferenceServerModelTag.ts +2 -2
  139. package/src/command/HealthLivenessCommand.ts +1 -1
  140. package/src/command/HealthReadinessCommand.ts +1 -1
  141. package/src/command/HealthzGetCommand.ts +1 -1
  142. package/src/command/LLMListCommand.ts +1 -1
  143. package/src/command/LoadBalancerAskCommand.ts +83 -0
  144. package/src/command/LoadBalancerCommand.ts +42 -0
  145. package/src/command/LoadBalancerCreateCommand.ts +92 -0
  146. package/src/command/LoadBalancerDeleteCommand.ts +45 -0
  147. package/src/command/LoadBalancerGetCommand.ts +45 -0
  148. package/src/command/LoadBalancerListCommand.ts +45 -0
  149. package/src/command/LoadBalancerUpdateCommand.ts +92 -0
  150. package/src/command/MetricsGetCommand.ts +1 -1
  151. package/src/command/ModelAskCommand.ts +1 -1
  152. package/src/command/ModelCategoryCreateCommand.ts +1 -1
  153. package/src/command/ModelCategoryDeleteCommand.ts +1 -1
  154. package/src/command/ModelCategoryGetCommand.ts +1 -1
  155. package/src/command/ModelCategoryListCommand.ts +3 -3
  156. package/src/command/ModelCreateCommand.ts +1 -1
  157. package/src/command/ModelDeleteCommand.ts +1 -1
  158. package/src/command/ModelFieldCreateCommand.ts +1 -1
  159. package/src/command/ModelFieldDeleteCommand.ts +1 -1
  160. package/src/command/ModelFieldGetCommand.ts +1 -1
  161. package/src/command/ModelFieldListCommand.ts +3 -3
  162. package/src/command/ModelFieldUpdateCommand.ts +1 -1
  163. package/src/command/ModelGetCommand.ts +1 -1
  164. package/src/command/ModelListCommand.ts +3 -3
  165. package/src/command/ModelTagCreateCommand.ts +1 -1
  166. package/src/command/ModelTagDeleteCommand.ts +1 -1
  167. package/src/command/ModelTagGetCommand.ts +1 -1
  168. package/src/command/ModelTagListCommand.ts +3 -3
  169. package/src/command/ModelTagUpdateCommand.ts +1 -1
  170. package/src/command/ModelUpdateCommand.ts +1 -1
  171. package/src/command/UsageSummaryCommand.ts +1 -1
  172. package/src/command/ValueListCommand.ts +1 -1
  173. package/src/command/cli.ts +4 -2
  174. package/src/enum/LoadBalancerAlgorithm.ts +26 -0
  175. package/src/index.ts +15 -0
  176. package/src/meta/LoadBalancerMetaTable.ts +63 -0
  177. package/src/meta/ModelCategoryMetaTable.ts +1 -1
  178. package/src/meta/ModelFieldMetaTable.ts +1 -1
  179. package/src/meta/ModelMetaTable.ts +1 -1
  180. package/src/meta/ModelTagMetaTable.ts +1 -1
  181. package/src/meta/NamirasoftInferenceMetaDatabase.ts +3 -0
  182. package/src/row/LoadBalancerFullRow.ts +35 -0
  183. package/src/row/LoadBalancerInputRow.ts +31 -0
  184. package/src/row/LoadBalancerModelInputRow.ts +25 -0
  185. package/src/row/LoadBalancerModelRow.ts +29 -0
  186. package/src/row/LoadBalancerRow.ts +33 -0
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=LoadBalancerFullRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadBalancerFullRow.js","sourceRoot":"","sources":["../../src/row/LoadBalancerFullRow.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { LoadBalancerAlgorithm } from "../enum/LoadBalancerAlgorithm";
2
+ import { LoadBalancerModelInputRow } from "./LoadBalancerModelInputRow";
3
+ export type LoadBalancerInputRow = {
4
+ workspace_id: (string | null);
5
+ name: string;
6
+ algorithm: LoadBalancerAlgorithm;
7
+ description: (string | null);
8
+ models: LoadBalancerModelInputRow[];
9
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=LoadBalancerInputRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadBalancerInputRow.js","sourceRoot":"","sources":["../../src/row/LoadBalancerInputRow.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export type LoadBalancerModelInputRow = {
2
+ model_id: string;
3
+ weight: number;
4
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=LoadBalancerModelInputRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadBalancerModelInputRow.js","sourceRoot":"","sources":["../../src/row/LoadBalancerModelInputRow.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export type LoadBalancerModelRow = {
2
+ id: string;
3
+ load_balancer_id: string;
4
+ model_id: string;
5
+ weight: number;
6
+ created_at: Date;
7
+ updated_at: Date;
8
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=LoadBalancerModelRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadBalancerModelRow.js","sourceRoot":"","sources":["../../src/row/LoadBalancerModelRow.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import { LoadBalancerAlgorithm } from "../enum/LoadBalancerAlgorithm";
2
+ export type LoadBalancerRow = {
3
+ id: string;
4
+ user_id: string;
5
+ workspace_id: string;
6
+ name: string;
7
+ algorithm: LoadBalancerAlgorithm;
8
+ description: (string | null);
9
+ created_at: Date;
10
+ updated_at: Date;
11
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=LoadBalancerRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadBalancerRow.js","sourceRoot":"","sources":["../../src/row/LoadBalancerRow.ts"],"names":[],"mappings":""}
package/logo.png CHANGED
Binary file
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "framework": "npm",
9
9
  "application": "package",
10
10
  "private": false,
11
- "version": "1.4.1",
11
+ "version": "1.4.2",
12
12
  "author": "Amir Abolhasani",
13
13
  "license": "MIT",
14
14
  "main": "./dist/index.js",
@@ -17,9 +17,9 @@
17
17
  "build": ""
18
18
  },
19
19
  "dependencies": {
20
- "namirasoft-core": "^1.4.115",
20
+ "namirasoft-core": "^1.4.119",
21
21
  "namirasoft-site": "^1.4.45",
22
- "namirasoft-node-cli": "^1.4.13",
22
+ "namirasoft-node-cli": "^1.4.14",
23
23
  "namirasoft-account": "^1.4.108"
24
24
  },
25
25
  "bin": {
@@ -22,6 +22,7 @@ import { NSABaseServer } from "namirasoft-account";
22
22
  import { NamirasoftInferenceServerHealth } from "./NamirasoftInferenceServerHealth";
23
23
  import { NamirasoftInferenceServerHealthz } from "./NamirasoftInferenceServerHealthz";
24
24
  import { NamirasoftInferenceServerLLM } from "./NamirasoftInferenceServerLLM";
25
+ import { NamirasoftInferenceServerLoadBalancer } from "./NamirasoftInferenceServerLoadBalancer";
25
26
  import { NamirasoftInferenceServerMetrics } from "./NamirasoftInferenceServerMetrics";
26
27
  import { NamirasoftInferenceServerModel } from "./NamirasoftInferenceServerModel";
27
28
  import { NamirasoftInferenceServerModelCategory } from "./NamirasoftInferenceServerModelCategory";
@@ -41,11 +42,12 @@ export class NamirasoftInferenceServer extends NSABaseServer
41
42
  model_field: NamirasoftInferenceServerModelField;
42
43
  model_tag: NamirasoftInferenceServerModelTag;
43
44
  model: NamirasoftInferenceServerModel;
45
+ load_balancer: NamirasoftInferenceServerLoadBalancer;
44
46
  llm: NamirasoftInferenceServerLLM;
45
47
  usage: NamirasoftInferenceServerUsage;
46
48
  constructor(base_url: string, token_manager: TokenManager, onError: (error: Error) => void)
47
49
  {
48
- super(base_url, `1.4.1`, token_manager, onError);
50
+ super(base_url, `1.4.2`, token_manager, onError);
49
51
  this.healthz = new NamirasoftInferenceServerHealthz(this);
50
52
  this.health = new NamirasoftInferenceServerHealth(this);
51
53
  this.metrics = new NamirasoftInferenceServerMetrics(this);
@@ -54,6 +56,7 @@ export class NamirasoftInferenceServer extends NSABaseServer
54
56
  this.model_field = new NamirasoftInferenceServerModelField(this);
55
57
  this.model_tag = new NamirasoftInferenceServerModelTag(this);
56
58
  this.model = new NamirasoftInferenceServerModel(this);
59
+ this.load_balancer = new NamirasoftInferenceServerLoadBalancer(this);
57
60
  this.llm = new NamirasoftInferenceServerLLM(this);
58
61
  this.usage = new NamirasoftInferenceServerUsage(this);
59
62
  }
@@ -0,0 +1,80 @@
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 { LoadBalancerFullRow } from "./row/LoadBalancerFullRow";
25
+ import { LoadBalancerInputRow } from "./row/LoadBalancerInputRow";
26
+ import { LoadBalancerRow } from "./row/LoadBalancerRow";
27
+ import { NamirasoftInferenceServer } from "./NamirasoftInferenceServer";
28
+ import { NamirasoftInferenceServerBase } from "./NamirasoftInferenceServerBase";
29
+ import { SortItem } from "namirasoft-core";
30
+
31
+ export class NamirasoftInferenceServerLoadBalancer extends NamirasoftInferenceServerBase
32
+ {
33
+ constructor(server: NamirasoftInferenceServer)
34
+ {
35
+ super(server);
36
+ this.List = this.List.bind(this);
37
+ this.Get = this.Get.bind(this);
38
+ this.Create = this.Create.bind(this);
39
+ this.Update = this.Update.bind(this);
40
+ this.Delete = this.Delete.bind(this);
41
+ this.Ask = this.Ask.bind(this);
42
+ }
43
+ async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], all_workspaces: (boolean | null), config?: BaseServerConfig<any>): Promise<{ rows: LoadBalancerRow[], count: number }>
44
+ {
45
+ let filters_string_value: string = FilterItem.stringify(filters);
46
+ let sorts_string_value: string = SortItem.stringify(sorts);
47
+ let path = `/load/balancer/list`;
48
+ let { data } = await this.server._get<{ rows: LoadBalancerRow[], count: number }>(path, { filters: filters_string_value, page, size, sorts: sorts_string_value, all_workspaces }, config);
49
+ return data;
50
+ }
51
+ async Get(id: (string | null), config?: BaseServerConfig<any>): Promise<LoadBalancerFullRow>
52
+ {
53
+ let path = `/load/balancer/${id}`;
54
+ let { data } = await this.server._get<LoadBalancerFullRow>(path, {}, config);
55
+ return data;
56
+ }
57
+ async Create(body: LoadBalancerInputRow, config?: BaseServerConfig<any>): Promise<LoadBalancerRow>
58
+ {
59
+ let path = `/load/balancer`;
60
+ let { data } = await this.server._post<LoadBalancerRow>(path, {}, body, config);
61
+ return data;
62
+ }
63
+ async Update(id: (string | null), body: LoadBalancerInputRow, config?: BaseServerConfig<any>): Promise<LoadBalancerRow>
64
+ {
65
+ let path = `/load/balancer/${id}`;
66
+ let { data } = await this.server._put<LoadBalancerRow>(path, {}, body, config);
67
+ return data;
68
+ }
69
+ async Delete(id: string, config?: BaseServerConfig<any>): Promise<void>
70
+ {
71
+ let path = `/load/balancer/${id}`;
72
+ await this.server._delete<void>(path, {}, config);
73
+ }
74
+ async Ask(load_balancer_id: string, body: { chat_id: (string | null), run_id: (string | null), message: string, memory_limit: (number | null) }, config?: BaseServerConfig<any>): Promise<InteractionRow>
75
+ {
76
+ let path = `/load/balancer/${load_balancer_id}/ask`;
77
+ let { data } = await this.server._post<InteractionRow>(path, {}, body, config);
78
+ return data;
79
+ }
80
+ };
@@ -39,12 +39,12 @@ export class NamirasoftInferenceServerModel extends NamirasoftInferenceServerBas
39
39
  this.Delete = this.Delete.bind(this);
40
40
  this.Ask = this.Ask.bind(this);
41
41
  }
42
- async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], config?: BaseServerConfig<any>): Promise<{ rows: ModelRow[], count: number }>
42
+ async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], all_workspaces: (boolean | null), config?: BaseServerConfig<any>): Promise<{ rows: ModelRow[], count: number }>
43
43
  {
44
44
  let filters_string_value: string = FilterItem.stringify(filters);
45
45
  let sorts_string_value: string = SortItem.stringify(sorts);
46
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);
47
+ let { data } = await this.server._get<{ rows: ModelRow[], count: number }>(path, { filters: filters_string_value, page, size, sorts: sorts_string_value, all_workspaces }, config);
48
48
  return data;
49
49
  }
50
50
  async Get(id: (string | null), config?: BaseServerConfig<any>): Promise<ModelRow>
@@ -36,12 +36,12 @@ export class NamirasoftInferenceServerModelCategory extends NamirasoftInferenceS
36
36
  this.Create = this.Create.bind(this);
37
37
  this.Delete = this.Delete.bind(this);
38
38
  }
39
- async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], config?: BaseServerConfig<any>): Promise<{ rows: ModelCategoryRow[], count: number }>
39
+ async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], all_workspaces: (boolean | null), config?: BaseServerConfig<any>): Promise<{ rows: ModelCategoryRow[], count: number }>
40
40
  {
41
41
  let filters_string_value: string = FilterItem.stringify(filters);
42
42
  let sorts_string_value: string = SortItem.stringify(sorts);
43
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);
44
+ let { data } = await this.server._get<{ rows: ModelCategoryRow[], count: number }>(path, { filters: filters_string_value, page, size, sorts: sorts_string_value, all_workspaces }, config);
45
45
  return data;
46
46
  }
47
47
  async Get(id: string, config?: BaseServerConfig<any>): Promise<ModelCategoryRow>
@@ -37,12 +37,12 @@ export class NamirasoftInferenceServerModelField extends NamirasoftInferenceServ
37
37
  this.Update = this.Update.bind(this);
38
38
  this.Delete = this.Delete.bind(this);
39
39
  }
40
- async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], config?: BaseServerConfig<any>): Promise<{ rows: ModelFieldRow[], count: number }>
40
+ async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], all_workspaces: (boolean | null), config?: BaseServerConfig<any>): Promise<{ rows: ModelFieldRow[], count: number }>
41
41
  {
42
42
  let filters_string_value: string = FilterItem.stringify(filters);
43
43
  let sorts_string_value: string = SortItem.stringify(sorts);
44
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);
45
+ let { data } = await this.server._get<{ rows: ModelFieldRow[], count: number }>(path, { filters: filters_string_value, page, size, sorts: sorts_string_value, all_workspaces }, config);
46
46
  return data;
47
47
  }
48
48
  async Get(id: string, config?: BaseServerConfig<any>): Promise<ModelFieldRow>
@@ -37,12 +37,12 @@ export class NamirasoftInferenceServerModelTag extends NamirasoftInferenceServer
37
37
  this.Update = this.Update.bind(this);
38
38
  this.Delete = this.Delete.bind(this);
39
39
  }
40
- async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], config?: BaseServerConfig<any>): Promise<{ rows: ModelTagRow[], count: number }>
40
+ async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], all_workspaces: (boolean | null), config?: BaseServerConfig<any>): Promise<{ rows: ModelTagRow[], count: number }>
41
41
  {
42
42
  let filters_string_value: string = FilterItem.stringify(filters);
43
43
  let sorts_string_value: string = SortItem.stringify(sorts);
44
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);
45
+ let { data } = await this.server._get<{ rows: ModelTagRow[], count: number }>(path, { filters: filters_string_value, page, size, sorts: sorts_string_value, all_workspaces }, config);
46
46
  return data;
47
47
  }
48
48
  async Get(id: string, config?: BaseServerConfig<any>): Promise<ModelTagRow>
@@ -33,7 +33,7 @@ export class HealthLivenessCommand 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 HealthReadinessCommand 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 HealthzGetCommand 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 LLMListCommand 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);
@@ -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
+ };