openlayer 0.1.30 → 0.1.31
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
CHANGED
|
@@ -528,11 +528,11 @@ class OpenAIMonitor {
|
|
|
528
528
|
monitorThreadRun(run, additionalLogs) {
|
|
529
529
|
var _a;
|
|
530
530
|
return __awaiter(this, void 0, void 0, function* () {
|
|
531
|
-
if (
|
|
532
|
-
console.error('No inference pipeline found.');
|
|
531
|
+
if (run.status !== 'completed') {
|
|
533
532
|
return;
|
|
534
533
|
}
|
|
535
|
-
if (
|
|
534
|
+
if (typeof this.openlayerInferencePipelineId === 'undefined') {
|
|
535
|
+
console.error('No inference pipeline found.');
|
|
536
536
|
return;
|
|
537
537
|
}
|
|
538
538
|
try {
|
|
@@ -6,18 +6,19 @@ import OpenAI from 'openai';
|
|
|
6
6
|
import { OpenAIMonitor } from 'openlayer';
|
|
7
7
|
|
|
8
8
|
const openai = new OpenAI({
|
|
9
|
-
apiKey: '
|
|
9
|
+
apiKey: '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',
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
// Create monitor with your credentials
|
|
13
13
|
const monitor = new OpenAIMonitor({
|
|
14
|
-
openAiApiKey: '
|
|
15
|
-
openlayerApiKey: '
|
|
14
|
+
openAiApiKey: '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',
|
|
15
|
+
openlayerApiKey: 'UyKge0qbzrnAg_vehsTtw_e_mArrHHyT',
|
|
16
16
|
// EITHER specify an existing inference pipeline ID
|
|
17
|
-
openlayerInferencePipelineId: '
|
|
17
|
+
openlayerInferencePipelineId: 'ef604fd7-2237-419f-90a0-4a456020ecbb',
|
|
18
18
|
// OR the project and inference pipeline names to create or load one
|
|
19
|
-
openlayerInferencePipelineName: 'production',
|
|
20
|
-
openlayerProjectName: '
|
|
19
|
+
// openlayerInferencePipelineName: 'production',
|
|
20
|
+
// openlayerProjectName: 'Python QA5',
|
|
21
|
+
openlayerServerUrl: 'http://localhost:8080/v1',
|
|
21
22
|
});
|
|
22
23
|
|
|
23
24
|
await monitor.initialize();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openlayer",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.31",
|
|
4
4
|
"description": "The Openlayer TypeScript client",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"eslint-plugin-typescript-sort-keys": "^3.1.0",
|
|
21
21
|
"node-fetch": "^3.3.2",
|
|
22
22
|
"openai": "^4.19.0",
|
|
23
|
-
"openlayer": "^0.1.
|
|
23
|
+
"openlayer": "^0.1.30",
|
|
24
24
|
"uuid": "^9.0.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|