openlayer 0.1.30 → 0.1.32
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 +5 -5
- package/package.json +1 -2
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 {
|
|
@@ -563,8 +563,8 @@ class OpenAIMonitor {
|
|
|
563
563
|
: typeof output === 'undefined' || output === null
|
|
564
564
|
? ''
|
|
565
565
|
: `${output}`;
|
|
566
|
-
this.openlayerClient.streamData(Object.assign(Object.assign({
|
|
567
|
-
latency, output: resolvedOutput, timestamp: run.created_at, tokens: total_tokens }, inputVariablesMap), additionalLogs), config, this.openlayerInferencePipelineId);
|
|
566
|
+
this.openlayerClient.streamData(Object.assign(Object.assign({ cost,
|
|
567
|
+
latency, openai_assistant_id: assistant_id, openai_thread_id: thread_id, output: resolvedOutput, timestamp: run.created_at, tokens: total_tokens }, inputVariablesMap), additionalLogs), config, this.openlayerInferencePipelineId);
|
|
568
568
|
}
|
|
569
569
|
catch (error) {
|
|
570
570
|
console.error('Error logging thread run:', error);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openlayer",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.32",
|
|
4
4
|
"description": "The Openlayer TypeScript client",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,7 +20,6 @@
|
|
|
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.27",
|
|
24
23
|
"uuid": "^9.0.1"
|
|
25
24
|
},
|
|
26
25
|
"devDependencies": {
|