@llmops/sdk 0.5.1 → 0.5.2

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.
@@ -1,3 +1,3 @@
1
- import "./index-Cl7DD75E.cjs";
2
- import { t as createLLMOpsMiddleware } from "./index-7fTYtVGt.cjs";
1
+ import "./index-De3QdpKX.cjs";
2
+ import { t as createLLMOpsMiddleware } from "./index-CHeoSGK0.cjs";
3
3
  export { createLLMOpsMiddleware };
@@ -1,3 +1,3 @@
1
- import "./index-Qv1H7vX_.mjs";
2
- import { t as createLLMOpsMiddleware } from "./index-CPjAvkra.mjs";
1
+ import "./index-BkLZoEW_.mjs";
2
+ import { t as createLLMOpsMiddleware } from "./index-bdFT7Yxj.mjs";
3
3
  export { createLLMOpsMiddleware };
package/dist/hono.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as LLMOpsClient } from "./index-Cl7DD75E.cjs";
1
+ import { t as LLMOpsClient } from "./index-De3QdpKX.cjs";
2
2
  import { MiddlewareHandler } from "hono";
3
3
 
4
4
  //#region src/lib/hono/index.d.ts
package/dist/hono.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as LLMOpsClient } from "./index-Qv1H7vX_.mjs";
1
+ import { t as LLMOpsClient } from "./index-BkLZoEW_.mjs";
2
2
  import { MiddlewareHandler } from "hono";
3
3
 
4
4
  //#region src/lib/hono/index.d.ts
@@ -1,4 +1,4 @@
1
- import { LLMOpsConfig } from "@llmops/core";
1
+ import { LLMOpsConfig, ValidatedLLMOpsConfig } from "@llmops/core";
2
2
 
3
3
  //#region src/client/index.d.ts
4
4
  type ProviderConfig = {
@@ -8,9 +8,9 @@ type ProviderConfig = {
8
8
  };
9
9
  type LLMOpsClient = {
10
10
  handler: (request: Request) => Promise<Response>;
11
- config: LLMOpsConfig;
11
+ config: ValidatedLLMOpsConfig;
12
12
  provider: () => ProviderConfig;
13
13
  };
14
- declare const createLLMOps: (config: LLMOpsConfig) => LLMOpsClient;
14
+ declare const createLLMOps: (config?: LLMOpsConfig) => LLMOpsClient;
15
15
  //#endregion
16
16
  export { createLLMOps as n, LLMOpsClient as t };
@@ -1,4 +1,4 @@
1
- import { t as LLMOpsClient } from "./index-Cl7DD75E.cjs";
1
+ import { t as LLMOpsClient } from "./index-De3QdpKX.cjs";
2
2
  import { NextFunction, Request, Response } from "express";
3
3
 
4
4
  //#region src/lib/express/index.d.ts
@@ -1,4 +1,4 @@
1
- import { LLMOpsConfig } from "@llmops/core";
1
+ import { LLMOpsConfig, ValidatedLLMOpsConfig } from "@llmops/core";
2
2
 
3
3
  //#region src/client/index.d.ts
4
4
  type ProviderConfig = {
@@ -8,9 +8,9 @@ type ProviderConfig = {
8
8
  };
9
9
  type LLMOpsClient = {
10
10
  handler: (request: Request) => Promise<Response>;
11
- config: LLMOpsConfig;
11
+ config: ValidatedLLMOpsConfig;
12
12
  provider: () => ProviderConfig;
13
13
  };
14
- declare const createLLMOps: (config: LLMOpsConfig) => LLMOpsClient;
14
+ declare const createLLMOps: (config?: LLMOpsConfig) => LLMOpsClient;
15
15
  //#endregion
16
16
  export { createLLMOps as n, LLMOpsClient as t };
@@ -1,4 +1,4 @@
1
- import { t as LLMOpsClient } from "./index-Qv1H7vX_.mjs";
1
+ import { t as LLMOpsClient } from "./index-BkLZoEW_.mjs";
2
2
  import { NextFunction, Request, Response } from "express";
3
3
 
4
4
  //#region src/lib/express/index.d.ts
package/dist/index.cjs CHANGED
@@ -16,9 +16,9 @@ var AuthFeatureNotAvailableError = class extends Error {
16
16
  //#endregion
17
17
  //#region src/client/index.ts
18
18
  const createLLMOps = (config) => {
19
- const { app } = (0, __llmops_app.createApp)(config);
19
+ const { app, config: validatedConfig } = (0, __llmops_app.createApp)(config);
20
20
  const handler = async (req) => app.fetch(req, void 0, void 0);
21
- const basePath = config.basePath;
21
+ const basePath = validatedConfig.basePath;
22
22
  const internalFetch = (input, init) => {
23
23
  const request = new Request(input, init);
24
24
  const url = new URL(request.url);
@@ -27,7 +27,7 @@ const createLLMOps = (config) => {
27
27
  };
28
28
  return {
29
29
  handler,
30
- config: Object.freeze(config),
30
+ config: Object.freeze(validatedConfig),
31
31
  provider: () => ({
32
32
  baseURL: `http://localhost${basePath}/api/genai/v1`,
33
33
  apiKey: "llmops",
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { n as createLLMOps, t as LLMOpsClient } from "./index-Cl7DD75E.cjs";
2
- import { t as createLLMOpsMiddleware } from "./index-7fTYtVGt.cjs";
1
+ import { n as createLLMOps, t as LLMOpsClient } from "./index-De3QdpKX.cjs";
2
+ import { t as createLLMOpsMiddleware } from "./index-CHeoSGK0.cjs";
3
3
 
4
4
  //#region src/lib/auth/client.d.ts
5
5
 
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { n as createLLMOps, t as LLMOpsClient } from "./index-Qv1H7vX_.mjs";
2
- import { t as createLLMOpsMiddleware } from "./index-CPjAvkra.mjs";
1
+ import { n as createLLMOps, t as LLMOpsClient } from "./index-BkLZoEW_.mjs";
2
+ import { t as createLLMOpsMiddleware } from "./index-bdFT7Yxj.mjs";
3
3
 
4
4
  //#region src/lib/auth/client.d.ts
5
5
 
package/dist/index.mjs CHANGED
@@ -16,9 +16,9 @@ var AuthFeatureNotAvailableError = class extends Error {
16
16
  //#endregion
17
17
  //#region src/client/index.ts
18
18
  const createLLMOps = (config) => {
19
- const { app } = createApp(config);
19
+ const { app, config: validatedConfig } = createApp(config);
20
20
  const handler = async (req) => app.fetch(req, void 0, void 0);
21
- const basePath = config.basePath;
21
+ const basePath = validatedConfig.basePath;
22
22
  const internalFetch = (input, init) => {
23
23
  const request = new Request(input, init);
24
24
  const url = new URL(request.url);
@@ -27,7 +27,7 @@ const createLLMOps = (config) => {
27
27
  };
28
28
  return {
29
29
  handler,
30
- config: Object.freeze(config),
30
+ config: Object.freeze(validatedConfig),
31
31
  provider: () => ({
32
32
  baseURL: `http://localhost${basePath}/api/genai/v1`,
33
33
  apiKey: "llmops",
package/dist/nextjs.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as LLMOpsClient } from "./index-Cl7DD75E.cjs";
1
+ import { t as LLMOpsClient } from "./index-De3QdpKX.cjs";
2
2
 
3
3
  //#region src/lib/nextjs/index.d.ts
4
4
  declare function toNextJsHandler(client: LLMOpsClient): {
package/dist/nextjs.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as LLMOpsClient } from "./index-Qv1H7vX_.mjs";
1
+ import { t as LLMOpsClient } from "./index-BkLZoEW_.mjs";
2
2
 
3
3
  //#region src/lib/nextjs/index.d.ts
4
4
  declare function toNextJsHandler(client: LLMOpsClient): {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmops/sdk",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "An LLMOps toolkit for TypeScript applications",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -74,8 +74,8 @@
74
74
  "access": "public"
75
75
  },
76
76
  "dependencies": {
77
- "@llmops/app": "^0.5.1",
78
- "@llmops/core": "^0.5.1"
77
+ "@llmops/core": "^0.5.2",
78
+ "@llmops/app": "^0.5.2"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@types/express": "^5.0.6",