openlayer 0.0.6 → 0.0.7
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/index.js +6 -2
- package/package.json +4 -2
package/dist/index.js
CHANGED
|
@@ -17,6 +17,7 @@ var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
19
|
const openai_1 = require("openai");
|
|
20
|
+
const uuid_1 = require("uuid");
|
|
20
21
|
const request_1 = require("./utils/request");
|
|
21
22
|
class OpenAIMonitor {
|
|
22
23
|
constructor({ openAiApiKey, openlayerApiKey, openlayerInferencePipelineName, openlayerProjectName, openlayerServerUrl, }) {
|
|
@@ -36,14 +37,17 @@ class OpenAIMonitor {
|
|
|
36
37
|
const response = yield fetch(dataStreamQuery, {
|
|
37
38
|
body: JSON.stringify({
|
|
38
39
|
config: {
|
|
39
|
-
|
|
40
|
+
groundTruthColumnName: null,
|
|
41
|
+
inferenceIdColumnName: 'id',
|
|
40
42
|
inputVariableNames: ['input'],
|
|
41
43
|
latencyColumnName: 'latency',
|
|
42
44
|
outputColumnName: 'output',
|
|
43
45
|
timestampColumnName: 'timestamp',
|
|
44
46
|
tokensColumnName: 'tokens',
|
|
45
47
|
},
|
|
46
|
-
rows: [
|
|
48
|
+
rows: [
|
|
49
|
+
Object.assign({ id: (0, uuid_1.v4)() }, data),
|
|
50
|
+
],
|
|
47
51
|
}),
|
|
48
52
|
headers: {
|
|
49
53
|
Authorization: `Bearer ${this.openlayerApiKey}`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openlayer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "The Openlayer TypeScript client",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,9 +19,11 @@
|
|
|
19
19
|
"eslint-plugin-prettier": "^5.0.1",
|
|
20
20
|
"eslint-plugin-typescript-sort-keys": "^3.1.0",
|
|
21
21
|
"node-fetch": "^3.3.2",
|
|
22
|
-
"openai": "^4.19.0"
|
|
22
|
+
"openai": "^4.19.0",
|
|
23
|
+
"uuid": "^9.0.1"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
26
|
+
"@types/uuid": "^9.0.7",
|
|
25
27
|
"typescript": "^5.2.2"
|
|
26
28
|
}
|
|
27
29
|
}
|