honeyhive 0.3.13 → 0.3.14
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/README.md +35 -47
- package/dist/models/components/configuration.d.ts +17 -73
- package/dist/models/components/configuration.js +22 -115
- package/dist/models/components/createdatapointrequest.d.ts +2 -12
- package/dist/models/components/createdatapointrequest.js +3 -27
- package/dist/models/components/createdatasetrequest.d.ts +1 -6
- package/dist/models/components/createdatasetrequest.js +2 -14
- package/dist/models/components/createeventrequest.d.ts +15 -42
- package/dist/models/components/createeventrequest.js +18 -92
- package/dist/models/components/createprojectrequest.d.ts +0 -5
- package/dist/models/components/createprojectrequest.js +1 -11
- package/dist/models/components/createtoolrequest.d.ts +18 -0
- package/dist/models/components/createtoolrequest.js +70 -0
- package/dist/models/components/datapoint.d.ts +1 -3
- package/dist/models/components/datapoint.js +2 -11
- package/dist/models/components/datasetupdate.d.ts +1 -6
- package/dist/models/components/datasetupdate.js +2 -14
- package/dist/models/components/event.d.ts +7 -42
- package/dist/models/components/event.js +8 -92
- package/dist/models/components/index.d.ts +3 -1
- package/dist/models/components/index.js +3 -1
- package/dist/models/components/metric.d.ts +8 -3
- package/dist/models/components/metric.js +7 -1
- package/dist/models/components/metricedit.d.ts +9 -4
- package/dist/models/components/metricedit.js +7 -1
- package/dist/models/components/project.d.ts +0 -5
- package/dist/models/components/project.js +1 -11
- package/dist/models/components/sessionstartrequest.d.ts +7 -42
- package/dist/models/components/sessionstartrequest.js +8 -92
- package/dist/models/components/tool.d.ts +2 -7
- package/dist/models/components/tool.js +4 -16
- package/dist/models/components/updatedatapointrequest.d.ts +2 -12
- package/dist/models/components/updatedatapointrequest.js +3 -27
- package/dist/models/components/updateprojectrequest.d.ts +6 -0
- package/dist/models/components/updateprojectrequest.js +55 -0
- package/dist/models/components/updatetoolrequest.d.ts +7 -0
- package/dist/models/components/updatetoolrequest.js +60 -0
- package/dist/models/operations/createdataset.d.ts +12 -3
- package/dist/models/operations/createdataset.js +39 -27
- package/dist/models/operations/createevent.d.ts +31 -0
- package/dist/models/operations/createevent.js +115 -0
- package/dist/models/operations/createmetric.d.ts +16 -0
- package/dist/models/operations/createmetric.js +51 -0
- package/dist/models/operations/createtool.d.ts +12 -2
- package/dist/models/operations/createtool.js +31 -10
- package/dist/models/operations/deletedataset.d.ts +4 -11
- package/dist/models/operations/deletedataset.js +3 -24
- package/dist/models/operations/deleteevent.d.ts +20 -0
- package/dist/models/operations/deleteevent.js +67 -0
- package/dist/models/operations/deletemetric.d.ts +19 -0
- package/dist/models/operations/deletemetric.js +63 -0
- package/dist/models/operations/getconfigurations.d.ts +19 -3
- package/dist/models/operations/getconfigurations.js +19 -2
- package/dist/models/operations/getdatapoint.d.ts +7 -1
- package/dist/models/operations/getdatapoint.js +21 -3
- package/dist/models/operations/getdatasets.d.ts +1 -1
- package/dist/models/operations/getdatasets.js +2 -2
- package/dist/models/operations/gettools.d.ts +0 -3
- package/dist/models/operations/gettools.js +1 -15
- package/dist/models/operations/index.d.ts +9 -9
- package/dist/models/operations/index.js +9 -9
- package/dist/models/operations/updatedataset.d.ts +0 -9
- package/dist/models/operations/updatedataset.js +1 -45
- package/dist/models/operations/updateevent.d.ts +23 -0
- package/dist/models/operations/updateevent.js +85 -0
- package/dist/models/operations/updatemetric.d.ts +16 -0
- package/dist/models/operations/updatemetric.js +51 -0
- package/dist/models/operations/updateproject.d.ts +0 -5
- package/dist/models/operations/updateproject.js +0 -28
- package/dist/models/operations/updatetool.d.ts +0 -3
- package/dist/models/operations/updatetool.js +1 -15
- package/dist/sdk/configurations.d.ts +1 -1
- package/dist/sdk/configurations.js +3 -1
- package/dist/sdk/datapoints.js +1 -1
- package/dist/sdk/datasets.d.ts +3 -3
- package/dist/sdk/datasets.js +8 -8
- package/dist/sdk/events.d.ts +3 -3
- package/dist/sdk/events.js +10 -10
- package/dist/sdk/metrics.d.ts +3 -3
- package/dist/sdk/metrics.js +7 -7
- package/dist/sdk/projects.d.ts +1 -1
- package/dist/sdk/projects.js +4 -11
- package/dist/sdk/sdk.js +3 -3
- package/dist/sdk/tools.d.ts +3 -3
- package/dist/sdk/tools.js +50 -22
- package/dist/sdk/tracer.d.ts +18 -1
- package/dist/sdk/tracer.js +176 -16
- package/docs/models/components/configuration.md +10 -8
- package/docs/models/components/createdatapointrequest.md +11 -11
- package/docs/models/components/createdatasetrequest.md +11 -11
- package/docs/models/components/createeventrequest.md +21 -19
- package/docs/models/components/createprojectrequest.md +4 -5
- package/docs/models/components/createtoolrequest.md +12 -0
- package/docs/models/components/createtoolrequesttype.md +9 -0
- package/docs/models/components/datapoint.md +1 -1
- package/docs/models/components/datasetupdate.md +10 -10
- package/docs/models/components/env.md +10 -0
- package/docs/models/components/event.md +21 -21
- package/docs/models/components/metric.md +2 -1
- package/docs/models/components/metricedit.md +3 -2
- package/docs/models/components/metricedittype.md +3 -2
- package/docs/models/components/metrictype.md +3 -2
- package/docs/models/components/project.md +5 -6
- package/docs/models/components/sessionstartrequest.md +18 -18
- package/docs/models/components/tool.md +8 -8
- package/docs/models/components/updatedatapointrequest.md +2 -2
- package/docs/models/components/updateprojectrequest.md +10 -0
- package/docs/models/components/updatetoolrequest.md +11 -0
- package/docs/models/operations/createdatasetresponse.md +11 -0
- package/docs/models/operations/createdatasetresponsebody.md +11 -0
- package/docs/models/operations/{createtoolsecurity.md → createdatasetresult.md} +2 -2
- package/docs/models/operations/{posteventsrequestbody.md → createeventrequestbody.md} +1 -1
- package/docs/models/operations/createeventresponse.md +11 -0
- package/docs/models/operations/{posteventsresponsebody.md → createeventresponsebody.md} +1 -1
- package/docs/models/operations/{postmetricsresponse.md → createmetricresponse.md} +1 -1
- package/docs/models/operations/createtoolresponse.md +6 -5
- package/docs/models/operations/createtoolresponsebody.md +10 -0
- package/docs/models/operations/{postdatasetsresult.md → createtoolresult.md} +1 -1
- package/docs/models/operations/{deletedatasetsrequest.md → deletedatasetrequest.md} +1 -1
- package/docs/models/operations/{deletemetricsresponse.md → deletedatasetresponse.md} +1 -1
- package/docs/models/operations/{deleteeventseventidrequest.md → deleteeventrequest.md} +1 -1
- package/docs/models/operations/{putmetricsresponse.md → deleteeventresponse.md} +1 -1
- package/docs/models/operations/{deletemetricsrequest.md → deletemetricrequest.md} +1 -1
- package/docs/models/operations/{puteventsresponse.md → deletemetricresponse.md} +1 -1
- package/docs/models/operations/env.md +12 -0
- package/docs/models/operations/getconfigurationsrequest.md +6 -4
- package/docs/models/operations/getdatapointresponse.md +6 -6
- package/docs/models/operations/getdatapointresponsebody.md +10 -0
- package/docs/models/operations/getdatasetsresponsebody.md +1 -1
- package/docs/models/operations/typet.md +1 -1
- package/docs/models/operations/updatedatasetresponse.md +10 -0
- package/docs/models/operations/updateeventrequestbody.md +12 -0
- package/docs/models/operations/{putdatasetsresponse.md → updateeventresponse.md} +1 -1
- package/docs/models/operations/updatemetricresponse.md +10 -0
- package/docs/models/operations/updateprojectresponse.md +5 -6
- package/docs/sdks/configurations/README.md +35 -52
- package/docs/sdks/datapoints/README.md +23 -20
- package/docs/sdks/datasets/README.md +25 -21
- package/docs/sdks/events/README.md +59 -37
- package/docs/sdks/metrics/README.md +24 -23
- package/docs/sdks/projects/README.md +11 -15
- package/docs/sdks/session/README.md +28 -14
- package/docs/sdks/tools/README.md +37 -35
- package/package.json +1 -1
- package/docs/models/components/calltype.md +0 -11
- package/docs/models/components/config.md +0 -9
- package/docs/models/components/createdatapointrequestinputs.md +0 -9
- package/docs/models/components/createdatapointrequestmetadata.md +0 -9
- package/docs/models/components/createdatasetrequestmetadata.md +0 -9
- package/docs/models/components/createeventrequestinputs.md +0 -9
- package/docs/models/components/createeventrequestmetadata.md +0 -9
- package/docs/models/components/createeventrequestuserproperties.md +0 -9
- package/docs/models/components/createprojectrequesttype.md +0 -9
- package/docs/models/components/datasetupdatemetadata.md +0 -9
- package/docs/models/components/eventconfig.md +0 -9
- package/docs/models/components/eventfeedback.md +0 -9
- package/docs/models/components/eventinputs.md +0 -9
- package/docs/models/components/eventmetadata.md +0 -9
- package/docs/models/components/eventmetrics.md +0 -9
- package/docs/models/components/eventoutputs.md +0 -9
- package/docs/models/components/eventuserproperties.md +0 -9
- package/docs/models/components/feedback.md +0 -9
- package/docs/models/components/functioncallparams.md +0 -12
- package/docs/models/components/hyperparameters.md +0 -9
- package/docs/models/components/metadata.md +0 -7
- package/docs/models/components/metrics.md +0 -9
- package/docs/models/components/outputs.md +0 -9
- package/docs/models/components/parameterst.md +0 -13
- package/docs/models/components/projecttype.md +0 -9
- package/docs/models/components/selectedfunctions.md +0 -11
- package/docs/models/components/sessionstartrequestconfig.md +0 -9
- package/docs/models/components/sessionstartrequestfeedback.md +0 -9
- package/docs/models/components/sessionstartrequestinputs.md +0 -9
- package/docs/models/components/sessionstartrequestmetadata.md +0 -9
- package/docs/models/components/sessionstartrequestmetrics.md +0 -9
- package/docs/models/components/sessionstartrequestoutputs.md +0 -9
- package/docs/models/components/sessionstartrequestuserproperties.md +0 -9
- package/docs/models/components/toolparameters.md +0 -9
- package/docs/models/components/toolupdate.md +0 -11
- package/docs/models/components/toolupdateparameters.md +0 -7
- package/docs/models/components/updatedatapointrequestinputs.md +0 -9
- package/docs/models/components/updatedatapointrequestmetadata.md +0 -9
- package/docs/models/components/userproperties.md +0 -9
- package/docs/models/operations/deletedatasetsresponse.md +0 -10
- package/docs/models/operations/deleteeventseventidresponse.md +0 -10
- package/docs/models/operations/feedback.md +0 -7
- package/docs/models/operations/gettoolssecurity.md +0 -8
- package/docs/models/operations/metadata.md +0 -7
- package/docs/models/operations/metrics.md +0 -7
- package/docs/models/operations/outputs.md +0 -7
- package/docs/models/operations/postdatasetsresponse.md +0 -11
- package/docs/models/operations/postdatasetsresponsebody.md +0 -11
- package/docs/models/operations/posteventsresponse.md +0 -11
- package/docs/models/operations/puteventsrequestbody.md +0 -12
- package/docs/models/operations/updatetoolsecurity.md +0 -8
package/dist/sdk/projects.js
CHANGED
|
@@ -296,13 +296,13 @@ var Projects = /** @class */ (function () {
|
|
|
296
296
|
Projects.prototype.updateProject = function (req, config) {
|
|
297
297
|
var _a, _b;
|
|
298
298
|
return __awaiter(this, void 0, void 0, function () {
|
|
299
|
-
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res
|
|
299
|
+
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res;
|
|
300
300
|
var _d;
|
|
301
301
|
return __generator(this, function (_e) {
|
|
302
302
|
switch (_e.label) {
|
|
303
303
|
case 0:
|
|
304
304
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
305
|
-
req = new components.
|
|
305
|
+
req = new components.UpdateProjectRequest(req);
|
|
306
306
|
}
|
|
307
307
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
308
308
|
operationUrl = baseURL.replace(/\/$/, "") + "/projects";
|
|
@@ -330,7 +330,7 @@ var Projects = /** @class */ (function () {
|
|
|
330
330
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
331
331
|
if (reqBody == null)
|
|
332
332
|
throw new Error("request body is required");
|
|
333
|
-
headers["Accept"] = "
|
|
333
|
+
headers["Accept"] = "*/*";
|
|
334
334
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
335
335
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "put", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
336
336
|
case 3:
|
|
@@ -344,19 +344,12 @@ var Projects = /** @class */ (function () {
|
|
|
344
344
|
contentType: responseContentType,
|
|
345
345
|
rawResponse: httpRes,
|
|
346
346
|
});
|
|
347
|
-
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
348
347
|
switch (true) {
|
|
349
348
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
350
|
-
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
351
|
-
res.project = utils.objectToClass(JSON.parse(decodedRes), components.Project);
|
|
352
|
-
}
|
|
353
|
-
else {
|
|
354
|
-
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
355
|
-
}
|
|
356
349
|
break;
|
|
357
350
|
case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
358
351
|
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
359
|
-
throw new errors.SDKError("API error occurred", httpRes.status,
|
|
352
|
+
throw new errors.SDKError("API error occurred", httpRes.status, httpRes === null || httpRes === void 0 ? void 0 : httpRes.data, httpRes);
|
|
360
353
|
}
|
|
361
354
|
return [2 /*return*/, res];
|
|
362
355
|
}
|
package/dist/sdk/sdk.js
CHANGED
|
@@ -48,9 +48,9 @@ var SDKConfiguration = /** @class */ (function () {
|
|
|
48
48
|
function SDKConfiguration(init) {
|
|
49
49
|
this.language = "typescript";
|
|
50
50
|
this.openapiDocVersion = "1.0.1";
|
|
51
|
-
this.sdkVersion = "0.
|
|
52
|
-
this.genVersion = "2.
|
|
53
|
-
this.userAgent = "speakeasy-sdk/typescript 0.
|
|
51
|
+
this.sdkVersion = "0.4.1";
|
|
52
|
+
this.genVersion = "2.319.10";
|
|
53
|
+
this.userAgent = "speakeasy-sdk/typescript 0.4.1 2.319.10 1.0.1 honeyhive";
|
|
54
54
|
Object.assign(this, init);
|
|
55
55
|
}
|
|
56
56
|
return SDKConfiguration;
|
package/dist/sdk/tools.d.ts
CHANGED
|
@@ -12,13 +12,13 @@ export declare class Tools {
|
|
|
12
12
|
/**
|
|
13
13
|
* Retrieve a list of tools
|
|
14
14
|
*/
|
|
15
|
-
getTools(
|
|
15
|
+
getTools(config?: AxiosRequestConfig): Promise<operations.GetToolsResponse>;
|
|
16
16
|
/**
|
|
17
17
|
* Create a new tool
|
|
18
18
|
*/
|
|
19
|
-
createTool(req: components.
|
|
19
|
+
createTool(req: components.CreateToolRequest, config?: AxiosRequestConfig): Promise<operations.CreateToolResponse>;
|
|
20
20
|
/**
|
|
21
21
|
* Update an existing tool
|
|
22
22
|
*/
|
|
23
|
-
updateTool(req: components.
|
|
23
|
+
updateTool(req: components.UpdateToolRequest, config?: AxiosRequestConfig): Promise<operations.UpdateToolResponse>;
|
|
24
24
|
}
|
package/dist/sdk/tools.js
CHANGED
|
@@ -156,25 +156,32 @@ var Tools = /** @class */ (function () {
|
|
|
156
156
|
/**
|
|
157
157
|
* Retrieve a list of tools
|
|
158
158
|
*/
|
|
159
|
-
Tools.prototype.getTools = function (
|
|
159
|
+
Tools.prototype.getTools = function (config) {
|
|
160
160
|
var _a, _b;
|
|
161
161
|
return __awaiter(this, void 0, void 0, function () {
|
|
162
|
-
var baseURL, operationUrl, client, properties, headers, httpRes, responseContentType, res, decodedRes, resFieldDepth;
|
|
162
|
+
var baseURL, operationUrl, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes, resFieldDepth;
|
|
163
163
|
return __generator(this, function (_c) {
|
|
164
164
|
switch (_c.label) {
|
|
165
165
|
case 0:
|
|
166
166
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
167
167
|
operationUrl = baseURL.replace(/\/$/, "") + "/tools";
|
|
168
168
|
client = this.sdkConfiguration.defaultClient;
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
170
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
171
|
+
return [4 /*yield*/, globalSecurity()];
|
|
172
|
+
case 1:
|
|
173
|
+
globalSecurity = _c.sent();
|
|
174
|
+
_c.label = 2;
|
|
175
|
+
case 2:
|
|
176
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
177
|
+
globalSecurity = new components.Security(globalSecurity);
|
|
171
178
|
}
|
|
172
|
-
properties = utils.parseSecurityProperties(
|
|
179
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
173
180
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
174
181
|
headers["Accept"] = "application/json";
|
|
175
182
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
176
183
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
177
|
-
case
|
|
184
|
+
case 3:
|
|
178
185
|
httpRes = _c.sent();
|
|
179
186
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
180
187
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -209,16 +216,16 @@ var Tools = /** @class */ (function () {
|
|
|
209
216
|
/**
|
|
210
217
|
* Create a new tool
|
|
211
218
|
*/
|
|
212
|
-
Tools.prototype.createTool = function (req,
|
|
219
|
+
Tools.prototype.createTool = function (req, config) {
|
|
213
220
|
var _a, _b;
|
|
214
221
|
return __awaiter(this, void 0, void 0, function () {
|
|
215
|
-
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, properties, headers, httpRes, responseContentType, res;
|
|
222
|
+
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
216
223
|
var _d;
|
|
217
224
|
return __generator(this, function (_e) {
|
|
218
225
|
switch (_e.label) {
|
|
219
226
|
case 0:
|
|
220
227
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
221
|
-
req = new components.
|
|
228
|
+
req = new components.CreateToolRequest(req);
|
|
222
229
|
}
|
|
223
230
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
224
231
|
operationUrl = baseURL.replace(/\/$/, "") + "/tools";
|
|
@@ -232,17 +239,24 @@ var Tools = /** @class */ (function () {
|
|
|
232
239
|
}
|
|
233
240
|
}
|
|
234
241
|
client = this.sdkConfiguration.defaultClient;
|
|
235
|
-
|
|
236
|
-
|
|
242
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
243
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
244
|
+
return [4 /*yield*/, globalSecurity()];
|
|
245
|
+
case 1:
|
|
246
|
+
globalSecurity = _e.sent();
|
|
247
|
+
_e.label = 2;
|
|
248
|
+
case 2:
|
|
249
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
250
|
+
globalSecurity = new components.Security(globalSecurity);
|
|
237
251
|
}
|
|
238
|
-
properties = utils.parseSecurityProperties(
|
|
252
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
239
253
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
240
254
|
if (reqBody == null)
|
|
241
255
|
throw new Error("request body is required");
|
|
242
|
-
headers["Accept"] = "
|
|
256
|
+
headers["Accept"] = "application/json";
|
|
243
257
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
244
258
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
245
|
-
case
|
|
259
|
+
case 3:
|
|
246
260
|
httpRes = _e.sent();
|
|
247
261
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
248
262
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -253,12 +267,19 @@ var Tools = /** @class */ (function () {
|
|
|
253
267
|
contentType: responseContentType,
|
|
254
268
|
rawResponse: httpRes,
|
|
255
269
|
});
|
|
270
|
+
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
256
271
|
switch (true) {
|
|
257
272
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
273
|
+
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
274
|
+
res.object = utils.objectToClass(JSON.parse(decodedRes), operations.CreateToolResponseBody);
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
277
|
+
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
278
|
+
}
|
|
258
279
|
break;
|
|
259
280
|
case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
260
281
|
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
261
|
-
throw new errors.SDKError("API error occurred", httpRes.status,
|
|
282
|
+
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
262
283
|
}
|
|
263
284
|
return [2 /*return*/, res];
|
|
264
285
|
}
|
|
@@ -268,16 +289,16 @@ var Tools = /** @class */ (function () {
|
|
|
268
289
|
/**
|
|
269
290
|
* Update an existing tool
|
|
270
291
|
*/
|
|
271
|
-
Tools.prototype.updateTool = function (req,
|
|
292
|
+
Tools.prototype.updateTool = function (req, config) {
|
|
272
293
|
var _a, _b;
|
|
273
294
|
return __awaiter(this, void 0, void 0, function () {
|
|
274
|
-
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, properties, headers, httpRes, responseContentType, res;
|
|
295
|
+
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res;
|
|
275
296
|
var _d;
|
|
276
297
|
return __generator(this, function (_e) {
|
|
277
298
|
switch (_e.label) {
|
|
278
299
|
case 0:
|
|
279
300
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
280
|
-
req = new components.
|
|
301
|
+
req = new components.UpdateToolRequest(req);
|
|
281
302
|
}
|
|
282
303
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
283
304
|
operationUrl = baseURL.replace(/\/$/, "") + "/tools";
|
|
@@ -291,17 +312,24 @@ var Tools = /** @class */ (function () {
|
|
|
291
312
|
}
|
|
292
313
|
}
|
|
293
314
|
client = this.sdkConfiguration.defaultClient;
|
|
294
|
-
|
|
295
|
-
|
|
315
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
316
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
317
|
+
return [4 /*yield*/, globalSecurity()];
|
|
318
|
+
case 1:
|
|
319
|
+
globalSecurity = _e.sent();
|
|
320
|
+
_e.label = 2;
|
|
321
|
+
case 2:
|
|
322
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
323
|
+
globalSecurity = new components.Security(globalSecurity);
|
|
296
324
|
}
|
|
297
|
-
properties = utils.parseSecurityProperties(
|
|
325
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
298
326
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
299
327
|
if (reqBody == null)
|
|
300
328
|
throw new Error("request body is required");
|
|
301
329
|
headers["Accept"] = "*/*";
|
|
302
330
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
303
331
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "put", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
304
|
-
case
|
|
332
|
+
case 3:
|
|
305
333
|
httpRes = _e.sent();
|
|
306
334
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
307
335
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
package/dist/sdk/tracer.d.ts
CHANGED
|
@@ -112,20 +112,36 @@ export interface ChildLog {
|
|
|
112
112
|
[key: string]: any;
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
+
interface EvalInfo {
|
|
116
|
+
runName?: string;
|
|
117
|
+
datasetId?: string;
|
|
118
|
+
projectId?: string;
|
|
119
|
+
datapointIds?: string[];
|
|
120
|
+
runId?: string;
|
|
121
|
+
}
|
|
115
122
|
export declare class SessionTracer {
|
|
116
123
|
private api_key;
|
|
117
124
|
private project;
|
|
118
125
|
private session_name;
|
|
119
126
|
private user_properties;
|
|
120
127
|
private source;
|
|
128
|
+
private metadata;
|
|
121
129
|
private eventStack;
|
|
122
130
|
private client;
|
|
123
131
|
private session_id;
|
|
124
132
|
private parentEvent;
|
|
133
|
+
private evalInfo;
|
|
134
|
+
private lastEventId;
|
|
135
|
+
private lastEventMetrics;
|
|
136
|
+
private lastEventMetadata;
|
|
125
137
|
constructor(api_key: string, project: string, session_name: string, user_properties?: {
|
|
126
138
|
[key: string]: any;
|
|
127
|
-
}, source?: string
|
|
139
|
+
}, source?: string, metadata?: {
|
|
140
|
+
[key: string]: any;
|
|
141
|
+
});
|
|
128
142
|
getSessionId(): string;
|
|
143
|
+
getEvalInfo(): EvalInfo | undefined;
|
|
144
|
+
setMetric(metric_name: string, metric_value: any, threshold: any): Promise<void>;
|
|
129
145
|
startSession(inputs?: {
|
|
130
146
|
[key: string]: any;
|
|
131
147
|
}): Promise<void>;
|
|
@@ -139,3 +155,4 @@ export declare class SessionTracer {
|
|
|
139
155
|
[key: string]: any;
|
|
140
156
|
}, error?: string): Promise<void>;
|
|
141
157
|
}
|
|
158
|
+
export {};
|
package/dist/sdk/tracer.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
14
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
15
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -74,14 +85,16 @@ var ChatRole;
|
|
|
74
85
|
ChatRole["System"] = "system";
|
|
75
86
|
})(ChatRole = exports.ChatRole || (exports.ChatRole = {}));
|
|
76
87
|
var SessionTracer = /** @class */ (function () {
|
|
77
|
-
function SessionTracer(api_key, project, session_name, user_properties, source) {
|
|
88
|
+
function SessionTracer(api_key, project, session_name, user_properties, source, metadata) {
|
|
78
89
|
if (user_properties === void 0) { user_properties = {}; }
|
|
79
|
-
if (source === void 0) { source =
|
|
90
|
+
if (source === void 0) { source = "HoneyHive Typescript SDK"; }
|
|
91
|
+
if (metadata === void 0) { metadata = {}; }
|
|
80
92
|
this.api_key = api_key;
|
|
81
93
|
this.project = project;
|
|
82
94
|
this.session_name = session_name;
|
|
83
95
|
this.user_properties = user_properties;
|
|
84
96
|
this.source = source;
|
|
97
|
+
this.metadata = metadata;
|
|
85
98
|
this.eventStack = [];
|
|
86
99
|
this.client = axios_1.default.create({
|
|
87
100
|
headers: {
|
|
@@ -90,13 +103,56 @@ var SessionTracer = /** @class */ (function () {
|
|
|
90
103
|
});
|
|
91
104
|
this.session_id = "";
|
|
92
105
|
this.parentEvent = {};
|
|
106
|
+
this.lastEventId = "";
|
|
107
|
+
this.lastEventMetrics = {};
|
|
108
|
+
this.lastEventMetadata = {};
|
|
93
109
|
}
|
|
94
110
|
SessionTracer.prototype.getSessionId = function () {
|
|
95
111
|
return this.session_id;
|
|
96
112
|
};
|
|
113
|
+
SessionTracer.prototype.getEvalInfo = function () {
|
|
114
|
+
return this.evalInfo;
|
|
115
|
+
};
|
|
116
|
+
SessionTracer.prototype.setMetric = function (metric_name, metric_value, threshold) {
|
|
117
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
118
|
+
var metrics, metadata, body, res, error_1;
|
|
119
|
+
return __generator(this, function (_a) {
|
|
120
|
+
switch (_a.label) {
|
|
121
|
+
case 0:
|
|
122
|
+
if (!this.lastEventId) {
|
|
123
|
+
throw new Error("No events defined on session to set metric on");
|
|
124
|
+
}
|
|
125
|
+
metrics = __assign({}, this.lastEventMetrics);
|
|
126
|
+
metadata = __assign({}, this.lastEventMetadata);
|
|
127
|
+
metrics[metric_name] = metric_value;
|
|
128
|
+
metadata["threshold_".concat(metric_name)] = threshold;
|
|
129
|
+
body = {
|
|
130
|
+
event_id: this.lastEventId,
|
|
131
|
+
metadata: metadata,
|
|
132
|
+
metrics: metrics,
|
|
133
|
+
};
|
|
134
|
+
_a.label = 1;
|
|
135
|
+
case 1:
|
|
136
|
+
_a.trys.push([1, 3, , 4]);
|
|
137
|
+
return [4 /*yield*/, this.client.put("https://api.honeyhive.ai/events", body)];
|
|
138
|
+
case 2:
|
|
139
|
+
res = _a.sent();
|
|
140
|
+
if (res.status === 200) {
|
|
141
|
+
this.lastEventMetrics = metrics;
|
|
142
|
+
this.lastEventMetadata = metadata;
|
|
143
|
+
}
|
|
144
|
+
return [3 /*break*/, 4];
|
|
145
|
+
case 3:
|
|
146
|
+
error_1 = _a.sent();
|
|
147
|
+
return [3 /*break*/, 4];
|
|
148
|
+
case 4: return [2 /*return*/];
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
};
|
|
97
153
|
SessionTracer.prototype.startSession = function (inputs) {
|
|
98
154
|
return __awaiter(this, void 0, void 0, function () {
|
|
99
|
-
var session, _a;
|
|
155
|
+
var session, _a, projectRes, projectId, datasetRes, dataset, datasetId, datapointIds, runName, error_2;
|
|
100
156
|
return __generator(this, function (_b) {
|
|
101
157
|
switch (_b.label) {
|
|
102
158
|
case 0:
|
|
@@ -136,7 +192,52 @@ var SessionTracer = /** @class */ (function () {
|
|
|
136
192
|
case 2:
|
|
137
193
|
_a = _b.sent();
|
|
138
194
|
return [3 /*break*/, 3];
|
|
139
|
-
case 3:
|
|
195
|
+
case 3:
|
|
196
|
+
if (!(this.source === "evaluation")) return [3 /*break*/, 10];
|
|
197
|
+
_b.label = 4;
|
|
198
|
+
case 4:
|
|
199
|
+
_b.trys.push([4, 9, , 10]);
|
|
200
|
+
if (!(this.metadata && "run_id" in this.metadata)) return [3 /*break*/, 5];
|
|
201
|
+
this.evalInfo = { runId: this.metadata["run_id"] };
|
|
202
|
+
return [3 /*break*/, 8];
|
|
203
|
+
case 5:
|
|
204
|
+
if (!(this.metadata && "dataset_name" in this.metadata)) return [3 /*break*/, 8];
|
|
205
|
+
return [4 /*yield*/, this.client.get("https://api.honeyhive.ai/projects", {
|
|
206
|
+
params: { name: this.project },
|
|
207
|
+
})];
|
|
208
|
+
case 6:
|
|
209
|
+
projectRes = _b.sent();
|
|
210
|
+
if (projectRes.status !== 200)
|
|
211
|
+
throw new Error("Failed to fetch project");
|
|
212
|
+
projectId = projectRes.data[0]._id;
|
|
213
|
+
return [4 /*yield*/, this.client.get("https://api.honeyhive.ai/datasets", {
|
|
214
|
+
params: {
|
|
215
|
+
name: this.metadata["dataset_name"],
|
|
216
|
+
project: projectId,
|
|
217
|
+
},
|
|
218
|
+
})];
|
|
219
|
+
case 7:
|
|
220
|
+
datasetRes = _b.sent();
|
|
221
|
+
if (datasetRes.status !== 200)
|
|
222
|
+
throw new Error("Failed to fetch dataset");
|
|
223
|
+
dataset = datasetRes.data["testcases"][0];
|
|
224
|
+
datasetId = dataset["_id"];
|
|
225
|
+
datapointIds = dataset["datapoints"];
|
|
226
|
+
runName = "run_name" in this.metadata
|
|
227
|
+
? this.metadata["run_name"]
|
|
228
|
+
: this.session_name;
|
|
229
|
+
this.evalInfo = {
|
|
230
|
+
datasetId: datasetId,
|
|
231
|
+
datapointIds: datapointIds,
|
|
232
|
+
projectId: projectId,
|
|
233
|
+
runName: runName,
|
|
234
|
+
};
|
|
235
|
+
_b.label = 8;
|
|
236
|
+
case 8: return [3 /*break*/, 10];
|
|
237
|
+
case 9:
|
|
238
|
+
error_2 = _b.sent();
|
|
239
|
+
return [3 /*break*/, 10];
|
|
240
|
+
case 10: return [2 /*return*/];
|
|
140
241
|
}
|
|
141
242
|
});
|
|
142
243
|
});
|
|
@@ -147,7 +248,9 @@ var SessionTracer = /** @class */ (function () {
|
|
|
147
248
|
session_id: this.session_id,
|
|
148
249
|
event_id: (0, uuid_1.v4)(),
|
|
149
250
|
project: this.project,
|
|
150
|
-
parent_id: this.eventStack.length > 0
|
|
251
|
+
parent_id: this.eventStack.length > 0
|
|
252
|
+
? this.eventStack[this.eventStack.length - 1].event_id
|
|
253
|
+
: this.parentEvent.event_id,
|
|
151
254
|
event_type: event_type,
|
|
152
255
|
event_name: event_name,
|
|
153
256
|
config: config,
|
|
@@ -174,17 +277,38 @@ var SessionTracer = /** @class */ (function () {
|
|
|
174
277
|
}
|
|
175
278
|
var currentEvent = this.eventStack.pop();
|
|
176
279
|
if (currentEvent) {
|
|
280
|
+
if (currentEvent.event_id) {
|
|
281
|
+
this.lastEventId = currentEvent.event_id;
|
|
282
|
+
if (currentEvent.metrics) {
|
|
283
|
+
this.lastEventMetrics = currentEvent.metrics;
|
|
284
|
+
}
|
|
285
|
+
else {
|
|
286
|
+
this.lastEventMetrics = {};
|
|
287
|
+
}
|
|
288
|
+
if (currentEvent.metadata) {
|
|
289
|
+
this.lastEventMetadata = currentEvent.metadata;
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
this.lastEventMetadata = {};
|
|
293
|
+
}
|
|
294
|
+
}
|
|
177
295
|
currentEvent.end_time = Date.now();
|
|
178
|
-
currentEvent.duration =
|
|
296
|
+
currentEvent.duration =
|
|
297
|
+
currentEvent.end_time -
|
|
298
|
+
(currentEvent.start_time || currentEvent.end_time);
|
|
179
299
|
currentEvent.outputs = outputs;
|
|
180
300
|
if (error) {
|
|
181
301
|
currentEvent.error = error;
|
|
182
302
|
}
|
|
183
303
|
if (this.eventStack.length > 0) {
|
|
184
|
-
this.eventStack[this.eventStack.length - 1].children = __spreadArray(__spreadArray([], __read((this.eventStack[this.eventStack.length - 1].children || [])), false), [
|
|
304
|
+
this.eventStack[this.eventStack.length - 1].children = __spreadArray(__spreadArray([], __read((this.eventStack[this.eventStack.length - 1].children || [])), false), [
|
|
305
|
+
currentEvent,
|
|
306
|
+
], false);
|
|
185
307
|
}
|
|
186
308
|
else {
|
|
187
|
-
this.parentEvent.children = __spreadArray(__spreadArray([], __read((this.parentEvent.children || [])), false), [
|
|
309
|
+
this.parentEvent.children = __spreadArray(__spreadArray([], __read((this.parentEvent.children || [])), false), [
|
|
310
|
+
currentEvent,
|
|
311
|
+
], false);
|
|
188
312
|
}
|
|
189
313
|
}
|
|
190
314
|
}
|
|
@@ -194,22 +318,24 @@ var SessionTracer = /** @class */ (function () {
|
|
|
194
318
|
};
|
|
195
319
|
SessionTracer.prototype.endSession = function (outputs, error) {
|
|
196
320
|
return __awaiter(this, void 0, void 0, function () {
|
|
197
|
-
var session_trace, _a;
|
|
321
|
+
var session_trace, getRunRes, eventIds, updateRunRes, body, runRes, runId, _a;
|
|
198
322
|
return __generator(this, function (_b) {
|
|
199
323
|
switch (_b.label) {
|
|
200
324
|
case 0:
|
|
201
|
-
_b.trys.push([0,
|
|
325
|
+
_b.trys.push([0, 8, , 9]);
|
|
202
326
|
while (this.eventStack.length > 0) {
|
|
203
327
|
this.endEvent();
|
|
204
328
|
}
|
|
205
329
|
session_trace = this.parentEvent;
|
|
206
330
|
session_trace.end_time = Date.now();
|
|
207
|
-
session_trace.duration =
|
|
331
|
+
session_trace.duration =
|
|
332
|
+
session_trace.end_time -
|
|
333
|
+
(session_trace.start_time || session_trace.end_time);
|
|
208
334
|
session_trace.outputs = outputs;
|
|
209
335
|
if (error) {
|
|
210
336
|
session_trace.error = error;
|
|
211
337
|
}
|
|
212
|
-
if (!session_trace) return [3 /*break*/,
|
|
338
|
+
if (!session_trace) return [3 /*break*/, 7];
|
|
213
339
|
return [4 /*yield*/, this.client.post("https://api.honeyhive.ai/session/".concat(this.session_id, "/traces"), {
|
|
214
340
|
logs: [session_trace],
|
|
215
341
|
})];
|
|
@@ -221,12 +347,46 @@ var SessionTracer = /** @class */ (function () {
|
|
|
221
347
|
})];
|
|
222
348
|
case 2:
|
|
223
349
|
_b.sent();
|
|
224
|
-
|
|
225
|
-
|
|
350
|
+
if (!this.evalInfo) return [3 /*break*/, 7];
|
|
351
|
+
if (!this.evalInfo.runId) return [3 /*break*/, 5];
|
|
352
|
+
return [4 /*yield*/, this.client.get("https://api.honeyhive.ai/runs/".concat(this.evalInfo.runId))];
|
|
353
|
+
case 3:
|
|
354
|
+
getRunRes = _b.sent();
|
|
355
|
+
if (getRunRes.status !== 200)
|
|
356
|
+
throw new Error("Failed to get run info");
|
|
357
|
+
eventIds = getRunRes.data["evaluation"]["event_ids"];
|
|
358
|
+
eventIds.push(this.session_id);
|
|
359
|
+
return [4 /*yield*/, this.client.put("https://api.honeyhive.ai/runs/".concat(this.evalInfo.runId), { event_ids: eventIds })];
|
|
226
360
|
case 4:
|
|
361
|
+
updateRunRes = _b.sent();
|
|
362
|
+
if (updateRunRes.status !== 200)
|
|
363
|
+
throw new Error("Failed to update run info");
|
|
364
|
+
return [3 /*break*/, 7];
|
|
365
|
+
case 5:
|
|
366
|
+
body = {
|
|
367
|
+
event_ids: [this.session_id],
|
|
368
|
+
dataset_id: this.evalInfo.datasetId,
|
|
369
|
+
datapoint_ids: this.evalInfo.datapointIds,
|
|
370
|
+
project: this.evalInfo.projectId,
|
|
371
|
+
status: "completed",
|
|
372
|
+
name: this.evalInfo.runName,
|
|
373
|
+
};
|
|
374
|
+
if ("config" in session_trace) {
|
|
375
|
+
body["configuration"] = session_trace["config"];
|
|
376
|
+
}
|
|
377
|
+
return [4 /*yield*/, this.client.post("https://api.honeyhive.ai/runs", body)];
|
|
378
|
+
case 6:
|
|
379
|
+
runRes = _b.sent();
|
|
380
|
+
if (runRes.status !== 200)
|
|
381
|
+
throw new Error("Failed to submit eval info");
|
|
382
|
+
runId = runRes.data["run_id"];
|
|
383
|
+
this.evalInfo.runId = runId;
|
|
384
|
+
_b.label = 7;
|
|
385
|
+
case 7: return [3 /*break*/, 9];
|
|
386
|
+
case 8:
|
|
227
387
|
_a = _b.sent();
|
|
228
|
-
return [3 /*break*/,
|
|
229
|
-
case
|
|
388
|
+
return [3 /*break*/, 9];
|
|
389
|
+
case 9: return [2 /*return*/];
|
|
230
390
|
}
|
|
231
391
|
});
|
|
232
392
|
});
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
## Fields
|
|
5
5
|
|
|
6
|
-
| Field
|
|
7
|
-
|
|
|
8
|
-
| `
|
|
9
|
-
| `
|
|
10
|
-
| `name`
|
|
11
|
-
| `
|
|
12
|
-
| `
|
|
13
|
-
| `
|
|
6
|
+
| Field | Type | Required | Description |
|
|
7
|
+
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
|
8
|
+
| `id` | *string* | :heavy_minus_sign: | ID of the configuration |
|
|
9
|
+
| `env` | [components.Env](../../models/components/env.md)[] | :heavy_minus_sign: | List of environments where the configuration is active |
|
|
10
|
+
| `name` | *string* | :heavy_check_mark: | Name of the configuration |
|
|
11
|
+
| `parameters` | Record<string, *any*> | :heavy_check_mark: | N/A |
|
|
12
|
+
| `project` | *string* | :heavy_check_mark: | ID of the project to which this configuration belongs |
|
|
13
|
+
| `provider` | *string* | :heavy_check_mark: | Name of the provider - "openai", "anthropic", etc. |
|
|
14
|
+
| `type` | [components.TypeT](../../models/components/typet.md) | :heavy_check_mark: | Type of the configuration - "LLM" or "pipeline" - "LLM" by default |
|
|
15
|
+
| `userProperties` | Record<string, *any*> | :heavy_minus_sign: | Details of user who created the configuration |
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
|
|
4
4
|
## Fields
|
|
5
5
|
|
|
6
|
-
| Field
|
|
7
|
-
|
|
|
8
|
-
| `groundTruth`
|
|
9
|
-
| `inputs`
|
|
10
|
-
| `linkedDatasets`
|
|
11
|
-
| `linkedEvals`
|
|
12
|
-
| `linkedEvent`
|
|
13
|
-
| `metadata`
|
|
14
|
-
| `project`
|
|
15
|
-
| `saved`
|
|
16
|
-
| `type`
|
|
6
|
+
| Field | Type | Required | Description |
|
|
7
|
+
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
|
8
|
+
| `groundTruth` | Record<string, *any*> | :heavy_minus_sign: | Expected output JSON object for the datapoint |
|
|
9
|
+
| `inputs` | Record<string, *any*> | :heavy_check_mark: | Arbitrary JSON object containing the inputs for the datapoint |
|
|
10
|
+
| `linkedDatasets` | *string*[] | :heavy_minus_sign: | Ids of all datasets that include the datapoint |
|
|
11
|
+
| `linkedEvals` | *string*[] | :heavy_minus_sign: | Ids of evaluations where the datapoint is included |
|
|
12
|
+
| `linkedEvent` | *string* | :heavy_minus_sign: | Event id for the event from which the datapoint was created |
|
|
13
|
+
| `metadata` | Record<string, *any*> | :heavy_minus_sign: | Any additional metadata for the datapoint |
|
|
14
|
+
| `project` | *string* | :heavy_check_mark: | UUID for the project to which the datapoint belongs |
|
|
15
|
+
| `saved` | *boolean* | :heavy_minus_sign: | Whether the datapoint is saved or detected |
|
|
16
|
+
| `type` | [components.CreateDatapointRequestType](../../models/components/createdatapointrequesttype.md) | :heavy_check_mark: | Type of datapoint - "evaluation" or "fine-tuning" |
|