@llmops/core 0.6.7-beta.3 → 0.6.7
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/db/index.d.cts +1 -1
- package/dist/db/index.d.mts +1 -1
- package/dist/{index-2POEhF2_.d.mts → index-CyVFWq76.d.cts} +49 -49
- package/dist/{index-BVI_reop.d.cts → index-D3onb7gK.d.mts} +49 -49
- package/dist/index.cjs +7 -2
- package/dist/index.d.cts +278 -277
- package/dist/index.d.mts +278 -277
- package/dist/index.mjs +7 -2
- package/package.json +2 -2
package/dist/db/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as SCHEMA_METADATA, A as DatasetsTable, At as playgroundsSchema, B as LLMRequest, Bt as workspaceSettingsSchema, C as Dataset, Ct as environmentSecretsSchema, D as DatasetVersionRecord, Dt as playgroundColumnSchema, E as DatasetVersion, Et as llmRequestsSchema, F as GuardrailConfig, Ft as spansSchema, G as PlaygroundResultsTable, H as Playground, I as GuardrailConfigsTable, It as targetingRulesSchema, J as PlaygroundsTable, K as PlaygroundRun, L as GuardrailResult, Lt as tracesSchema, M as EnvironmentSecret, Mt as providerGuardrailOverridesSchema, N as EnvironmentSecretsTable, Nt as schemas, O as DatasetVersionRecordsTable, Ot as playgroundResultsSchema, P as EnvironmentsTable, Pt as spanEventsSchema, Q as ProviderGuardrailOverridesTable, R as GuardrailResults, Rt as variantVersionsSchema, S as Database, St as datasetsSchema, T as DatasetRecordsTable, Tt as guardrailConfigsSchema, U as PlaygroundColumn, V as LLMRequestsTable, W as PlaygroundResult, X as ProviderConfigsTable, Y as ProviderConfig, Z as ProviderGuardrailOverride, _ as validateTableData, _t as configVariantsSchema, a as createDatabaseFromConnection, at as TableName, b as ConfigVariantsTable, bt as datasetVersionRecordsSchema, c as executeWithSchema, ct as Trace, d as getMigrations, dt as Variant, et as Selectable, f as matchType, ft as VariantVersion, g as validatePartialTableData, gt as WorkspaceSettingsTable, h as parseTableData, ht as WorkspaceSettings, i as createDatabase, it as SpansTable, j as Environment, jt as providerConfigsSchema, k as DatasetVersionsTable, kt as playgroundRunsSchema, l as MigrationOptions, lt as TracesTable, m as parsePartialTableData, mt as VariantsTable, n as DatabaseOptions, nt as SpanEvent, o as detectDatabaseType, ot as TargetingRule, p as runAutoMigrations, pt as VariantVersionsTable, q as PlaygroundRunsTable, r as DatabaseType, rt as SpanEventsTable, s as createNeonDialect, st as TargetingRulesTable, t as DatabaseConnection, tt as Span, u as MigrationResult, ut as Updateable, v as Config, vt as configsSchema, w as DatasetRecord, wt as environmentsSchema, x as ConfigsTable, xt as datasetVersionsSchema, y as ConfigVariant, yt as datasetRecordsSchema, z as Insertable, zt as variantsSchema } from "../index-
|
|
1
|
+
import { $ as SCHEMA_METADATA, A as DatasetsTable, At as playgroundsSchema, B as LLMRequest, Bt as workspaceSettingsSchema, C as Dataset, Ct as environmentSecretsSchema, D as DatasetVersionRecord, Dt as playgroundColumnSchema, E as DatasetVersion, Et as llmRequestsSchema, F as GuardrailConfig, Ft as spansSchema, G as PlaygroundResultsTable, H as Playground, I as GuardrailConfigsTable, It as targetingRulesSchema, J as PlaygroundsTable, K as PlaygroundRun, L as GuardrailResult, Lt as tracesSchema, M as EnvironmentSecret, Mt as providerGuardrailOverridesSchema, N as EnvironmentSecretsTable, Nt as schemas, O as DatasetVersionRecordsTable, Ot as playgroundResultsSchema, P as EnvironmentsTable, Pt as spanEventsSchema, Q as ProviderGuardrailOverridesTable, R as GuardrailResults, Rt as variantVersionsSchema, S as Database, St as datasetsSchema, T as DatasetRecordsTable, Tt as guardrailConfigsSchema, U as PlaygroundColumn, V as LLMRequestsTable, W as PlaygroundResult, X as ProviderConfigsTable, Y as ProviderConfig, Z as ProviderGuardrailOverride, _ as validateTableData, _t as configVariantsSchema, a as createDatabaseFromConnection, at as TableName, b as ConfigVariantsTable, bt as datasetVersionRecordsSchema, c as executeWithSchema, ct as Trace, d as getMigrations, dt as Variant, et as Selectable, f as matchType, ft as VariantVersion, g as validatePartialTableData, gt as WorkspaceSettingsTable, h as parseTableData, ht as WorkspaceSettings, i as createDatabase, it as SpansTable, j as Environment, jt as providerConfigsSchema, k as DatasetVersionsTable, kt as playgroundRunsSchema, l as MigrationOptions, lt as TracesTable, m as parsePartialTableData, mt as VariantsTable, n as DatabaseOptions, nt as SpanEvent, o as detectDatabaseType, ot as TargetingRule, p as runAutoMigrations, pt as VariantVersionsTable, q as PlaygroundRunsTable, r as DatabaseType, rt as SpanEventsTable, s as createNeonDialect, st as TargetingRulesTable, t as DatabaseConnection, tt as Span, u as MigrationResult, ut as Updateable, v as Config, vt as configsSchema, w as DatasetRecord, wt as environmentsSchema, x as ConfigsTable, xt as datasetVersionsSchema, y as ConfigVariant, yt as datasetRecordsSchema, z as Insertable, zt as variantsSchema } from "../index-CyVFWq76.cjs";
|
|
2
2
|
export { Config, ConfigVariant, ConfigVariantsTable, ConfigsTable, Database, DatabaseConnection, DatabaseOptions, DatabaseType, Dataset, DatasetRecord, DatasetRecordsTable, DatasetVersion, DatasetVersionRecord, DatasetVersionRecordsTable, DatasetVersionsTable, DatasetsTable, Environment, EnvironmentSecret, EnvironmentSecretsTable, EnvironmentsTable, GuardrailConfig, GuardrailConfigsTable, GuardrailResult, GuardrailResults, Insertable, LLMRequest, LLMRequestsTable, MigrationOptions, MigrationResult, Playground, PlaygroundColumn, PlaygroundResult, PlaygroundResultsTable, PlaygroundRun, PlaygroundRunsTable, PlaygroundsTable, ProviderConfig, ProviderConfigsTable, ProviderGuardrailOverride, ProviderGuardrailOverridesTable, SCHEMA_METADATA, Selectable, Span, SpanEvent, SpanEventsTable, SpansTable, TableName, TargetingRule, TargetingRulesTable, Trace, TracesTable, Updateable, Variant, VariantVersion, VariantVersionsTable, VariantsTable, WorkspaceSettings, WorkspaceSettingsTable, configVariantsSchema, configsSchema, createDatabase, createDatabaseFromConnection, createNeonDialect, datasetRecordsSchema, datasetVersionRecordsSchema, datasetVersionsSchema, datasetsSchema, detectDatabaseType, environmentSecretsSchema, environmentsSchema, executeWithSchema, getMigrations, guardrailConfigsSchema, llmRequestsSchema, matchType, parsePartialTableData, parseTableData, playgroundColumnSchema, playgroundResultsSchema, playgroundRunsSchema, playgroundsSchema, providerConfigsSchema, providerGuardrailOverridesSchema, runAutoMigrations, schemas, spanEventsSchema, spansSchema, targetingRulesSchema, tracesSchema, validatePartialTableData, validateTableData, variantVersionsSchema, variantsSchema, workspaceSettingsSchema };
|
package/dist/db/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as SCHEMA_METADATA, A as DatasetsTable, At as playgroundsSchema, B as LLMRequest, Bt as workspaceSettingsSchema, C as Dataset, Ct as environmentSecretsSchema, D as DatasetVersionRecord, Dt as playgroundColumnSchema, E as DatasetVersion, Et as llmRequestsSchema, F as GuardrailConfig, Ft as spansSchema, G as PlaygroundResultsTable, H as Playground, I as GuardrailConfigsTable, It as targetingRulesSchema, J as PlaygroundsTable, K as PlaygroundRun, L as GuardrailResult, Lt as tracesSchema, M as EnvironmentSecret, Mt as providerGuardrailOverridesSchema, N as EnvironmentSecretsTable, Nt as schemas, O as DatasetVersionRecordsTable, Ot as playgroundResultsSchema, P as EnvironmentsTable, Pt as spanEventsSchema, Q as ProviderGuardrailOverridesTable, R as GuardrailResults, Rt as variantVersionsSchema, S as Database, St as datasetsSchema, T as DatasetRecordsTable, Tt as guardrailConfigsSchema, U as PlaygroundColumn, V as LLMRequestsTable, W as PlaygroundResult, X as ProviderConfigsTable, Y as ProviderConfig, Z as ProviderGuardrailOverride, _ as validateTableData, _t as configVariantsSchema, a as createDatabaseFromConnection, at as TableName, b as ConfigVariantsTable, bt as datasetVersionRecordsSchema, c as executeWithSchema, ct as Trace, d as getMigrations, dt as Variant, et as Selectable, f as matchType, ft as VariantVersion, g as validatePartialTableData, gt as WorkspaceSettingsTable, h as parseTableData, ht as WorkspaceSettings, i as createDatabase, it as SpansTable, j as Environment, jt as providerConfigsSchema, k as DatasetVersionsTable, kt as playgroundRunsSchema, l as MigrationOptions, lt as TracesTable, m as parsePartialTableData, mt as VariantsTable, n as DatabaseOptions, nt as SpanEvent, o as detectDatabaseType, ot as TargetingRule, p as runAutoMigrations, pt as VariantVersionsTable, q as PlaygroundRunsTable, r as DatabaseType, rt as SpanEventsTable, s as createNeonDialect, st as TargetingRulesTable, t as DatabaseConnection, tt as Span, u as MigrationResult, ut as Updateable, v as Config, vt as configsSchema, w as DatasetRecord, wt as environmentsSchema, x as ConfigsTable, xt as datasetVersionsSchema, y as ConfigVariant, yt as datasetRecordsSchema, z as Insertable, zt as variantsSchema } from "../index-
|
|
1
|
+
import { $ as SCHEMA_METADATA, A as DatasetsTable, At as playgroundsSchema, B as LLMRequest, Bt as workspaceSettingsSchema, C as Dataset, Ct as environmentSecretsSchema, D as DatasetVersionRecord, Dt as playgroundColumnSchema, E as DatasetVersion, Et as llmRequestsSchema, F as GuardrailConfig, Ft as spansSchema, G as PlaygroundResultsTable, H as Playground, I as GuardrailConfigsTable, It as targetingRulesSchema, J as PlaygroundsTable, K as PlaygroundRun, L as GuardrailResult, Lt as tracesSchema, M as EnvironmentSecret, Mt as providerGuardrailOverridesSchema, N as EnvironmentSecretsTable, Nt as schemas, O as DatasetVersionRecordsTable, Ot as playgroundResultsSchema, P as EnvironmentsTable, Pt as spanEventsSchema, Q as ProviderGuardrailOverridesTable, R as GuardrailResults, Rt as variantVersionsSchema, S as Database, St as datasetsSchema, T as DatasetRecordsTable, Tt as guardrailConfigsSchema, U as PlaygroundColumn, V as LLMRequestsTable, W as PlaygroundResult, X as ProviderConfigsTable, Y as ProviderConfig, Z as ProviderGuardrailOverride, _ as validateTableData, _t as configVariantsSchema, a as createDatabaseFromConnection, at as TableName, b as ConfigVariantsTable, bt as datasetVersionRecordsSchema, c as executeWithSchema, ct as Trace, d as getMigrations, dt as Variant, et as Selectable, f as matchType, ft as VariantVersion, g as validatePartialTableData, gt as WorkspaceSettingsTable, h as parseTableData, ht as WorkspaceSettings, i as createDatabase, it as SpansTable, j as Environment, jt as providerConfigsSchema, k as DatasetVersionsTable, kt as playgroundRunsSchema, l as MigrationOptions, lt as TracesTable, m as parsePartialTableData, mt as VariantsTable, n as DatabaseOptions, nt as SpanEvent, o as detectDatabaseType, ot as TargetingRule, p as runAutoMigrations, pt as VariantVersionsTable, q as PlaygroundRunsTable, r as DatabaseType, rt as SpanEventsTable, s as createNeonDialect, st as TargetingRulesTable, t as DatabaseConnection, tt as Span, u as MigrationResult, ut as Updateable, v as Config, vt as configsSchema, w as DatasetRecord, wt as environmentsSchema, x as ConfigsTable, xt as datasetVersionsSchema, y as ConfigVariant, yt as datasetRecordsSchema, z as Insertable, zt as variantsSchema } from "../index-D3onb7gK.mjs";
|
|
2
2
|
export { Config, ConfigVariant, ConfigVariantsTable, ConfigsTable, Database, DatabaseConnection, DatabaseOptions, DatabaseType, Dataset, DatasetRecord, DatasetRecordsTable, DatasetVersion, DatasetVersionRecord, DatasetVersionRecordsTable, DatasetVersionsTable, DatasetsTable, Environment, EnvironmentSecret, EnvironmentSecretsTable, EnvironmentsTable, GuardrailConfig, GuardrailConfigsTable, GuardrailResult, GuardrailResults, Insertable, LLMRequest, LLMRequestsTable, MigrationOptions, MigrationResult, Playground, PlaygroundColumn, PlaygroundResult, PlaygroundResultsTable, PlaygroundRun, PlaygroundRunsTable, PlaygroundsTable, ProviderConfig, ProviderConfigsTable, ProviderGuardrailOverride, ProviderGuardrailOverridesTable, SCHEMA_METADATA, Selectable, Span, SpanEvent, SpanEventsTable, SpansTable, TableName, TargetingRule, TargetingRulesTable, Trace, TracesTable, Updateable, Variant, VariantVersion, VariantVersionsTable, VariantsTable, WorkspaceSettings, WorkspaceSettingsTable, configVariantsSchema, configsSchema, createDatabase, createDatabaseFromConnection, createNeonDialect, datasetRecordsSchema, datasetVersionRecordsSchema, datasetVersionsSchema, datasetsSchema, detectDatabaseType, environmentSecretsSchema, environmentsSchema, executeWithSchema, getMigrations, guardrailConfigsSchema, llmRequestsSchema, matchType, parsePartialTableData, parseTableData, playgroundColumnSchema, playgroundResultsSchema, playgroundRunsSchema, playgroundsSchema, providerConfigsSchema, providerGuardrailOverridesSchema, runAutoMigrations, schemas, spanEventsSchema, spansSchema, targetingRulesSchema, tracesSchema, validatePartialTableData, validateTableData, variantVersionsSchema, variantsSchema, workspaceSettingsSchema };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ColumnType, Dialect, Generated, Kysely, MssqlDialect, MysqlDialect, PostgresDialect, SqliteDialect } from "kysely";
|
|
2
|
-
import { NeonQueryFunction } from "@neondatabase/serverless";
|
|
3
2
|
import * as zod0 from "zod";
|
|
4
3
|
import { z } from "zod";
|
|
4
|
+
import { NeonQueryFunction } from "@neondatabase/serverless";
|
|
5
5
|
|
|
6
6
|
//#region src/db/schema.d.ts
|
|
7
7
|
declare const configsSchema: z.ZodObject<{
|
|
@@ -2588,22 +2588,6 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
2588
2588
|
id: string;
|
|
2589
2589
|
createdAt: Date;
|
|
2590
2590
|
updatedAt: Date;
|
|
2591
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2592
|
-
providerConfigId: string;
|
|
2593
|
-
guardrailConfigId: string;
|
|
2594
|
-
enabled: boolean;
|
|
2595
|
-
id: string;
|
|
2596
|
-
createdAt: Date;
|
|
2597
|
-
updatedAt: Date;
|
|
2598
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2599
|
-
}> | zod0.ZodSafeParseError<{
|
|
2600
|
-
providerConfigId: string;
|
|
2601
|
-
guardrailConfigId: string;
|
|
2602
|
-
enabled: boolean;
|
|
2603
|
-
id: string;
|
|
2604
|
-
createdAt: Date;
|
|
2605
|
-
updatedAt: Date;
|
|
2606
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2607
2591
|
}> | zod0.ZodSafeParseSuccess<{
|
|
2608
2592
|
datasetId: string;
|
|
2609
2593
|
versionNumber: number;
|
|
@@ -2654,6 +2638,22 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
2654
2638
|
id: string;
|
|
2655
2639
|
createdAt: Date;
|
|
2656
2640
|
updatedAt: Date;
|
|
2641
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
2642
|
+
providerConfigId: string;
|
|
2643
|
+
guardrailConfigId: string;
|
|
2644
|
+
enabled: boolean;
|
|
2645
|
+
id: string;
|
|
2646
|
+
createdAt: Date;
|
|
2647
|
+
updatedAt: Date;
|
|
2648
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
2649
|
+
}> | zod0.ZodSafeParseError<{
|
|
2650
|
+
providerConfigId: string;
|
|
2651
|
+
guardrailConfigId: string;
|
|
2652
|
+
enabled: boolean;
|
|
2653
|
+
id: string;
|
|
2654
|
+
createdAt: Date;
|
|
2655
|
+
updatedAt: Date;
|
|
2656
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
2657
2657
|
}> | zod0.ZodSafeParseSuccess<{
|
|
2658
2658
|
requestId: string;
|
|
2659
2659
|
provider: string;
|
|
@@ -2960,22 +2960,6 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
2960
2960
|
id?: string | undefined;
|
|
2961
2961
|
createdAt?: Date | undefined;
|
|
2962
2962
|
updatedAt?: Date | undefined;
|
|
2963
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2964
|
-
providerConfigId?: string | undefined;
|
|
2965
|
-
guardrailConfigId?: string | undefined;
|
|
2966
|
-
enabled?: boolean | undefined;
|
|
2967
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2968
|
-
id?: string | undefined;
|
|
2969
|
-
createdAt?: Date | undefined;
|
|
2970
|
-
updatedAt?: Date | undefined;
|
|
2971
|
-
}> | zod0.ZodSafeParseError<{
|
|
2972
|
-
providerConfigId?: string | undefined;
|
|
2973
|
-
guardrailConfigId?: string | undefined;
|
|
2974
|
-
enabled?: boolean | undefined;
|
|
2975
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2976
|
-
id?: string | undefined;
|
|
2977
|
-
createdAt?: Date | undefined;
|
|
2978
|
-
updatedAt?: Date | undefined;
|
|
2979
2963
|
}> | zod0.ZodSafeParseSuccess<{
|
|
2980
2964
|
datasetId?: string | undefined;
|
|
2981
2965
|
versionNumber?: number | undefined;
|
|
@@ -3026,6 +3010,22 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
3026
3010
|
id?: string | undefined;
|
|
3027
3011
|
createdAt?: Date | undefined;
|
|
3028
3012
|
updatedAt?: Date | undefined;
|
|
3013
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
3014
|
+
providerConfigId?: string | undefined;
|
|
3015
|
+
guardrailConfigId?: string | undefined;
|
|
3016
|
+
enabled?: boolean | undefined;
|
|
3017
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
3018
|
+
id?: string | undefined;
|
|
3019
|
+
createdAt?: Date | undefined;
|
|
3020
|
+
updatedAt?: Date | undefined;
|
|
3021
|
+
}> | zod0.ZodSafeParseError<{
|
|
3022
|
+
providerConfigId?: string | undefined;
|
|
3023
|
+
guardrailConfigId?: string | undefined;
|
|
3024
|
+
enabled?: boolean | undefined;
|
|
3025
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
3026
|
+
id?: string | undefined;
|
|
3027
|
+
createdAt?: Date | undefined;
|
|
3028
|
+
updatedAt?: Date | undefined;
|
|
3029
3029
|
}> | zod0.ZodSafeParseSuccess<{
|
|
3030
3030
|
requestId?: string | undefined;
|
|
3031
3031
|
configId?: string | null | undefined;
|
|
@@ -3255,14 +3255,6 @@ declare function parseTableData<T extends TableName>(table: T, data: unknown): {
|
|
|
3255
3255
|
id: string;
|
|
3256
3256
|
createdAt: Date;
|
|
3257
3257
|
updatedAt: Date;
|
|
3258
|
-
} | {
|
|
3259
|
-
providerConfigId: string;
|
|
3260
|
-
guardrailConfigId: string;
|
|
3261
|
-
enabled: boolean;
|
|
3262
|
-
id: string;
|
|
3263
|
-
createdAt: Date;
|
|
3264
|
-
updatedAt: Date;
|
|
3265
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
3266
3258
|
} | {
|
|
3267
3259
|
datasetId: string;
|
|
3268
3260
|
versionNumber: number;
|
|
@@ -3288,6 +3280,14 @@ declare function parseTableData<T extends TableName>(table: T, data: unknown): {
|
|
|
3288
3280
|
id: string;
|
|
3289
3281
|
createdAt: Date;
|
|
3290
3282
|
updatedAt: Date;
|
|
3283
|
+
} | {
|
|
3284
|
+
providerConfigId: string;
|
|
3285
|
+
guardrailConfigId: string;
|
|
3286
|
+
enabled: boolean;
|
|
3287
|
+
id: string;
|
|
3288
|
+
createdAt: Date;
|
|
3289
|
+
updatedAt: Date;
|
|
3290
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
3291
3291
|
} | {
|
|
3292
3292
|
requestId: string;
|
|
3293
3293
|
provider: string;
|
|
@@ -3443,14 +3443,6 @@ declare function parsePartialTableData<T extends TableName>(table: T, data: unkn
|
|
|
3443
3443
|
id?: string | undefined;
|
|
3444
3444
|
createdAt?: Date | undefined;
|
|
3445
3445
|
updatedAt?: Date | undefined;
|
|
3446
|
-
} | {
|
|
3447
|
-
providerConfigId?: string | undefined;
|
|
3448
|
-
guardrailConfigId?: string | undefined;
|
|
3449
|
-
enabled?: boolean | undefined;
|
|
3450
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
3451
|
-
id?: string | undefined;
|
|
3452
|
-
createdAt?: Date | undefined;
|
|
3453
|
-
updatedAt?: Date | undefined;
|
|
3454
3446
|
} | {
|
|
3455
3447
|
datasetId?: string | undefined;
|
|
3456
3448
|
versionNumber?: number | undefined;
|
|
@@ -3476,6 +3468,14 @@ declare function parsePartialTableData<T extends TableName>(table: T, data: unkn
|
|
|
3476
3468
|
id?: string | undefined;
|
|
3477
3469
|
createdAt?: Date | undefined;
|
|
3478
3470
|
updatedAt?: Date | undefined;
|
|
3471
|
+
} | {
|
|
3472
|
+
providerConfigId?: string | undefined;
|
|
3473
|
+
guardrailConfigId?: string | undefined;
|
|
3474
|
+
enabled?: boolean | undefined;
|
|
3475
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
3476
|
+
id?: string | undefined;
|
|
3477
|
+
createdAt?: Date | undefined;
|
|
3478
|
+
updatedAt?: Date | undefined;
|
|
3479
3479
|
} | {
|
|
3480
3480
|
requestId?: string | undefined;
|
|
3481
3481
|
configId?: string | null | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ColumnType, Dialect, Generated, Kysely, MssqlDialect, MysqlDialect, PostgresDialect, SqliteDialect } from "kysely";
|
|
2
|
+
import { NeonQueryFunction } from "@neondatabase/serverless";
|
|
2
3
|
import * as zod0 from "zod";
|
|
3
4
|
import { z } from "zod";
|
|
4
|
-
import { NeonQueryFunction } from "@neondatabase/serverless";
|
|
5
5
|
|
|
6
6
|
//#region src/db/schema.d.ts
|
|
7
7
|
declare const configsSchema: z.ZodObject<{
|
|
@@ -2588,22 +2588,6 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
2588
2588
|
id: string;
|
|
2589
2589
|
createdAt: Date;
|
|
2590
2590
|
updatedAt: Date;
|
|
2591
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2592
|
-
providerConfigId: string;
|
|
2593
|
-
guardrailConfigId: string;
|
|
2594
|
-
enabled: boolean;
|
|
2595
|
-
id: string;
|
|
2596
|
-
createdAt: Date;
|
|
2597
|
-
updatedAt: Date;
|
|
2598
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2599
|
-
}> | zod0.ZodSafeParseError<{
|
|
2600
|
-
providerConfigId: string;
|
|
2601
|
-
guardrailConfigId: string;
|
|
2602
|
-
enabled: boolean;
|
|
2603
|
-
id: string;
|
|
2604
|
-
createdAt: Date;
|
|
2605
|
-
updatedAt: Date;
|
|
2606
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2607
2591
|
}> | zod0.ZodSafeParseSuccess<{
|
|
2608
2592
|
datasetId: string;
|
|
2609
2593
|
versionNumber: number;
|
|
@@ -2654,6 +2638,22 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
2654
2638
|
id: string;
|
|
2655
2639
|
createdAt: Date;
|
|
2656
2640
|
updatedAt: Date;
|
|
2641
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
2642
|
+
providerConfigId: string;
|
|
2643
|
+
guardrailConfigId: string;
|
|
2644
|
+
enabled: boolean;
|
|
2645
|
+
id: string;
|
|
2646
|
+
createdAt: Date;
|
|
2647
|
+
updatedAt: Date;
|
|
2648
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
2649
|
+
}> | zod0.ZodSafeParseError<{
|
|
2650
|
+
providerConfigId: string;
|
|
2651
|
+
guardrailConfigId: string;
|
|
2652
|
+
enabled: boolean;
|
|
2653
|
+
id: string;
|
|
2654
|
+
createdAt: Date;
|
|
2655
|
+
updatedAt: Date;
|
|
2656
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
2657
2657
|
}> | zod0.ZodSafeParseSuccess<{
|
|
2658
2658
|
requestId: string;
|
|
2659
2659
|
provider: string;
|
|
@@ -2960,22 +2960,6 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
2960
2960
|
id?: string | undefined;
|
|
2961
2961
|
createdAt?: Date | undefined;
|
|
2962
2962
|
updatedAt?: Date | undefined;
|
|
2963
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2964
|
-
providerConfigId?: string | undefined;
|
|
2965
|
-
guardrailConfigId?: string | undefined;
|
|
2966
|
-
enabled?: boolean | undefined;
|
|
2967
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2968
|
-
id?: string | undefined;
|
|
2969
|
-
createdAt?: Date | undefined;
|
|
2970
|
-
updatedAt?: Date | undefined;
|
|
2971
|
-
}> | zod0.ZodSafeParseError<{
|
|
2972
|
-
providerConfigId?: string | undefined;
|
|
2973
|
-
guardrailConfigId?: string | undefined;
|
|
2974
|
-
enabled?: boolean | undefined;
|
|
2975
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2976
|
-
id?: string | undefined;
|
|
2977
|
-
createdAt?: Date | undefined;
|
|
2978
|
-
updatedAt?: Date | undefined;
|
|
2979
2963
|
}> | zod0.ZodSafeParseSuccess<{
|
|
2980
2964
|
datasetId?: string | undefined;
|
|
2981
2965
|
versionNumber?: number | undefined;
|
|
@@ -3026,6 +3010,22 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
3026
3010
|
id?: string | undefined;
|
|
3027
3011
|
createdAt?: Date | undefined;
|
|
3028
3012
|
updatedAt?: Date | undefined;
|
|
3013
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
3014
|
+
providerConfigId?: string | undefined;
|
|
3015
|
+
guardrailConfigId?: string | undefined;
|
|
3016
|
+
enabled?: boolean | undefined;
|
|
3017
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
3018
|
+
id?: string | undefined;
|
|
3019
|
+
createdAt?: Date | undefined;
|
|
3020
|
+
updatedAt?: Date | undefined;
|
|
3021
|
+
}> | zod0.ZodSafeParseError<{
|
|
3022
|
+
providerConfigId?: string | undefined;
|
|
3023
|
+
guardrailConfigId?: string | undefined;
|
|
3024
|
+
enabled?: boolean | undefined;
|
|
3025
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
3026
|
+
id?: string | undefined;
|
|
3027
|
+
createdAt?: Date | undefined;
|
|
3028
|
+
updatedAt?: Date | undefined;
|
|
3029
3029
|
}> | zod0.ZodSafeParseSuccess<{
|
|
3030
3030
|
requestId?: string | undefined;
|
|
3031
3031
|
configId?: string | null | undefined;
|
|
@@ -3255,14 +3255,6 @@ declare function parseTableData<T extends TableName>(table: T, data: unknown): {
|
|
|
3255
3255
|
id: string;
|
|
3256
3256
|
createdAt: Date;
|
|
3257
3257
|
updatedAt: Date;
|
|
3258
|
-
} | {
|
|
3259
|
-
providerConfigId: string;
|
|
3260
|
-
guardrailConfigId: string;
|
|
3261
|
-
enabled: boolean;
|
|
3262
|
-
id: string;
|
|
3263
|
-
createdAt: Date;
|
|
3264
|
-
updatedAt: Date;
|
|
3265
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
3266
3258
|
} | {
|
|
3267
3259
|
datasetId: string;
|
|
3268
3260
|
versionNumber: number;
|
|
@@ -3288,6 +3280,14 @@ declare function parseTableData<T extends TableName>(table: T, data: unknown): {
|
|
|
3288
3280
|
id: string;
|
|
3289
3281
|
createdAt: Date;
|
|
3290
3282
|
updatedAt: Date;
|
|
3283
|
+
} | {
|
|
3284
|
+
providerConfigId: string;
|
|
3285
|
+
guardrailConfigId: string;
|
|
3286
|
+
enabled: boolean;
|
|
3287
|
+
id: string;
|
|
3288
|
+
createdAt: Date;
|
|
3289
|
+
updatedAt: Date;
|
|
3290
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
3291
3291
|
} | {
|
|
3292
3292
|
requestId: string;
|
|
3293
3293
|
provider: string;
|
|
@@ -3443,14 +3443,6 @@ declare function parsePartialTableData<T extends TableName>(table: T, data: unkn
|
|
|
3443
3443
|
id?: string | undefined;
|
|
3444
3444
|
createdAt?: Date | undefined;
|
|
3445
3445
|
updatedAt?: Date | undefined;
|
|
3446
|
-
} | {
|
|
3447
|
-
providerConfigId?: string | undefined;
|
|
3448
|
-
guardrailConfigId?: string | undefined;
|
|
3449
|
-
enabled?: boolean | undefined;
|
|
3450
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
3451
|
-
id?: string | undefined;
|
|
3452
|
-
createdAt?: Date | undefined;
|
|
3453
|
-
updatedAt?: Date | undefined;
|
|
3454
3446
|
} | {
|
|
3455
3447
|
datasetId?: string | undefined;
|
|
3456
3448
|
versionNumber?: number | undefined;
|
|
@@ -3476,6 +3468,14 @@ declare function parsePartialTableData<T extends TableName>(table: T, data: unkn
|
|
|
3476
3468
|
id?: string | undefined;
|
|
3477
3469
|
createdAt?: Date | undefined;
|
|
3478
3470
|
updatedAt?: Date | undefined;
|
|
3471
|
+
} | {
|
|
3472
|
+
providerConfigId?: string | undefined;
|
|
3473
|
+
guardrailConfigId?: string | undefined;
|
|
3474
|
+
enabled?: boolean | undefined;
|
|
3475
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
3476
|
+
id?: string | undefined;
|
|
3477
|
+
createdAt?: Date | undefined;
|
|
3478
|
+
updatedAt?: Date | undefined;
|
|
3479
3479
|
} | {
|
|
3480
3480
|
requestId?: string | undefined;
|
|
3481
3481
|
configId?: string | null | undefined;
|
package/dist/index.cjs
CHANGED
|
@@ -2070,7 +2070,8 @@ const costSummarySchema = require_db.zod_default.object({
|
|
|
2070
2070
|
variantId: require_db.zod_default.string().uuid().optional(),
|
|
2071
2071
|
environmentId: require_db.zod_default.string().uuid().optional(),
|
|
2072
2072
|
tags: require_db.zod_default.record(require_db.zod_default.string(), require_db.zod_default.array(require_db.zod_default.string())).optional(),
|
|
2073
|
-
groupBy: require_db.zod_default.enum(COST_SUMMARY_GROUP_BY).optional()
|
|
2073
|
+
groupBy: require_db.zod_default.enum(COST_SUMMARY_GROUP_BY).optional(),
|
|
2074
|
+
tagKeys: require_db.zod_default.array(require_db.zod_default.string()).optional()
|
|
2074
2075
|
});
|
|
2075
2076
|
/**
|
|
2076
2077
|
* Helper to create column reference for SQL
|
|
@@ -2286,7 +2287,7 @@ const createLLMRequestsDataLayer = (db) => {
|
|
|
2286
2287
|
getCostSummary: async (params) => {
|
|
2287
2288
|
const result = await costSummarySchema.safeParseAsync(params);
|
|
2288
2289
|
if (!result.success) throw new LLMOpsError(`Invalid parameters: ${result.error.message}`);
|
|
2289
|
-
const { startDate, endDate, groupBy, configId, variantId, environmentId, tags } = result.data;
|
|
2290
|
+
const { startDate, endDate, groupBy, configId, variantId, environmentId, tags, tagKeys } = result.data;
|
|
2290
2291
|
let baseQuery = db.selectFrom("llm_requests").where(kysely.sql`${col$1("createdAt")} >= ${startDate.toISOString()}`).where(kysely.sql`${col$1("createdAt")} <= ${endDate.toISOString()}`);
|
|
2291
2292
|
if (configId) baseQuery = baseQuery.where("configId", "=", configId);
|
|
2292
2293
|
if (variantId) baseQuery = baseQuery.where("variantId", "=", variantId);
|
|
@@ -2345,6 +2346,10 @@ const createLLMRequestsDataLayer = (db) => {
|
|
|
2345
2346
|
conditions.push(kysely.sql`${col$1("tags")}->>${key} IN (${valueList})`);
|
|
2346
2347
|
}
|
|
2347
2348
|
}
|
|
2349
|
+
if (tagKeys && tagKeys.length > 0) {
|
|
2350
|
+
const tagKeyList = kysely.sql.join(tagKeys.map((k) => kysely.sql`${k}`), kysely.sql`, `);
|
|
2351
|
+
conditions.push(kysely.sql`t.key IN (${tagKeyList})`);
|
|
2352
|
+
}
|
|
2348
2353
|
const whereClause = kysely.sql.join(conditions, kysely.sql` AND `);
|
|
2349
2354
|
return (await kysely.sql`
|
|
2350
2355
|
SELECT t.key || ':' || t.value as "groupKey",
|