openlayer 0.0.7 → 0.0.8
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 +4 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -29,7 +29,7 @@ class OpenAIMonitor {
|
|
|
29
29
|
.map(({ content }) => content)
|
|
30
30
|
.join('\n')
|
|
31
31
|
.trim();
|
|
32
|
-
this.resolvedQuery = (endpoint, args = {}) => (0, request_1.resolvedQuery)(this.openlayerServerUrl, endpoint,
|
|
32
|
+
this.resolvedQuery = (endpoint, args = {}) => (0, request_1.resolvedQuery)(this.openlayerServerUrl, endpoint, args);
|
|
33
33
|
this.uploadDataToOpenlayer = (data) => __awaiter(this, void 0, void 0, function* () {
|
|
34
34
|
const uploadToInferencePipeline = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
35
35
|
const dataStreamEndpoint = `/inference-pipelines/${id}/data-stream`;
|
|
@@ -68,6 +68,7 @@ class OpenAIMonitor {
|
|
|
68
68
|
const projectsEndpoint = '/projects';
|
|
69
69
|
const projectsQueryParameters = {
|
|
70
70
|
name: this.openlayerProjectName,
|
|
71
|
+
version: this.version,
|
|
71
72
|
};
|
|
72
73
|
const projectsQuery = this.resolvedQuery(projectsEndpoint, projectsQueryParameters);
|
|
73
74
|
const projectsResponse = yield fetch(projectsQuery, {
|
|
@@ -88,6 +89,7 @@ class OpenAIMonitor {
|
|
|
88
89
|
const inferencePipelineEndpoint = `/projects/${project.id}/inference-pipelines`;
|
|
89
90
|
const inferencePipelineQueryParameters = {
|
|
90
91
|
name: this.openlayerInferencePipelineName,
|
|
92
|
+
version: this.version,
|
|
91
93
|
};
|
|
92
94
|
const inferencePipelineQuery = this.resolvedQuery(inferencePipelineEndpoint, inferencePipelineQueryParameters);
|
|
93
95
|
const inferencePipelineResponse = yield fetch(inferencePipelineQuery, {
|
|
@@ -108,7 +110,7 @@ class OpenAIMonitor {
|
|
|
108
110
|
}
|
|
109
111
|
else {
|
|
110
112
|
const createInferencePipelineEndpoint = `/projects/${project.id}/inference-pipelines`;
|
|
111
|
-
const createInferencePipelineQuery = this.resolvedQuery(createInferencePipelineEndpoint);
|
|
113
|
+
const createInferencePipelineQuery = this.resolvedQuery(createInferencePipelineEndpoint, { version: this.version });
|
|
112
114
|
const createInferencePipelineResponse = yield fetch(createInferencePipelineQuery, {
|
|
113
115
|
body: JSON.stringify({
|
|
114
116
|
description: '',
|