@llmops/sdk 1.0.0-beta.2 → 1.0.0-beta.22
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/agents.cjs +1 -1
- package/dist/agents.d.cts +1 -1
- package/dist/agents.d.mts +1 -1
- package/dist/agents.mjs +1 -1
- package/dist/chunk-CxwUPGYo.mjs +21 -0
- package/dist/constants--ywcWP7q.cjs +18 -0
- package/dist/constants-BvnYU_pl.mjs +12 -0
- package/dist/eval.cjs +367 -0
- package/dist/eval.d.cts +200 -0
- package/dist/eval.d.mts +200 -0
- package/dist/eval.mjs +364 -0
- package/dist/express.cjs +29 -2
- package/dist/express.d.cts +7 -3
- package/dist/express.d.mts +7 -3
- package/dist/express.mjs +28 -1
- package/dist/hono.d.cts +2 -2
- package/dist/hono.d.mts +2 -2
- package/dist/{index-05byZKeu.d.mts → index-BZLzywwb.d.mts} +1 -1
- package/dist/{index-Beb26ZNG.d.cts → index-lgspeSNr.d.cts} +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +3 -3
- package/dist/interface-BbAwy96d.d.cts +223 -0
- package/dist/interface-Dz7B6QN1.d.mts +223 -0
- package/dist/nextjs.d.cts +2 -2
- package/dist/nextjs.d.mts +2 -2
- package/dist/store/d1.cjs +512 -0
- package/dist/store/d1.d.cts +60 -0
- package/dist/store/d1.d.mts +60 -0
- package/dist/store/d1.mjs +511 -0
- package/dist/store/pg.cjs +13634 -6
- package/dist/store/pg.d.cts +38 -2
- package/dist/store/pg.d.mts +38 -2
- package/dist/store/pg.mjs +13618 -2
- package/dist/store/sqlite.cjs +541 -0
- package/dist/store/sqlite.d.cts +50 -0
- package/dist/store/sqlite.d.mts +50 -0
- package/dist/store/sqlite.mjs +541 -0
- package/dist/types.d.cts +2 -2
- package/dist/types.d.mts +2 -2
- package/package.json +48 -3
- package/dist/express-B-wbCza5.cjs +0 -35
- package/dist/express-DMtc0d_Y.mjs +0 -30
- package/dist/index-DnWGper4.d.cts +0 -7
- package/dist/index-Dvz-L2Hf.d.mts +0 -7
- /package/dist/{agents-exporter-vcpgCF69.mjs → agents-exporter-CGxTzDeQ.mjs} +0 -0
- /package/dist/{agents-exporter-BZHCcFSd.d.mts → agents-exporter-CehKIArI.d.mts} +0 -0
- /package/dist/{agents-exporter-BuTq2n2y.cjs → agents-exporter-DizRE7CQ.cjs} +0 -0
- /package/dist/{agents-exporter-uzN3bkth.d.cts → agents-exporter-DkqkCcIx.d.cts} +0 -0
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Readable } from "node:stream";
|
|
2
|
-
|
|
3
|
-
//#region src/lib/express/index.ts
|
|
4
|
-
function createLLMOpsMiddleware(client) {
|
|
5
|
-
const basePath = client.config.basePath;
|
|
6
|
-
return async (req, res, next) => {
|
|
7
|
-
let urlPath = req.originalUrl;
|
|
8
|
-
if (basePath && urlPath.startsWith(basePath)) urlPath = urlPath.slice(basePath.length) || "/";
|
|
9
|
-
const url = new URL(urlPath, `${req.protocol}://${req.get("host")}`);
|
|
10
|
-
const request = new Request(url, {
|
|
11
|
-
method: req.method,
|
|
12
|
-
headers: req.headers,
|
|
13
|
-
body: ["GET", "HEAD"].includes(req.method) ? void 0 : JSON.stringify(req.body)
|
|
14
|
-
});
|
|
15
|
-
const response = await client.handler(request);
|
|
16
|
-
if (response.status === 404) return next();
|
|
17
|
-
response.headers?.forEach((value, key) => {
|
|
18
|
-
res.setHeader(key, value);
|
|
19
|
-
});
|
|
20
|
-
res.status(response.status);
|
|
21
|
-
if ((response.headers?.get("content-type"))?.includes("text/event-stream") && response.body) Readable.fromWeb(response.body).pipe(res);
|
|
22
|
-
else {
|
|
23
|
-
const body = await response.text();
|
|
24
|
-
res.send(body);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
//#endregion
|
|
30
|
-
export { createLLMOpsMiddleware as t };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { t as LLMOpsClient } from "./index-Beb26ZNG.cjs";
|
|
2
|
-
import { NextFunction, Request, Response } from "express";
|
|
3
|
-
|
|
4
|
-
//#region src/lib/express/index.d.ts
|
|
5
|
-
declare function createLLMOpsMiddleware(client: LLMOpsClient): (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { createLLMOpsMiddleware as t };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { t as LLMOpsClient } from "./index-05byZKeu.mjs";
|
|
2
|
-
import { NextFunction, Request, Response } from "express";
|
|
3
|
-
|
|
4
|
-
//#region src/lib/express/index.d.ts
|
|
5
|
-
declare function createLLMOpsMiddleware(client: LLMOpsClient): (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { createLLMOpsMiddleware as t };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|