@llmops/sdk 1.0.0-beta.7 → 1.0.0-beta.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/{d1-store-D664VLg0.d.cts → d1-store-DC1FMAzk.d.mts} +1 -1
- package/dist/{d1-store-DBf99oU8.d.mts → d1-store-Pbuwjx6D.d.cts} +1 -1
- package/dist/index.cjs +3 -4
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{interface-BrJMazBg.d.mts → interface-CNLmcugg.d.mts} +3 -22
- package/dist/{interface-DMuF7YgM.d.cts → interface-SBcQ5H-b.d.cts} +3 -22
- package/dist/pg-store-CQMQHDtm.d.cts +25 -0
- package/dist/pg-store-Dr0F1Jq4.d.mts +25 -0
- package/dist/store/d1.d.cts +2 -2
- package/dist/store/d1.d.mts +2 -2
- package/dist/store/pg.cjs +613 -2
- package/dist/store/pg.d.cts +2 -1
- package/dist/store/pg.d.mts +2 -1
- package/dist/store/pg.mjs +612 -1
- package/dist/{pg-store-sIMdF_Pc.mjs → types-BerUVJ45.mjs} +2 -610
- package/dist/{pg-store-uawkO2hJ.cjs → types-uIsMdtuF.cjs} +27 -611
- package/dist/types.d.cts +3 -2
- package/dist/types.d.mts +3 -2
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_types = require('./types-uIsMdtuF.cjs');
|
|
2
2
|
const require_express = require('./express-D-Nfc61h.cjs');
|
|
3
3
|
const require_agents_exporter = require('./agents-exporter-CEbQkds8.cjs');
|
|
4
4
|
let __llmops_core = require("@llmops/core");
|
|
@@ -230,10 +230,9 @@ function createLLMOpsSpanExporter(config) {
|
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
//#endregion
|
|
233
|
-
exports.COST_SUMMARY_GROUP_BY =
|
|
233
|
+
exports.COST_SUMMARY_GROUP_BY = require_types.COST_SUMMARY_GROUP_BY;
|
|
234
234
|
exports.createLLMOpsAgentsExporter = require_agents_exporter.createLLMOpsAgentsExporter;
|
|
235
235
|
exports.createLLMOpsLangChainClient = createLLMOpsLangChainClient;
|
|
236
236
|
exports.createLLMOpsMiddleware = require_express.createLLMOpsMiddleware;
|
|
237
237
|
exports.createLLMOpsSpanExporter = createLLMOpsSpanExporter;
|
|
238
|
-
exports.llmops = createLLMOps;
|
|
239
|
-
exports.pgStore = require_pg_store.createPgStore;
|
|
238
|
+
exports.llmops = createLLMOps;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as AgentsTracingExporter, o as LLMOpsAgentsExporterConfig, s as createLLMOpsAgentsExporter } from "./agents-exporter-vuQine9v.cjs";
|
|
2
2
|
import { a as LLMOpsLangChainClientConfig, i as createLLMOps, n as ProviderOptions, o as LangChainTracingClient, r as TraceContext, s as createLLMOpsLangChainClient, t as LLMOpsClient } from "./index-sjRozlIk.cjs";
|
|
3
3
|
import { t as createLLMOpsMiddleware } from "./index-BHO7MEJx.cjs";
|
|
4
|
-
import { a as
|
|
4
|
+
import { a as SpanEventInsert, i as LLMRequestInsert, n as COST_SUMMARY_GROUP_BY, o as SpanInsert, r as CostSummaryGroupBy, s as TraceUpsert, t as TelemetryStore } from "./interface-SBcQ5H-b.cjs";
|
|
5
5
|
|
|
6
6
|
//#region src/telemetry/exporter.d.ts
|
|
7
7
|
|
|
@@ -93,4 +93,4 @@ interface LLMOpsExporterConfig {
|
|
|
93
93
|
*/
|
|
94
94
|
declare function createLLMOpsSpanExporter(config: LLMOpsExporterConfig): SpanExporter;
|
|
95
95
|
//#endregion
|
|
96
|
-
export { type AgentsTracingExporter, COST_SUMMARY_GROUP_BY, type CostSummaryGroupBy, type LLMOpsAgentsExporterConfig, type LLMOpsClient, type LLMOpsExporterConfig, type LLMOpsLangChainClientConfig, type LLMRequestInsert, type LangChainTracingClient, type
|
|
96
|
+
export { type AgentsTracingExporter, COST_SUMMARY_GROUP_BY, type CostSummaryGroupBy, type LLMOpsAgentsExporterConfig, type LLMOpsClient, type LLMOpsExporterConfig, type LLMOpsLangChainClientConfig, type LLMRequestInsert, type LangChainTracingClient, type ProviderOptions, type SpanEventInsert, type SpanExporter, type SpanInsert, type TelemetryStore, type TraceContext, type TraceUpsert, createLLMOpsAgentsExporter, createLLMOpsLangChainClient, createLLMOpsMiddleware, createLLMOpsSpanExporter, createLLMOps as llmops };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as AgentsTracingExporter, o as LLMOpsAgentsExporterConfig, s as createLLMOpsAgentsExporter } from "./agents-exporter-Bn3NtzMO.mjs";
|
|
2
2
|
import { a as LLMOpsLangChainClientConfig, i as createLLMOps, n as ProviderOptions, o as LangChainTracingClient, r as TraceContext, s as createLLMOpsLangChainClient, t as LLMOpsClient } from "./index-C0CDqR9v.mjs";
|
|
3
3
|
import { t as createLLMOpsMiddleware } from "./index-DVkfeg2W.mjs";
|
|
4
|
-
import { a as
|
|
4
|
+
import { a as SpanEventInsert, i as LLMRequestInsert, n as COST_SUMMARY_GROUP_BY, o as SpanInsert, r as CostSummaryGroupBy, s as TraceUpsert, t as TelemetryStore } from "./interface-CNLmcugg.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/telemetry/exporter.d.ts
|
|
7
7
|
|
|
@@ -93,4 +93,4 @@ interface LLMOpsExporterConfig {
|
|
|
93
93
|
*/
|
|
94
94
|
declare function createLLMOpsSpanExporter(config: LLMOpsExporterConfig): SpanExporter;
|
|
95
95
|
//#endregion
|
|
96
|
-
export { type AgentsTracingExporter, COST_SUMMARY_GROUP_BY, type CostSummaryGroupBy, type LLMOpsAgentsExporterConfig, type LLMOpsClient, type LLMOpsExporterConfig, type LLMOpsLangChainClientConfig, type LLMRequestInsert, type LangChainTracingClient, type
|
|
96
|
+
export { type AgentsTracingExporter, COST_SUMMARY_GROUP_BY, type CostSummaryGroupBy, type LLMOpsAgentsExporterConfig, type LLMOpsClient, type LLMOpsExporterConfig, type LLMOpsLangChainClientConfig, type LLMRequestInsert, type LangChainTracingClient, type ProviderOptions, type SpanEventInsert, type SpanExporter, type SpanInsert, type TelemetryStore, type TraceContext, type TraceUpsert, createLLMOpsAgentsExporter, createLLMOpsLangChainClient, createLLMOpsMiddleware, createLLMOpsSpanExporter, createLLMOps as llmops };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as COST_SUMMARY_GROUP_BY } from "./types-BerUVJ45.mjs";
|
|
2
2
|
import { t as createLLMOpsMiddleware } from "./express-ClNV0OG9.mjs";
|
|
3
3
|
import { t as createLLMOpsAgentsExporter } from "./agents-exporter-CGxTzDeQ.mjs";
|
|
4
4
|
import { LLMOPS_INTERNAL_HEADER, LLMOPS_SPAN_NAME_HEADER, LLMOPS_TRACE_ID_HEADER, LLMOPS_TRACE_NAME_HEADER } from "@llmops/core";
|
|
@@ -230,4 +230,4 @@ function createLLMOpsSpanExporter(config) {
|
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
//#endregion
|
|
233
|
-
export { COST_SUMMARY_GROUP_BY, createLLMOpsAgentsExporter, createLLMOpsLangChainClient, createLLMOpsMiddleware, createLLMOpsSpanExporter, createLLMOps as llmops
|
|
233
|
+
export { COST_SUMMARY_GROUP_BY, createLLMOpsAgentsExporter, createLLMOpsLangChainClient, createLLMOpsMiddleware, createLLMOpsSpanExporter, createLLMOps as llmops };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
2
|
|
|
3
|
-
//#region src/telemetry/
|
|
3
|
+
//#region src/telemetry/types.d.ts
|
|
4
|
+
|
|
4
5
|
declare const insertLLMRequestSchema: z.ZodObject<{
|
|
5
6
|
requestId: z.ZodString;
|
|
6
7
|
configId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -112,26 +113,6 @@ declare const insertSpanEventSchema: z.ZodObject<{
|
|
|
112
113
|
attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
113
114
|
}, z.core.$strip>;
|
|
114
115
|
type SpanEventInsert = z.infer<typeof insertSpanEventSchema>;
|
|
115
|
-
type PgStore = TelemetryStore & {
|
|
116
|
-
_pool: unknown;
|
|
117
|
-
_schema: string;
|
|
118
|
-
};
|
|
119
|
-
/**
|
|
120
|
-
* Create a PostgreSQL-backed telemetry store.
|
|
121
|
-
*
|
|
122
|
-
* Usage:
|
|
123
|
-
* ```ts
|
|
124
|
-
* import { llmops } from '@llmops/sdk'
|
|
125
|
-
* import { pgStore } from '@llmops/sdk/store/pg'
|
|
126
|
-
*
|
|
127
|
-
* const ops = llmops({
|
|
128
|
-
* telemetry: pgStore(process.env.DATABASE_URL),
|
|
129
|
-
* })
|
|
130
|
-
* ```
|
|
131
|
-
*/
|
|
132
|
-
declare function createPgStore(connectionString: string, options?: {
|
|
133
|
-
schema?: string;
|
|
134
|
-
}): PgStore;
|
|
135
116
|
//#endregion
|
|
136
117
|
//#region src/telemetry/interface.d.ts
|
|
137
118
|
/**
|
|
@@ -237,4 +218,4 @@ interface TelemetryStore {
|
|
|
237
218
|
}): Promise<unknown>;
|
|
238
219
|
}
|
|
239
220
|
//#endregion
|
|
240
|
-
export {
|
|
221
|
+
export { SpanEventInsert as a, LLMRequestInsert as i, COST_SUMMARY_GROUP_BY as n, SpanInsert as o, CostSummaryGroupBy as r, TraceUpsert as s, TelemetryStore as t };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
2
|
|
|
3
|
-
//#region src/telemetry/
|
|
3
|
+
//#region src/telemetry/types.d.ts
|
|
4
|
+
|
|
4
5
|
declare const insertLLMRequestSchema: z.ZodObject<{
|
|
5
6
|
requestId: z.ZodString;
|
|
6
7
|
configId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -112,26 +113,6 @@ declare const insertSpanEventSchema: z.ZodObject<{
|
|
|
112
113
|
attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
113
114
|
}, z.core.$strip>;
|
|
114
115
|
type SpanEventInsert = z.infer<typeof insertSpanEventSchema>;
|
|
115
|
-
type PgStore = TelemetryStore & {
|
|
116
|
-
_pool: unknown;
|
|
117
|
-
_schema: string;
|
|
118
|
-
};
|
|
119
|
-
/**
|
|
120
|
-
* Create a PostgreSQL-backed telemetry store.
|
|
121
|
-
*
|
|
122
|
-
* Usage:
|
|
123
|
-
* ```ts
|
|
124
|
-
* import { llmops } from '@llmops/sdk'
|
|
125
|
-
* import { pgStore } from '@llmops/sdk/store/pg'
|
|
126
|
-
*
|
|
127
|
-
* const ops = llmops({
|
|
128
|
-
* telemetry: pgStore(process.env.DATABASE_URL),
|
|
129
|
-
* })
|
|
130
|
-
* ```
|
|
131
|
-
*/
|
|
132
|
-
declare function createPgStore(connectionString: string, options?: {
|
|
133
|
-
schema?: string;
|
|
134
|
-
}): PgStore;
|
|
135
116
|
//#endregion
|
|
136
117
|
//#region src/telemetry/interface.d.ts
|
|
137
118
|
/**
|
|
@@ -237,4 +218,4 @@ interface TelemetryStore {
|
|
|
237
218
|
}): Promise<unknown>;
|
|
238
219
|
}
|
|
239
220
|
//#endregion
|
|
240
|
-
export {
|
|
221
|
+
export { SpanEventInsert as a, LLMRequestInsert as i, COST_SUMMARY_GROUP_BY as n, SpanInsert as o, CostSummaryGroupBy as r, TraceUpsert as s, TelemetryStore as t };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { t as TelemetryStore } from "./interface-SBcQ5H-b.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/telemetry/pg-store.d.ts
|
|
4
|
+
type PgStore = TelemetryStore & {
|
|
5
|
+
_pool: unknown;
|
|
6
|
+
_schema: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Create a PostgreSQL-backed telemetry store.
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { llmops } from '@llmops/sdk'
|
|
14
|
+
* import { pgStore } from '@llmops/sdk/store/pg'
|
|
15
|
+
*
|
|
16
|
+
* const ops = llmops({
|
|
17
|
+
* telemetry: pgStore(process.env.DATABASE_URL),
|
|
18
|
+
* })
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
declare function createPgStore(connectionString: string, options?: {
|
|
22
|
+
schema?: string;
|
|
23
|
+
}): PgStore;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { createPgStore as n, PgStore as t };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { t as TelemetryStore } from "./interface-CNLmcugg.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/telemetry/pg-store.d.ts
|
|
4
|
+
type PgStore = TelemetryStore & {
|
|
5
|
+
_pool: unknown;
|
|
6
|
+
_schema: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Create a PostgreSQL-backed telemetry store.
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { llmops } from '@llmops/sdk'
|
|
14
|
+
* import { pgStore } from '@llmops/sdk/store/pg'
|
|
15
|
+
*
|
|
16
|
+
* const ops = llmops({
|
|
17
|
+
* telemetry: pgStore(process.env.DATABASE_URL),
|
|
18
|
+
* })
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
declare function createPgStore(connectionString: string, options?: {
|
|
22
|
+
schema?: string;
|
|
23
|
+
}): PgStore;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { createPgStore as n, PgStore as t };
|
package/dist/store/d1.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../interface-
|
|
2
|
-
import { n as createD1Store, r as D1Database, t as D1Store } from "../d1-store-
|
|
1
|
+
import "../interface-SBcQ5H-b.cjs";
|
|
2
|
+
import { n as createD1Store, r as D1Database, t as D1Store } from "../d1-store-Pbuwjx6D.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/store/d1/migrate.d.ts
|
|
5
5
|
/**
|
package/dist/store/d1.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../interface-
|
|
2
|
-
import { n as createD1Store, r as D1Database, t as D1Store } from "../d1-store-
|
|
1
|
+
import "../interface-CNLmcugg.mjs";
|
|
2
|
+
import { n as createD1Store, r as D1Database, t as D1Store } from "../d1-store-DC1FMAzk.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/store/d1/migrate.d.ts
|
|
5
5
|
/**
|