namirasoft-inference 1.5.11 → 1.5.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/NamirasoftInferenceServer.js +1 -1
- package/dist/NamirasoftInferenceServerUsage.d.ts +1 -1
- package/dist/NamirasoftInferenceServerUsage.js +2 -2
- package/dist/NamirasoftInferenceServerUsage.js.map +1 -1
- package/dist/command/ModelCreateCommand.js +192 -165
- package/dist/command/ModelCreateCommand.js.map +1 -1
- package/dist/command/ModelUpdateCommand.js +192 -165
- package/dist/command/ModelUpdateCommand.js.map +1 -1
- package/dist/command/UsageCommand.js +16 -16
- package/dist/command/UsageDashboardCommand.d.ts +5 -5
- package/dist/command/UsageDashboardCommand.js +37 -37
- package/dist/command/UsageSummaryCommand.js +37 -37
- package/dist/command/UsageSummaryCommand.js.map +1 -1
- package/dist/enum/InferencerType.d.ts +6 -6
- package/dist/enum/InferencerType.js +10 -10
- package/dist/enum/UsageBucketType.d.ts +4 -4
- package/dist/enum/UsageBucketType.js +8 -8
- package/dist/index.d.ts +141 -141
- package/dist/index.js +157 -157
- package/dist/meta/ModelMetaTable.d.ts +66 -63
- package/dist/meta/ModelMetaTable.js +88 -85
- package/dist/meta/ModelMetaTable.js.map +1 -1
- package/dist/row/ModelInputRow.d.ts +24 -21
- package/dist/row/ModelRow.d.ts +61 -58
- package/dist/row/UsageDashboardBucketRow.d.ts +10 -10
- package/dist/row/UsageDashboardBucketRow.js +2 -2
- package/dist/row/UsageDashboardResponseRow.d.ts +8 -8
- package/dist/row/UsageDashboardResponseRow.js +2 -2
- package/package.json +1 -1
- package/src/NamirasoftInferenceServer.ts +1 -1
- package/src/NamirasoftInferenceServerUsage.ts +2 -2
- package/src/command/ModelCreateCommand.ts +27 -0
- package/src/command/ModelUpdateCommand.ts +27 -0
- package/src/command/UsageSummaryCommand.ts +2 -2
- package/src/enum/UsageBucketType.ts +2 -2
- package/src/meta/ModelMetaTable.ts +6 -0
- package/src/row/ModelInputRow.ts +3 -0
- package/src/row/ModelRow.ts +3 -0
|
@@ -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.
|
|
21
|
+
super(base_url, `1.5.13`, 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);
|
|
@@ -7,6 +7,6 @@ import { UsageDashboardResponseRow } from "./row/UsageDashboardResponseRow";
|
|
|
7
7
|
import { UsageSummaryResponseRow } from "./row/UsageSummaryResponseRow";
|
|
8
8
|
export declare class NamirasoftInferenceServerUsage extends NamirasoftInferenceServerBase {
|
|
9
9
|
constructor(server: NamirasoftInferenceServer);
|
|
10
|
-
Summary(
|
|
10
|
+
Summary(inferencer_type: (InferencerType | null), inferencer_id: (string | null), started_at: string, ended_at: string, config?: BaseServerConfig<any>): Promise<UsageSummaryResponseRow>;
|
|
11
11
|
Dashboard(inferencer_type: (InferencerType | null), inferencer_id: (string | null), winner_final: (boolean | null), started_at: string, ended_at: string, bucket: UsageBucketType, config?: BaseServerConfig<any>): Promise<UsageDashboardResponseRow>;
|
|
12
12
|
}
|
|
@@ -17,10 +17,10 @@ class NamirasoftInferenceServerUsage extends NamirasoftInferenceServerBase_1.Nam
|
|
|
17
17
|
this.Summary = this.Summary.bind(this);
|
|
18
18
|
this.Dashboard = this.Dashboard.bind(this);
|
|
19
19
|
}
|
|
20
|
-
Summary(
|
|
20
|
+
Summary(inferencer_type, inferencer_id, started_at, ended_at, config) {
|
|
21
21
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
22
|
let path = `/usage/summary`;
|
|
23
|
-
let { data } = yield this.server._get(path, {
|
|
23
|
+
let { data } = yield this.server._get(path, { inferencer_type, inferencer_id, started_at, ended_at }, config);
|
|
24
24
|
return data;
|
|
25
25
|
});
|
|
26
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NamirasoftInferenceServerUsage.js","sourceRoot":"","sources":["../src/NamirasoftInferenceServerUsage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAuBA,mFAAgF;AAKhF,MAAa,8BAA+B,SAAQ,6DAA6B;IAE7E,YAAY,MAAiC;QAEzC,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IACK,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"NamirasoftInferenceServerUsage.js","sourceRoot":"","sources":["../src/NamirasoftInferenceServerUsage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAuBA,mFAAgF;AAKhF,MAAa,8BAA+B,SAAQ,6DAA6B;IAE7E,YAAY,MAAiC;QAEzC,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IACK,OAAO,CAAC,eAAwC,EAAE,aAA8B,EAAE,UAAkB,EAAE,QAAgB,EAAE,MAA8B;;YAExJ,IAAI,IAAI,GAAG,gBAAgB,CAAC;YAC5B,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAA0B,IAAI,EAAE,EAAE,eAAe,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAC;YACvI,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;IACK,SAAS,CAAC,eAAwC,EAAE,aAA8B,EAAE,YAA8B,EAAE,UAAkB,EAAE,QAAgB,EAAE,MAAuB,EAAE,MAA8B;;YAEnN,IAAI,IAAI,GAAG,kBAAkB,CAAC;YAC9B,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAA4B,IAAI,EAAE,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,MAAM,CAAC,CAAC;YAC/J,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;CACJ;AApBD,wEAoBC;AAAA,CAAC"}
|
|
@@ -1,166 +1,193 @@
|
|
|
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.ModelCreateCommand = void 0;
|
|
13
|
-
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
-
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
-
const NamirasoftInferenceServer_1 = require("../NamirasoftInferenceServer");
|
|
16
|
-
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
-
class ModelCreateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
-
constructor(argv) {
|
|
19
|
-
super(argv, [], [
|
|
20
|
-
{
|
|
21
|
-
name: "workspace_id",
|
|
22
|
-
short: "",
|
|
23
|
-
description: "Provides the value of 'workspace_id' in body",
|
|
24
|
-
optional: true,
|
|
25
|
-
args: ["workspace_id"],
|
|
26
|
-
defaults: [""]
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: "name",
|
|
30
|
-
short: "",
|
|
31
|
-
description: "Provides the value of 'name' in body",
|
|
32
|
-
optional: false,
|
|
33
|
-
args: ["name"],
|
|
34
|
-
defaults: [""]
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
name: "model_company",
|
|
38
|
-
short: "",
|
|
39
|
-
description: "Provides the value of 'model_company' in body",
|
|
40
|
-
optional: false,
|
|
41
|
-
args: ["model_company"],
|
|
42
|
-
defaults: [""]
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
name: "model_name",
|
|
46
|
-
short: "",
|
|
47
|
-
description: "Provides the value of 'model_name' in body",
|
|
48
|
-
optional: false,
|
|
49
|
-
args: ["model_name"],
|
|
50
|
-
defaults: [""]
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
name: "settings",
|
|
54
|
-
short: "",
|
|
55
|
-
description: "Provides the value of 'settings' in body",
|
|
56
|
-
optional: true,
|
|
57
|
-
args: ["settings"],
|
|
58
|
-
defaults: [""]
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
name: "model_api_key_credential_id",
|
|
62
|
-
short: "",
|
|
63
|
-
description: "Provides the value of 'model_api_key_credential_id' in body",
|
|
64
|
-
optional: true,
|
|
65
|
-
args: ["model_api_key_credential_id"],
|
|
66
|
-
defaults: [""]
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
name: "cost_limit_per_month",
|
|
70
|
-
short: "",
|
|
71
|
-
description: "Provides the value of 'cost_limit_per_month' in body",
|
|
72
|
-
optional: true,
|
|
73
|
-
args: ["cost_limit_per_month"],
|
|
74
|
-
defaults: [""]
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
name: "cost_limit_per_week",
|
|
78
|
-
short: "",
|
|
79
|
-
description: "Provides the value of 'cost_limit_per_week' in body",
|
|
80
|
-
optional: true,
|
|
81
|
-
args: ["cost_limit_per_week"],
|
|
82
|
-
defaults: [""]
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
name: "cost_limit_per_day",
|
|
86
|
-
short: "",
|
|
87
|
-
description: "Provides the value of 'cost_limit_per_day' in body",
|
|
88
|
-
optional: true,
|
|
89
|
-
args: ["cost_limit_per_day"],
|
|
90
|
-
defaults: [""]
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
name: "cost_limit_per_chat",
|
|
94
|
-
short: "",
|
|
95
|
-
description: "Provides the value of 'cost_limit_per_chat' in body",
|
|
96
|
-
optional: true,
|
|
97
|
-
args: ["cost_limit_per_chat"],
|
|
98
|
-
defaults: [""]
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
name: "cost_limit_per_run",
|
|
102
|
-
short: "",
|
|
103
|
-
description: "Provides the value of 'cost_limit_per_run' in body",
|
|
104
|
-
optional: true,
|
|
105
|
-
args: ["cost_limit_per_run"],
|
|
106
|
-
defaults: [""]
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
name: "
|
|
110
|
-
short: "",
|
|
111
|
-
description: "Provides the value of '
|
|
112
|
-
optional: false,
|
|
113
|
-
args: ["
|
|
114
|
-
defaults: [""]
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
name: "
|
|
118
|
-
short: "",
|
|
119
|
-
description: "Provides the value of '
|
|
120
|
-
optional: false,
|
|
121
|
-
args: ["
|
|
122
|
-
defaults: [""]
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
name: "
|
|
126
|
-
short: "",
|
|
127
|
-
description: "Provides the value of '
|
|
128
|
-
optional: false,
|
|
129
|
-
args: ["
|
|
130
|
-
defaults: [""]
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
this.app.
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
;
|
|
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.ModelCreateCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftInferenceServer_1 = require("../NamirasoftInferenceServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class ModelCreateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, [], [
|
|
20
|
+
{
|
|
21
|
+
name: "workspace_id",
|
|
22
|
+
short: "",
|
|
23
|
+
description: "Provides the value of 'workspace_id' in body",
|
|
24
|
+
optional: true,
|
|
25
|
+
args: ["workspace_id"],
|
|
26
|
+
defaults: [""]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "name",
|
|
30
|
+
short: "",
|
|
31
|
+
description: "Provides the value of 'name' in body",
|
|
32
|
+
optional: false,
|
|
33
|
+
args: ["name"],
|
|
34
|
+
defaults: [""]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "model_company",
|
|
38
|
+
short: "",
|
|
39
|
+
description: "Provides the value of 'model_company' in body",
|
|
40
|
+
optional: false,
|
|
41
|
+
args: ["model_company"],
|
|
42
|
+
defaults: [""]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "model_name",
|
|
46
|
+
short: "",
|
|
47
|
+
description: "Provides the value of 'model_name' in body",
|
|
48
|
+
optional: false,
|
|
49
|
+
args: ["model_name"],
|
|
50
|
+
defaults: [""]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "settings",
|
|
54
|
+
short: "",
|
|
55
|
+
description: "Provides the value of 'settings' in body",
|
|
56
|
+
optional: true,
|
|
57
|
+
args: ["settings"],
|
|
58
|
+
defaults: [""]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "model_api_key_credential_id",
|
|
62
|
+
short: "",
|
|
63
|
+
description: "Provides the value of 'model_api_key_credential_id' in body",
|
|
64
|
+
optional: true,
|
|
65
|
+
args: ["model_api_key_credential_id"],
|
|
66
|
+
defaults: [""]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "cost_limit_per_month",
|
|
70
|
+
short: "",
|
|
71
|
+
description: "Provides the value of 'cost_limit_per_month' in body",
|
|
72
|
+
optional: true,
|
|
73
|
+
args: ["cost_limit_per_month"],
|
|
74
|
+
defaults: [""]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: "cost_limit_per_week",
|
|
78
|
+
short: "",
|
|
79
|
+
description: "Provides the value of 'cost_limit_per_week' in body",
|
|
80
|
+
optional: true,
|
|
81
|
+
args: ["cost_limit_per_week"],
|
|
82
|
+
defaults: [""]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "cost_limit_per_day",
|
|
86
|
+
short: "",
|
|
87
|
+
description: "Provides the value of 'cost_limit_per_day' in body",
|
|
88
|
+
optional: true,
|
|
89
|
+
args: ["cost_limit_per_day"],
|
|
90
|
+
defaults: [""]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: "cost_limit_per_chat",
|
|
94
|
+
short: "",
|
|
95
|
+
description: "Provides the value of 'cost_limit_per_chat' in body",
|
|
96
|
+
optional: true,
|
|
97
|
+
args: ["cost_limit_per_chat"],
|
|
98
|
+
defaults: [""]
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: "cost_limit_per_run",
|
|
102
|
+
short: "",
|
|
103
|
+
description: "Provides the value of 'cost_limit_per_run' in body",
|
|
104
|
+
optional: true,
|
|
105
|
+
args: ["cost_limit_per_run"],
|
|
106
|
+
defaults: [""]
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: "json_force",
|
|
110
|
+
short: "",
|
|
111
|
+
description: "Provides the value of 'json_force' in body",
|
|
112
|
+
optional: false,
|
|
113
|
+
args: ["json_force"],
|
|
114
|
+
defaults: [""]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
name: "json_system_prompt",
|
|
118
|
+
short: "",
|
|
119
|
+
description: "Provides the value of 'json_system_prompt' in body",
|
|
120
|
+
optional: false,
|
|
121
|
+
args: ["json_system_prompt"],
|
|
122
|
+
defaults: [""]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: "json_correction",
|
|
126
|
+
short: "",
|
|
127
|
+
description: "Provides the value of 'json_correction' in body",
|
|
128
|
+
optional: false,
|
|
129
|
+
args: ["json_correction"],
|
|
130
|
+
defaults: [""]
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
name: "model_category",
|
|
134
|
+
short: "",
|
|
135
|
+
description: "Provides the value of 'model_category' in body",
|
|
136
|
+
optional: false,
|
|
137
|
+
args: ["model_category"],
|
|
138
|
+
defaults: [""]
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: "model_field",
|
|
142
|
+
short: "",
|
|
143
|
+
description: "Provides the value of 'model_field' in body",
|
|
144
|
+
optional: false,
|
|
145
|
+
args: ["model_field"],
|
|
146
|
+
defaults: [""]
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
name: "model_tag",
|
|
150
|
+
short: "",
|
|
151
|
+
description: "Provides the value of 'model_tag' in body",
|
|
152
|
+
optional: false,
|
|
153
|
+
args: ["model_tag"],
|
|
154
|
+
defaults: [""]
|
|
155
|
+
}
|
|
156
|
+
]);
|
|
157
|
+
}
|
|
158
|
+
exec() {
|
|
159
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
160
|
+
let token = this.app.storage.getNSAToken();
|
|
161
|
+
if (token == null)
|
|
162
|
+
throw new Error("Token is not available. Please login first using:\nns-inference ns-account config \nor \nns-inference ns-account login.");
|
|
163
|
+
let storage = new namirasoft_core_1.IStorageMemoryDedicated();
|
|
164
|
+
let token_manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
165
|
+
token_manager.setValue(token, false);
|
|
166
|
+
let url = this.app.storage.getItem("ns-inference-server-url");
|
|
167
|
+
let server = new NamirasoftInferenceServer_1.NamirasoftInferenceServer(url, token_manager, e => this.app.logger.error(e.message));
|
|
168
|
+
let ans = yield server.model.Create({
|
|
169
|
+
workspace_id: this.option_values.workspace_id,
|
|
170
|
+
name: this.option_values.name,
|
|
171
|
+
model_company: this.option_values.model_company,
|
|
172
|
+
model_name: this.option_values.model_name,
|
|
173
|
+
settings: this.option_values.settings,
|
|
174
|
+
model_api_key_credential_id: this.option_values.model_api_key_credential_id,
|
|
175
|
+
cost_limit_per_month: this.option_values.cost_limit_per_month,
|
|
176
|
+
cost_limit_per_week: this.option_values.cost_limit_per_week,
|
|
177
|
+
cost_limit_per_day: this.option_values.cost_limit_per_day,
|
|
178
|
+
cost_limit_per_chat: this.option_values.cost_limit_per_chat,
|
|
179
|
+
cost_limit_per_run: this.option_values.cost_limit_per_run,
|
|
180
|
+
json_force: this.option_values.json_force,
|
|
181
|
+
json_system_prompt: this.option_values.json_system_prompt,
|
|
182
|
+
json_correction: this.option_values.json_correction,
|
|
183
|
+
model_category: this.option_values.model_category,
|
|
184
|
+
model_field: this.option_values.model_field,
|
|
185
|
+
model_tag: this.option_values.model_tag
|
|
186
|
+
});
|
|
187
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
exports.ModelCreateCommand = ModelCreateCommand;
|
|
192
|
+
;
|
|
166
193
|
//# sourceMappingURL=ModelCreateCommand.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelCreateCommand.js","sourceRoot":"","sources":["../../src/command/ModelCreateCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,4EAAyE;AACzE,2DAAkD;AAElD,MAAa,kBAAmB,SAAQ,sCAAgB;IAEpD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE;YACZ;gBACI,IAAI,EAAE,cAAc;gBACpB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,8CAA8C;gBAC3D,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,CAAC,cAAc,CAAC;gBACtB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,EAAE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