namirasoft-inference 1.5.10 → 1.5.11

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 (140) hide show
  1. package/dist/NamirasoftInferenceServer.d.ts +33 -33
  2. package/dist/NamirasoftInferenceServer.js +1 -1
  3. package/dist/NamirasoftInferenceServerFailover.d.ts +33 -33
  4. package/dist/NamirasoftInferenceServerFailover.js +79 -79
  5. package/dist/NamirasoftInferenceServerLoadBalancer.d.ts +33 -33
  6. package/dist/NamirasoftInferenceServerLoadBalancer.js +79 -79
  7. package/dist/NamirasoftInferenceServerModel.d.ts +32 -32
  8. package/dist/NamirasoftInferenceServerModel.js +79 -79
  9. package/dist/NamirasoftInferenceServerRace.d.ts +33 -33
  10. package/dist/NamirasoftInferenceServerRace.js +79 -79
  11. package/dist/NamirasoftInferenceServerUsage.d.ts +12 -8
  12. package/dist/NamirasoftInferenceServerUsage.js +36 -28
  13. package/dist/NamirasoftInferenceServerUsage.js.map +1 -1
  14. package/dist/command/FailoverAskAsyncCommand.d.ts +5 -5
  15. package/dist/command/FailoverAskAsyncCommand.js +75 -75
  16. package/dist/command/FailoverAskCommand.d.ts +5 -5
  17. package/dist/command/FailoverAskCommand.js +75 -75
  18. package/dist/command/FailoverCommand.d.ts +4 -4
  19. package/dist/command/FailoverCommand.js +26 -26
  20. package/dist/command/FailoverCreateCommand.d.ts +5 -5
  21. package/dist/command/FailoverCreateCommand.js +75 -75
  22. package/dist/command/FailoverDeleteCommand.d.ts +5 -5
  23. package/dist/command/FailoverDeleteCommand.js +37 -37
  24. package/dist/command/FailoverGetCommand.d.ts +5 -5
  25. package/dist/command/FailoverGetCommand.js +37 -37
  26. package/dist/command/FailoverListCommand.d.ts +5 -5
  27. package/dist/command/FailoverListCommand.js +37 -37
  28. package/dist/command/FailoverUpdateCommand.d.ts +5 -5
  29. package/dist/command/FailoverUpdateCommand.js +75 -75
  30. package/dist/command/LoadBalancerAskAsyncCommand.d.ts +5 -5
  31. package/dist/command/LoadBalancerAskAsyncCommand.js +75 -75
  32. package/dist/command/LoadBalancerCommand.js +26 -26
  33. package/dist/command/LoadBalancerCreateCommand.js +84 -84
  34. package/dist/command/LoadBalancerUpdateCommand.js +84 -84
  35. package/dist/command/ModelAskAsyncCommand.d.ts +5 -5
  36. package/dist/command/ModelAskAsyncCommand.js +75 -75
  37. package/dist/command/ModelCommand.js +26 -26
  38. package/dist/command/RaceAskAsyncCommand.d.ts +5 -5
  39. package/dist/command/RaceAskAsyncCommand.js +75 -75
  40. package/dist/command/RaceAskCommand.d.ts +5 -5
  41. package/dist/command/RaceAskCommand.js +75 -75
  42. package/dist/command/RaceCommand.d.ts +4 -4
  43. package/dist/command/RaceCommand.js +26 -26
  44. package/dist/command/RaceCreateCommand.d.ts +5 -5
  45. package/dist/command/RaceCreateCommand.js +75 -75
  46. package/dist/command/RaceDeleteCommand.d.ts +5 -5
  47. package/dist/command/RaceDeleteCommand.js +37 -37
  48. package/dist/command/RaceGetCommand.d.ts +5 -5
  49. package/dist/command/RaceGetCommand.js +37 -37
  50. package/dist/command/RaceListCommand.d.ts +5 -5
  51. package/dist/command/RaceListCommand.js +37 -37
  52. package/dist/command/RaceUpdateCommand.d.ts +5 -5
  53. package/dist/command/RaceUpdateCommand.js +75 -75
  54. package/dist/command/UsageCommand.js +16 -14
  55. package/dist/command/UsageCommand.js.map +1 -1
  56. package/dist/command/UsageDashboardCommand.d.ts +5 -0
  57. package/dist/command/UsageDashboardCommand.js +38 -0
  58. package/dist/command/UsageDashboardCommand.js.map +1 -0
  59. package/dist/command/cli.js +39 -39
  60. package/dist/enum/ChatInferencerType.d.ts +6 -6
  61. package/dist/enum/ChatInferencerType.js +10 -10
  62. package/dist/enum/FailoverTargetInferencerType.d.ts +6 -6
  63. package/dist/enum/FailoverTargetInferencerType.js +10 -10
  64. package/dist/enum/InferencerType.d.ts +6 -0
  65. package/dist/enum/InferencerType.js +11 -0
  66. package/dist/enum/InferencerType.js.map +1 -0
  67. package/dist/enum/InteractionInferencerType.d.ts +6 -6
  68. package/dist/enum/InteractionInferencerType.js +10 -10
  69. package/dist/enum/LoadBalancerTargetInferencerType.d.ts +6 -6
  70. package/dist/enum/LoadBalancerTargetInferencerType.js +10 -10
  71. package/dist/enum/RaceTargetInferencerType.d.ts +6 -6
  72. package/dist/enum/RaceTargetInferencerType.js +10 -10
  73. package/dist/enum/UsageBucketType.d.ts +4 -0
  74. package/dist/enum/UsageBucketType.js +9 -0
  75. package/dist/enum/UsageBucketType.js.map +1 -0
  76. package/dist/index.d.ts +5 -0
  77. package/dist/index.js +5 -0
  78. package/dist/index.js.map +1 -1
  79. package/dist/meta/ChatMetaTable.d.ts +23 -23
  80. package/dist/meta/ChatMetaTable.js +47 -47
  81. package/dist/meta/FailoverMetaTable.d.ts +16 -16
  82. package/dist/meta/FailoverMetaTable.js +38 -38
  83. package/dist/meta/FailoverTargetMetaTable.d.ts +17 -17
  84. package/dist/meta/FailoverTargetMetaTable.js +26 -26
  85. package/dist/meta/InteractionMetaTable.d.ts +35 -35
  86. package/dist/meta/InteractionMetaTable.js +59 -59
  87. package/dist/meta/LoadBalancerTargetMetaTable.d.ts +16 -16
  88. package/dist/meta/LoadBalancerTargetMetaTable.js +25 -25
  89. package/dist/meta/NamirasoftInferenceMetaDatabase.d.ts +35 -35
  90. package/dist/meta/NamirasoftInferenceMetaDatabase.js +48 -48
  91. package/dist/meta/RaceMetaTable.d.ts +16 -16
  92. package/dist/meta/RaceMetaTable.js +38 -38
  93. package/dist/meta/RaceTargetMetaTable.d.ts +15 -15
  94. package/dist/meta/RaceTargetMetaTable.js +24 -24
  95. package/dist/row/AskAsyncResponseRow.d.ts +4 -4
  96. package/dist/row/AskAsyncResponseRow.js +2 -2
  97. package/dist/row/ChatRow.d.ts +17 -17
  98. package/dist/row/FailoverFullRow.d.ts +11 -11
  99. package/dist/row/FailoverFullRow.js +2 -2
  100. package/dist/row/FailoverInputRow.d.ts +7 -7
  101. package/dist/row/FailoverInputRow.js +2 -2
  102. package/dist/row/FailoverRow.d.ts +9 -9
  103. package/dist/row/FailoverRow.js +2 -2
  104. package/dist/row/FailoverTargetInputRow.d.ts +6 -6
  105. package/dist/row/FailoverTargetInputRow.js +2 -2
  106. package/dist/row/FailoverTargetRow.d.ts +11 -11
  107. package/dist/row/FailoverTargetRow.js +2 -2
  108. package/dist/row/InteractionRow.d.ts +32 -32
  109. package/dist/row/LoadBalancerFullRow.d.ts +13 -13
  110. package/dist/row/LoadBalancerInputRow.d.ts +9 -9
  111. package/dist/row/LoadBalancerTargetInputRow.d.ts +6 -6
  112. package/dist/row/LoadBalancerTargetInputRow.js +2 -2
  113. package/dist/row/LoadBalancerTargetRow.d.ts +10 -10
  114. package/dist/row/LoadBalancerTargetRow.js +2 -2
  115. package/dist/row/RaceFullRow.d.ts +11 -11
  116. package/dist/row/RaceFullRow.js +2 -2
  117. package/dist/row/RaceInputRow.d.ts +7 -7
  118. package/dist/row/RaceInputRow.js +2 -2
  119. package/dist/row/RaceRow.d.ts +9 -9
  120. package/dist/row/RaceRow.js +2 -2
  121. package/dist/row/RaceTargetInputRow.d.ts +5 -5
  122. package/dist/row/RaceTargetInputRow.js +2 -2
  123. package/dist/row/RaceTargetRow.d.ts +9 -9
  124. package/dist/row/RaceTargetRow.js +2 -2
  125. package/dist/row/UsageDashboardBucketRow.d.ts +10 -0
  126. package/dist/row/UsageDashboardBucketRow.js +3 -0
  127. package/dist/row/UsageDashboardBucketRow.js.map +1 -0
  128. package/dist/row/UsageDashboardResponseRow.d.ts +8 -0
  129. package/dist/row/UsageDashboardResponseRow.js +3 -0
  130. package/dist/row/UsageDashboardResponseRow.js.map +1 -0
  131. package/package.json +1 -1
  132. package/src/NamirasoftInferenceServer.ts +1 -1
  133. package/src/NamirasoftInferenceServerUsage.ts +10 -0
  134. package/src/command/UsageCommand.ts +2 -0
  135. package/src/command/UsageDashboardCommand.ts +45 -0
  136. package/src/enum/InferencerType.ts +27 -0
  137. package/src/enum/UsageBucketType.ts +25 -0
  138. package/src/index.ts +5 -0
  139. package/src/row/UsageDashboardBucketRow.ts +31 -0
  140. package/src/row/UsageDashboardResponseRow.ts +30 -0
@@ -1,33 +1,33 @@
1
- import { NSABaseServer } from "namirasoft-account";
2
- import { NamirasoftInferenceServerChat } from "./NamirasoftInferenceServerChat";
3
- import { NamirasoftInferenceServerFailover } from "./NamirasoftInferenceServerFailover";
4
- import { NamirasoftInferenceServerHealth } from "./NamirasoftInferenceServerHealth";
5
- import { NamirasoftInferenceServerInteraction } from "./NamirasoftInferenceServerInteraction";
6
- import { NamirasoftInferenceServerLLM } from "./NamirasoftInferenceServerLLM";
7
- import { NamirasoftInferenceServerLoadBalancer } from "./NamirasoftInferenceServerLoadBalancer";
8
- import { NamirasoftInferenceServerMetrics } from "./NamirasoftInferenceServerMetrics";
9
- import { NamirasoftInferenceServerModel } from "./NamirasoftInferenceServerModel";
10
- import { NamirasoftInferenceServerModelCategory } from "./NamirasoftInferenceServerModelCategory";
11
- import { NamirasoftInferenceServerModelField } from "./NamirasoftInferenceServerModelField";
12
- import { NamirasoftInferenceServerModelTag } from "./NamirasoftInferenceServerModelTag";
13
- import { NamirasoftInferenceServerRace } from "./NamirasoftInferenceServerRace";
14
- import { NamirasoftInferenceServerUsage } from "./NamirasoftInferenceServerUsage";
15
- import { NamirasoftInferenceServerValue } from "./NamirasoftInferenceServerValue";
16
- import { TokenManager } from "namirasoft-account";
17
- export declare class NamirasoftInferenceServer extends NSABaseServer {
18
- health: NamirasoftInferenceServerHealth;
19
- metrics: NamirasoftInferenceServerMetrics;
20
- value: NamirasoftInferenceServerValue;
21
- model_category: NamirasoftInferenceServerModelCategory;
22
- model_field: NamirasoftInferenceServerModelField;
23
- model_tag: NamirasoftInferenceServerModelTag;
24
- model: NamirasoftInferenceServerModel;
25
- load_balancer: NamirasoftInferenceServerLoadBalancer;
26
- failover: NamirasoftInferenceServerFailover;
27
- race: NamirasoftInferenceServerRace;
28
- llm: NamirasoftInferenceServerLLM;
29
- chat: NamirasoftInferenceServerChat;
30
- interaction: NamirasoftInferenceServerInteraction;
31
- usage: NamirasoftInferenceServerUsage;
32
- constructor(base_url: string, token_manager: TokenManager, onError: (error: Error) => void);
33
- }
1
+ import { NSABaseServer } from "namirasoft-account";
2
+ import { NamirasoftInferenceServerChat } from "./NamirasoftInferenceServerChat";
3
+ import { NamirasoftInferenceServerFailover } from "./NamirasoftInferenceServerFailover";
4
+ import { NamirasoftInferenceServerHealth } from "./NamirasoftInferenceServerHealth";
5
+ import { NamirasoftInferenceServerInteraction } from "./NamirasoftInferenceServerInteraction";
6
+ import { NamirasoftInferenceServerLLM } from "./NamirasoftInferenceServerLLM";
7
+ import { NamirasoftInferenceServerLoadBalancer } from "./NamirasoftInferenceServerLoadBalancer";
8
+ import { NamirasoftInferenceServerMetrics } from "./NamirasoftInferenceServerMetrics";
9
+ import { NamirasoftInferenceServerModel } from "./NamirasoftInferenceServerModel";
10
+ import { NamirasoftInferenceServerModelCategory } from "./NamirasoftInferenceServerModelCategory";
11
+ import { NamirasoftInferenceServerModelField } from "./NamirasoftInferenceServerModelField";
12
+ import { NamirasoftInferenceServerModelTag } from "./NamirasoftInferenceServerModelTag";
13
+ import { NamirasoftInferenceServerRace } from "./NamirasoftInferenceServerRace";
14
+ import { NamirasoftInferenceServerUsage } from "./NamirasoftInferenceServerUsage";
15
+ import { NamirasoftInferenceServerValue } from "./NamirasoftInferenceServerValue";
16
+ import { TokenManager } from "namirasoft-account";
17
+ export declare class NamirasoftInferenceServer extends NSABaseServer {
18
+ health: NamirasoftInferenceServerHealth;
19
+ metrics: NamirasoftInferenceServerMetrics;
20
+ value: NamirasoftInferenceServerValue;
21
+ model_category: NamirasoftInferenceServerModelCategory;
22
+ model_field: NamirasoftInferenceServerModelField;
23
+ model_tag: NamirasoftInferenceServerModelTag;
24
+ model: NamirasoftInferenceServerModel;
25
+ load_balancer: NamirasoftInferenceServerLoadBalancer;
26
+ failover: NamirasoftInferenceServerFailover;
27
+ race: NamirasoftInferenceServerRace;
28
+ llm: NamirasoftInferenceServerLLM;
29
+ chat: NamirasoftInferenceServerChat;
30
+ interaction: NamirasoftInferenceServerInteraction;
31
+ usage: NamirasoftInferenceServerUsage;
32
+ constructor(base_url: string, token_manager: TokenManager, onError: (error: Error) => void);
33
+ }
@@ -18,7 +18,7 @@ const NamirasoftInferenceServerUsage_1 = require("./NamirasoftInferenceServerUsa
18
18
  const NamirasoftInferenceServerValue_1 = require("./NamirasoftInferenceServerValue");
19
19
  class NamirasoftInferenceServer extends namirasoft_account_1.NSABaseServer {
20
20
  constructor(base_url, token_manager, onError) {
21
- super(base_url, `1.5.10`, token_manager, onError);
21
+ super(base_url, `1.5.11`, token_manager, onError);
22
22
  this.health = new NamirasoftInferenceServerHealth_1.NamirasoftInferenceServerHealth(this);
23
23
  this.metrics = new NamirasoftInferenceServerMetrics_1.NamirasoftInferenceServerMetrics(this);
24
24
  this.value = new NamirasoftInferenceServerValue_1.NamirasoftInferenceServerValue(this);
@@ -1,33 +1,33 @@
1
- import { AskAsyncResponseRow } from "./row/AskAsyncResponseRow";
2
- import { BaseServerConfig } from "namirasoft-core";
3
- import { FailoverFullRow } from "./row/FailoverFullRow";
4
- import { FailoverInputRow } from "./row/FailoverInputRow";
5
- import { FailoverRow } from "./row/FailoverRow";
6
- import { FilterItem } from "namirasoft-core";
7
- import { InteractionRow } from "./row/InteractionRow";
8
- import { NamirasoftInferenceServer } from "./NamirasoftInferenceServer";
9
- import { NamirasoftInferenceServerBase } from "./NamirasoftInferenceServerBase";
10
- import { SortItem } from "namirasoft-core";
11
- export declare class NamirasoftInferenceServerFailover extends NamirasoftInferenceServerBase {
12
- constructor(server: NamirasoftInferenceServer);
13
- List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], all_workspaces: (boolean | null), config?: BaseServerConfig<any>): Promise<{
14
- rows: FailoverRow[];
15
- count: number;
16
- }>;
17
- Get(id: (string | null), config?: BaseServerConfig<any>): Promise<FailoverFullRow>;
18
- Create(body: FailoverInputRow, config?: BaseServerConfig<any>): Promise<FailoverRow>;
19
- Update(id: (string | null), body: FailoverInputRow, config?: BaseServerConfig<any>): Promise<FailoverRow>;
20
- Delete(id: string, config?: BaseServerConfig<any>): Promise<void>;
21
- Ask(failover_id: string, body: {
22
- chat_id: (string | null);
23
- run_id: (string | null);
24
- message: string;
25
- memory_limit: (number | null);
26
- }, config?: BaseServerConfig<any>): Promise<InteractionRow>;
27
- AskAsync(failover_id: string, body: {
28
- chat_id: (string | null);
29
- run_id: (string | null);
30
- message: string;
31
- memory_limit: (number | null);
32
- }, config?: BaseServerConfig<any>): Promise<AskAsyncResponseRow>;
33
- }
1
+ import { AskAsyncResponseRow } from "./row/AskAsyncResponseRow";
2
+ import { BaseServerConfig } from "namirasoft-core";
3
+ import { FailoverFullRow } from "./row/FailoverFullRow";
4
+ import { FailoverInputRow } from "./row/FailoverInputRow";
5
+ import { FailoverRow } from "./row/FailoverRow";
6
+ import { FilterItem } from "namirasoft-core";
7
+ import { InteractionRow } from "./row/InteractionRow";
8
+ import { NamirasoftInferenceServer } from "./NamirasoftInferenceServer";
9
+ import { NamirasoftInferenceServerBase } from "./NamirasoftInferenceServerBase";
10
+ import { SortItem } from "namirasoft-core";
11
+ export declare class NamirasoftInferenceServerFailover extends NamirasoftInferenceServerBase {
12
+ constructor(server: NamirasoftInferenceServer);
13
+ List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], all_workspaces: (boolean | null), config?: BaseServerConfig<any>): Promise<{
14
+ rows: FailoverRow[];
15
+ count: number;
16
+ }>;
17
+ Get(id: (string | null), config?: BaseServerConfig<any>): Promise<FailoverFullRow>;
18
+ Create(body: FailoverInputRow, config?: BaseServerConfig<any>): Promise<FailoverRow>;
19
+ Update(id: (string | null), body: FailoverInputRow, config?: BaseServerConfig<any>): Promise<FailoverRow>;
20
+ Delete(id: string, config?: BaseServerConfig<any>): Promise<void>;
21
+ Ask(failover_id: string, body: {
22
+ chat_id: (string | null);
23
+ run_id: (string | null);
24
+ message: string;
25
+ memory_limit: (number | null);
26
+ }, config?: BaseServerConfig<any>): Promise<InteractionRow>;
27
+ AskAsync(failover_id: string, body: {
28
+ chat_id: (string | null);
29
+ run_id: (string | null);
30
+ message: string;
31
+ memory_limit: (number | null);
32
+ }, config?: BaseServerConfig<any>): Promise<AskAsyncResponseRow>;
33
+ }
@@ -1,80 +1,80 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.NamirasoftInferenceServerFailover = void 0;
13
- const namirasoft_core_1 = require("namirasoft-core");
14
- const NamirasoftInferenceServerBase_1 = require("./NamirasoftInferenceServerBase");
15
- const namirasoft_core_2 = require("namirasoft-core");
16
- class NamirasoftInferenceServerFailover extends NamirasoftInferenceServerBase_1.NamirasoftInferenceServerBase {
17
- constructor(server) {
18
- super(server);
19
- this.List = this.List.bind(this);
20
- this.Get = this.Get.bind(this);
21
- this.Create = this.Create.bind(this);
22
- this.Update = this.Update.bind(this);
23
- this.Delete = this.Delete.bind(this);
24
- this.Ask = this.Ask.bind(this);
25
- this.AskAsync = this.AskAsync.bind(this);
26
- }
27
- List(filters, page, size, sorts, all_workspaces, config) {
28
- return __awaiter(this, void 0, void 0, function* () {
29
- let filters_string_value = namirasoft_core_1.FilterItem.stringify(filters);
30
- let sorts_string_value = namirasoft_core_2.SortItem.stringify(sorts);
31
- let path = `/failover/list`;
32
- let { data } = yield this.server._get(path, { filters: filters_string_value, page, size, sorts: sorts_string_value, all_workspaces }, config);
33
- return data;
34
- });
35
- }
36
- Get(id, config) {
37
- return __awaiter(this, void 0, void 0, function* () {
38
- let path = `/failover/${id}`;
39
- let { data } = yield this.server._get(path, {}, config);
40
- return data;
41
- });
42
- }
43
- Create(body, config) {
44
- return __awaiter(this, void 0, void 0, function* () {
45
- let path = `/failover`;
46
- let { data } = yield this.server._post(path, {}, body, config);
47
- return data;
48
- });
49
- }
50
- Update(id, body, config) {
51
- return __awaiter(this, void 0, void 0, function* () {
52
- let path = `/failover/${id}`;
53
- let { data } = yield this.server._put(path, {}, body, config);
54
- return data;
55
- });
56
- }
57
- Delete(id, config) {
58
- return __awaiter(this, void 0, void 0, function* () {
59
- let path = `/failover/${id}`;
60
- yield this.server._delete(path, {}, config);
61
- });
62
- }
63
- Ask(failover_id, body, config) {
64
- return __awaiter(this, void 0, void 0, function* () {
65
- let path = `/failover/${failover_id}/ask`;
66
- let { data } = yield this.server._post(path, {}, body, config);
67
- return data;
68
- });
69
- }
70
- AskAsync(failover_id, body, config) {
71
- return __awaiter(this, void 0, void 0, function* () {
72
- let path = `/failover/${failover_id}/ask-async`;
73
- let { data } = yield this.server._post(path, {}, body, config);
74
- return data;
75
- });
76
- }
77
- }
78
- exports.NamirasoftInferenceServerFailover = NamirasoftInferenceServerFailover;
79
- ;
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.NamirasoftInferenceServerFailover = void 0;
13
+ const namirasoft_core_1 = require("namirasoft-core");
14
+ const NamirasoftInferenceServerBase_1 = require("./NamirasoftInferenceServerBase");
15
+ const namirasoft_core_2 = require("namirasoft-core");
16
+ class NamirasoftInferenceServerFailover extends NamirasoftInferenceServerBase_1.NamirasoftInferenceServerBase {
17
+ constructor(server) {
18
+ super(server);
19
+ this.List = this.List.bind(this);
20
+ this.Get = this.Get.bind(this);
21
+ this.Create = this.Create.bind(this);
22
+ this.Update = this.Update.bind(this);
23
+ this.Delete = this.Delete.bind(this);
24
+ this.Ask = this.Ask.bind(this);
25
+ this.AskAsync = this.AskAsync.bind(this);
26
+ }
27
+ List(filters, page, size, sorts, all_workspaces, config) {
28
+ return __awaiter(this, void 0, void 0, function* () {
29
+ let filters_string_value = namirasoft_core_1.FilterItem.stringify(filters);
30
+ let sorts_string_value = namirasoft_core_2.SortItem.stringify(sorts);
31
+ let path = `/failover/list`;
32
+ let { data } = yield this.server._get(path, { filters: filters_string_value, page, size, sorts: sorts_string_value, all_workspaces }, config);
33
+ return data;
34
+ });
35
+ }
36
+ Get(id, config) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ let path = `/failover/${id}`;
39
+ let { data } = yield this.server._get(path, {}, config);
40
+ return data;
41
+ });
42
+ }
43
+ Create(body, config) {
44
+ return __awaiter(this, void 0, void 0, function* () {
45
+ let path = `/failover`;
46
+ let { data } = yield this.server._post(path, {}, body, config);
47
+ return data;
48
+ });
49
+ }
50
+ Update(id, body, config) {
51
+ return __awaiter(this, void 0, void 0, function* () {
52
+ let path = `/failover/${id}`;
53
+ let { data } = yield this.server._put(path, {}, body, config);
54
+ return data;
55
+ });
56
+ }
57
+ Delete(id, config) {
58
+ return __awaiter(this, void 0, void 0, function* () {
59
+ let path = `/failover/${id}`;
60
+ yield this.server._delete(path, {}, config);
61
+ });
62
+ }
63
+ Ask(failover_id, body, config) {
64
+ return __awaiter(this, void 0, void 0, function* () {
65
+ let path = `/failover/${failover_id}/ask`;
66
+ let { data } = yield this.server._post(path, {}, body, config);
67
+ return data;
68
+ });
69
+ }
70
+ AskAsync(failover_id, body, config) {
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ let path = `/failover/${failover_id}/ask-async`;
73
+ let { data } = yield this.server._post(path, {}, body, config);
74
+ return data;
75
+ });
76
+ }
77
+ }
78
+ exports.NamirasoftInferenceServerFailover = NamirasoftInferenceServerFailover;
79
+ ;
80
80
  //# sourceMappingURL=NamirasoftInferenceServerFailover.js.map
@@ -1,33 +1,33 @@
1
- import { AskAsyncResponseRow } from "./row/AskAsyncResponseRow";
2
- import { BaseServerConfig } from "namirasoft-core";
3
- import { FilterItem } from "namirasoft-core";
4
- import { InteractionRow } from "./row/InteractionRow";
5
- import { LoadBalancerFullRow } from "./row/LoadBalancerFullRow";
6
- import { LoadBalancerInputRow } from "./row/LoadBalancerInputRow";
7
- import { LoadBalancerRow } from "./row/LoadBalancerRow";
8
- import { NamirasoftInferenceServer } from "./NamirasoftInferenceServer";
9
- import { NamirasoftInferenceServerBase } from "./NamirasoftInferenceServerBase";
10
- import { SortItem } from "namirasoft-core";
11
- export declare class NamirasoftInferenceServerLoadBalancer extends NamirasoftInferenceServerBase {
12
- constructor(server: NamirasoftInferenceServer);
13
- List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], all_workspaces: (boolean | null), config?: BaseServerConfig<any>): Promise<{
14
- rows: LoadBalancerRow[];
15
- count: number;
16
- }>;
17
- Get(id: (string | null), config?: BaseServerConfig<any>): Promise<LoadBalancerFullRow>;
18
- Create(body: LoadBalancerInputRow, config?: BaseServerConfig<any>): Promise<LoadBalancerRow>;
19
- Update(id: (string | null), body: LoadBalancerInputRow, config?: BaseServerConfig<any>): Promise<LoadBalancerRow>;
20
- Delete(id: string, config?: BaseServerConfig<any>): Promise<void>;
21
- Ask(load_balancer_id: string, body: {
22
- chat_id: (string | null);
23
- run_id: (string | null);
24
- message: string;
25
- memory_limit: (number | null);
26
- }, config?: BaseServerConfig<any>): Promise<InteractionRow>;
27
- AskAsync(load_balancer_id: string, body: {
28
- chat_id: (string | null);
29
- run_id: (string | null);
30
- message: string;
31
- memory_limit: (number | null);
32
- }, config?: BaseServerConfig<any>): Promise<AskAsyncResponseRow>;
33
- }
1
+ import { AskAsyncResponseRow } from "./row/AskAsyncResponseRow";
2
+ import { BaseServerConfig } from "namirasoft-core";
3
+ import { FilterItem } from "namirasoft-core";
4
+ import { InteractionRow } from "./row/InteractionRow";
5
+ import { LoadBalancerFullRow } from "./row/LoadBalancerFullRow";
6
+ import { LoadBalancerInputRow } from "./row/LoadBalancerInputRow";
7
+ import { LoadBalancerRow } from "./row/LoadBalancerRow";
8
+ import { NamirasoftInferenceServer } from "./NamirasoftInferenceServer";
9
+ import { NamirasoftInferenceServerBase } from "./NamirasoftInferenceServerBase";
10
+ import { SortItem } from "namirasoft-core";
11
+ export declare class NamirasoftInferenceServerLoadBalancer extends NamirasoftInferenceServerBase {
12
+ constructor(server: NamirasoftInferenceServer);
13
+ List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], all_workspaces: (boolean | null), config?: BaseServerConfig<any>): Promise<{
14
+ rows: LoadBalancerRow[];
15
+ count: number;
16
+ }>;
17
+ Get(id: (string | null), config?: BaseServerConfig<any>): Promise<LoadBalancerFullRow>;
18
+ Create(body: LoadBalancerInputRow, config?: BaseServerConfig<any>): Promise<LoadBalancerRow>;
19
+ Update(id: (string | null), body: LoadBalancerInputRow, config?: BaseServerConfig<any>): Promise<LoadBalancerRow>;
20
+ Delete(id: string, config?: BaseServerConfig<any>): Promise<void>;
21
+ Ask(load_balancer_id: string, body: {
22
+ chat_id: (string | null);
23
+ run_id: (string | null);
24
+ message: string;
25
+ memory_limit: (number | null);
26
+ }, config?: BaseServerConfig<any>): Promise<InteractionRow>;
27
+ AskAsync(load_balancer_id: string, body: {
28
+ chat_id: (string | null);
29
+ run_id: (string | null);
30
+ message: string;
31
+ memory_limit: (number | null);
32
+ }, config?: BaseServerConfig<any>): Promise<AskAsyncResponseRow>;
33
+ }
@@ -1,80 +1,80 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.NamirasoftInferenceServerLoadBalancer = void 0;
13
- const namirasoft_core_1 = require("namirasoft-core");
14
- const NamirasoftInferenceServerBase_1 = require("./NamirasoftInferenceServerBase");
15
- const namirasoft_core_2 = require("namirasoft-core");
16
- class NamirasoftInferenceServerLoadBalancer extends NamirasoftInferenceServerBase_1.NamirasoftInferenceServerBase {
17
- constructor(server) {
18
- super(server);
19
- this.List = this.List.bind(this);
20
- this.Get = this.Get.bind(this);
21
- this.Create = this.Create.bind(this);
22
- this.Update = this.Update.bind(this);
23
- this.Delete = this.Delete.bind(this);
24
- this.Ask = this.Ask.bind(this);
25
- this.AskAsync = this.AskAsync.bind(this);
26
- }
27
- List(filters, page, size, sorts, all_workspaces, config) {
28
- return __awaiter(this, void 0, void 0, function* () {
29
- let filters_string_value = namirasoft_core_1.FilterItem.stringify(filters);
30
- let sorts_string_value = namirasoft_core_2.SortItem.stringify(sorts);
31
- let path = `/load/balancer/list`;
32
- let { data } = yield this.server._get(path, { filters: filters_string_value, page, size, sorts: sorts_string_value, all_workspaces }, config);
33
- return data;
34
- });
35
- }
36
- Get(id, config) {
37
- return __awaiter(this, void 0, void 0, function* () {
38
- let path = `/load/balancer/${id}`;
39
- let { data } = yield this.server._get(path, {}, config);
40
- return data;
41
- });
42
- }
43
- Create(body, config) {
44
- return __awaiter(this, void 0, void 0, function* () {
45
- let path = `/load/balancer`;
46
- let { data } = yield this.server._post(path, {}, body, config);
47
- return data;
48
- });
49
- }
50
- Update(id, body, config) {
51
- return __awaiter(this, void 0, void 0, function* () {
52
- let path = `/load/balancer/${id}`;
53
- let { data } = yield this.server._put(path, {}, body, config);
54
- return data;
55
- });
56
- }
57
- Delete(id, config) {
58
- return __awaiter(this, void 0, void 0, function* () {
59
- let path = `/load/balancer/${id}`;
60
- yield this.server._delete(path, {}, config);
61
- });
62
- }
63
- Ask(load_balancer_id, body, config) {
64
- return __awaiter(this, void 0, void 0, function* () {
65
- let path = `/load/balancer/${load_balancer_id}/ask`;
66
- let { data } = yield this.server._post(path, {}, body, config);
67
- return data;
68
- });
69
- }
70
- AskAsync(load_balancer_id, body, config) {
71
- return __awaiter(this, void 0, void 0, function* () {
72
- let path = `/load/balancer/${load_balancer_id}/ask-async`;
73
- let { data } = yield this.server._post(path, {}, body, config);
74
- return data;
75
- });
76
- }
77
- }
78
- exports.NamirasoftInferenceServerLoadBalancer = NamirasoftInferenceServerLoadBalancer;
79
- ;
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.NamirasoftInferenceServerLoadBalancer = void 0;
13
+ const namirasoft_core_1 = require("namirasoft-core");
14
+ const NamirasoftInferenceServerBase_1 = require("./NamirasoftInferenceServerBase");
15
+ const namirasoft_core_2 = require("namirasoft-core");
16
+ class NamirasoftInferenceServerLoadBalancer extends NamirasoftInferenceServerBase_1.NamirasoftInferenceServerBase {
17
+ constructor(server) {
18
+ super(server);
19
+ this.List = this.List.bind(this);
20
+ this.Get = this.Get.bind(this);
21
+ this.Create = this.Create.bind(this);
22
+ this.Update = this.Update.bind(this);
23
+ this.Delete = this.Delete.bind(this);
24
+ this.Ask = this.Ask.bind(this);
25
+ this.AskAsync = this.AskAsync.bind(this);
26
+ }
27
+ List(filters, page, size, sorts, all_workspaces, config) {
28
+ return __awaiter(this, void 0, void 0, function* () {
29
+ let filters_string_value = namirasoft_core_1.FilterItem.stringify(filters);
30
+ let sorts_string_value = namirasoft_core_2.SortItem.stringify(sorts);
31
+ let path = `/load/balancer/list`;
32
+ let { data } = yield this.server._get(path, { filters: filters_string_value, page, size, sorts: sorts_string_value, all_workspaces }, config);
33
+ return data;
34
+ });
35
+ }
36
+ Get(id, config) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ let path = `/load/balancer/${id}`;
39
+ let { data } = yield this.server._get(path, {}, config);
40
+ return data;
41
+ });
42
+ }
43
+ Create(body, config) {
44
+ return __awaiter(this, void 0, void 0, function* () {
45
+ let path = `/load/balancer`;
46
+ let { data } = yield this.server._post(path, {}, body, config);
47
+ return data;
48
+ });
49
+ }
50
+ Update(id, body, config) {
51
+ return __awaiter(this, void 0, void 0, function* () {
52
+ let path = `/load/balancer/${id}`;
53
+ let { data } = yield this.server._put(path, {}, body, config);
54
+ return data;
55
+ });
56
+ }
57
+ Delete(id, config) {
58
+ return __awaiter(this, void 0, void 0, function* () {
59
+ let path = `/load/balancer/${id}`;
60
+ yield this.server._delete(path, {}, config);
61
+ });
62
+ }
63
+ Ask(load_balancer_id, body, config) {
64
+ return __awaiter(this, void 0, void 0, function* () {
65
+ let path = `/load/balancer/${load_balancer_id}/ask`;
66
+ let { data } = yield this.server._post(path, {}, body, config);
67
+ return data;
68
+ });
69
+ }
70
+ AskAsync(load_balancer_id, body, config) {
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ let path = `/load/balancer/${load_balancer_id}/ask-async`;
73
+ let { data } = yield this.server._post(path, {}, body, config);
74
+ return data;
75
+ });
76
+ }
77
+ }
78
+ exports.NamirasoftInferenceServerLoadBalancer = NamirasoftInferenceServerLoadBalancer;
79
+ ;
80
80
  //# sourceMappingURL=NamirasoftInferenceServerLoadBalancer.js.map
@@ -1,32 +1,32 @@
1
- import { AskAsyncResponseRow } from "./row/AskAsyncResponseRow";
2
- import { BaseServerConfig } from "namirasoft-core";
3
- import { FilterItem } from "namirasoft-core";
4
- import { InteractionRow } from "./row/InteractionRow";
5
- import { ModelInputRow } from "./row/ModelInputRow";
6
- import { ModelRow } from "./row/ModelRow";
7
- import { NamirasoftInferenceServer } from "./NamirasoftInferenceServer";
8
- import { NamirasoftInferenceServerBase } from "./NamirasoftInferenceServerBase";
9
- import { SortItem } from "namirasoft-core";
10
- export declare class NamirasoftInferenceServerModel extends NamirasoftInferenceServerBase {
11
- constructor(server: NamirasoftInferenceServer);
12
- List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], all_workspaces: (boolean | null), config?: BaseServerConfig<any>): Promise<{
13
- rows: ModelRow[];
14
- count: number;
15
- }>;
16
- Get(id: (string | null), config?: BaseServerConfig<any>): Promise<ModelRow>;
17
- Create(body: ModelInputRow, config?: BaseServerConfig<any>): Promise<ModelRow>;
18
- Update(id: (string | null), body: ModelInputRow, config?: BaseServerConfig<any>): Promise<ModelRow>;
19
- Delete(id: string, config?: BaseServerConfig<any>): Promise<void>;
20
- Ask(model_id: string, body: {
21
- chat_id: (string | null);
22
- run_id: (string | null);
23
- message: string;
24
- memory_limit: (number | null);
25
- }, config?: BaseServerConfig<any>): Promise<InteractionRow>;
26
- AskAsync(model_id: string, body: {
27
- chat_id: (string | null);
28
- run_id: (string | null);
29
- message: string;
30
- memory_limit: (number | null);
31
- }, config?: BaseServerConfig<any>): Promise<AskAsyncResponseRow>;
32
- }
1
+ import { AskAsyncResponseRow } from "./row/AskAsyncResponseRow";
2
+ import { BaseServerConfig } from "namirasoft-core";
3
+ import { FilterItem } from "namirasoft-core";
4
+ import { InteractionRow } from "./row/InteractionRow";
5
+ import { ModelInputRow } from "./row/ModelInputRow";
6
+ import { ModelRow } from "./row/ModelRow";
7
+ import { NamirasoftInferenceServer } from "./NamirasoftInferenceServer";
8
+ import { NamirasoftInferenceServerBase } from "./NamirasoftInferenceServerBase";
9
+ import { SortItem } from "namirasoft-core";
10
+ export declare class NamirasoftInferenceServerModel extends NamirasoftInferenceServerBase {
11
+ constructor(server: NamirasoftInferenceServer);
12
+ List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], all_workspaces: (boolean | null), config?: BaseServerConfig<any>): Promise<{
13
+ rows: ModelRow[];
14
+ count: number;
15
+ }>;
16
+ Get(id: (string | null), config?: BaseServerConfig<any>): Promise<ModelRow>;
17
+ Create(body: ModelInputRow, config?: BaseServerConfig<any>): Promise<ModelRow>;
18
+ Update(id: (string | null), body: ModelInputRow, config?: BaseServerConfig<any>): Promise<ModelRow>;
19
+ Delete(id: string, config?: BaseServerConfig<any>): Promise<void>;
20
+ Ask(model_id: string, body: {
21
+ chat_id: (string | null);
22
+ run_id: (string | null);
23
+ message: string;
24
+ memory_limit: (number | null);
25
+ }, config?: BaseServerConfig<any>): Promise<InteractionRow>;
26
+ AskAsync(model_id: string, body: {
27
+ chat_id: (string | null);
28
+ run_id: (string | null);
29
+ message: string;
30
+ memory_limit: (number | null);
31
+ }, config?: BaseServerConfig<any>): Promise<AskAsyncResponseRow>;
32
+ }