openlayer 0.1.36 → 0.1.38
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 +1 -1
- package/examples/langchain.mjs +2 -0
- package/examples/node_modules/.package-lock.json +1 -1
- package/examples/openai_dev_mode.ts +2 -2
- package/examples/package.json +1 -1
- package/package.json +12 -1
- package/tsconfig.json +2 -1
- /package/dist/{utils/request → request}/index.d.ts +0 -0
- /package/dist/{utils/request → request}/index.js +0 -0
- /package/dist/{utils/run → run}/index.d.ts +0 -0
- /package/dist/{utils/run → run}/index.js +0 -0
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ exports.OpenAIMonitor = exports.OpenlayerClient = void 0;
|
|
|
20
20
|
const node_fetch_1 = require("node-fetch");
|
|
21
21
|
const openai_1 = require("openai");
|
|
22
22
|
const uuid_1 = require("uuid");
|
|
23
|
-
const request_1 = require("./
|
|
23
|
+
const request_1 = require("./request");
|
|
24
24
|
const OpenAIPricing = {
|
|
25
25
|
'babbage-002': {
|
|
26
26
|
input: 0.0004,
|
package/examples/langchain.mjs
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import { ChatOpenAI } from 'langchain/chat_models/openai';
|
|
6
6
|
import { OpenlayerClient } from 'openlayer';
|
|
7
|
+
import { RunReturn } from 'openlayer/run';
|
|
8
|
+
import { CLIHandler } from 'openlayer/cli';
|
|
7
9
|
|
|
8
10
|
// Instantiate the Openlayer client with your API key
|
|
9
11
|
const openlayer = new OpenlayerClient({
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* node dist/run.js --dataset-path {{ path }} --dataset-name {{ name }}
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { RunReturn } from 'openlayer/
|
|
7
|
+
import { RunReturn } from 'openlayer/run';
|
|
8
8
|
import { OpenAIMonitor } from 'openlayer';
|
|
9
|
-
import { CLIHandler } from 'openlayer/
|
|
9
|
+
import { CLIHandler } from 'openlayer/cli';
|
|
10
10
|
import { ChatCompletion } from 'openai/resources';
|
|
11
11
|
|
|
12
12
|
export class MyModel {
|
package/examples/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openlayer",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.38",
|
|
4
4
|
"description": "The Openlayer TypeScript client",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -25,5 +25,16 @@
|
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/uuid": "^9.0.7",
|
|
27
27
|
"typescript": "^5.2.2"
|
|
28
|
+
},
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"import": "./lib/index.ts"
|
|
32
|
+
},
|
|
33
|
+
"./cli": {
|
|
34
|
+
"import": "./lib/cli/index.ts"
|
|
35
|
+
},
|
|
36
|
+
"./run": {
|
|
37
|
+
"import": "./lib/run/index.ts"
|
|
38
|
+
}
|
|
28
39
|
}
|
|
29
40
|
}
|
package/tsconfig.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|