@llmops/core 0.5.0-beta.1 → 0.5.0-beta.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.
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +5 -3
- package/dist/index.d.mts +5 -3
- package/dist/index.mjs +2 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -452,11 +452,11 @@ const inlineProviderConfigSchema = require_db.object({
|
|
|
452
452
|
*/
|
|
453
453
|
const providersConfigSchema = require_db.array(inlineProviderConfigSchema).optional();
|
|
454
454
|
const llmopsConfigSchema = require_db.object({
|
|
455
|
-
database: require_db.any(),
|
|
455
|
+
database: require_db.any().optional(),
|
|
456
456
|
basePath: require_db.string().min(1, "Base path is required and cannot be empty").refine((path) => path.startsWith("/"), "Base path must start with a forward slash"),
|
|
457
457
|
schema: require_db.string().optional().default("llmops"),
|
|
458
458
|
providers: providersConfigSchema
|
|
459
|
-
});
|
|
459
|
+
}).refine((config) => config.database !== void 0 || config.providers && config.providers.length > 0, "Either database or providers must be configured");
|
|
460
460
|
function validateLLMOpsConfig(config) {
|
|
461
461
|
const result = llmopsConfigSchema.safeParse(config);
|
|
462
462
|
if (!result.success) {
|
package/dist/index.d.cts
CHANGED
|
@@ -420,7 +420,7 @@ type InlineProvidersConfig = InlineProviderConfig[];
|
|
|
420
420
|
//#endregion
|
|
421
421
|
//#region src/schemas/config.d.ts
|
|
422
422
|
declare const llmopsConfigSchema: z.ZodObject<{
|
|
423
|
-
database: z.ZodAny
|
|
423
|
+
database: z.ZodOptional<z.ZodAny>;
|
|
424
424
|
basePath: z.ZodString;
|
|
425
425
|
schema: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
426
426
|
providers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -436,9 +436,10 @@ declare const llmopsConfigSchema: z.ZodObject<{
|
|
|
436
436
|
* Validated LLMOps configuration
|
|
437
437
|
*
|
|
438
438
|
* Note: schema is optional in input but always present after validation
|
|
439
|
+
* Either database or providers must be present (enforced by schema)
|
|
439
440
|
*/
|
|
440
441
|
type ValidatedLLMOpsConfig = {
|
|
441
|
-
database
|
|
442
|
+
database?: unknown;
|
|
442
443
|
basePath: string;
|
|
443
444
|
schema: string;
|
|
444
445
|
providers?: InlineProvidersConfig;
|
|
@@ -446,9 +447,10 @@ type ValidatedLLMOpsConfig = {
|
|
|
446
447
|
/**
|
|
447
448
|
* Input type for LLMOps configuration (before validation)
|
|
448
449
|
* Users can omit optional fields like schema and providers
|
|
450
|
+
* Either database or providers must be provided
|
|
449
451
|
*/
|
|
450
452
|
type LLMOpsConfigInput = {
|
|
451
|
-
database
|
|
453
|
+
database?: unknown;
|
|
452
454
|
basePath: string;
|
|
453
455
|
schema?: string;
|
|
454
456
|
providers?: InlineProvidersConfig;
|
package/dist/index.d.mts
CHANGED
|
@@ -420,7 +420,7 @@ type InlineProvidersConfig = InlineProviderConfig[];
|
|
|
420
420
|
//#endregion
|
|
421
421
|
//#region src/schemas/config.d.ts
|
|
422
422
|
declare const llmopsConfigSchema: z.ZodObject<{
|
|
423
|
-
database: z.ZodAny
|
|
423
|
+
database: z.ZodOptional<z.ZodAny>;
|
|
424
424
|
basePath: z.ZodString;
|
|
425
425
|
schema: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
426
426
|
providers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -436,9 +436,10 @@ declare const llmopsConfigSchema: z.ZodObject<{
|
|
|
436
436
|
* Validated LLMOps configuration
|
|
437
437
|
*
|
|
438
438
|
* Note: schema is optional in input but always present after validation
|
|
439
|
+
* Either database or providers must be present (enforced by schema)
|
|
439
440
|
*/
|
|
440
441
|
type ValidatedLLMOpsConfig = {
|
|
441
|
-
database
|
|
442
|
+
database?: unknown;
|
|
442
443
|
basePath: string;
|
|
443
444
|
schema: string;
|
|
444
445
|
providers?: InlineProvidersConfig;
|
|
@@ -446,9 +447,10 @@ type ValidatedLLMOpsConfig = {
|
|
|
446
447
|
/**
|
|
447
448
|
* Input type for LLMOps configuration (before validation)
|
|
448
449
|
* Users can omit optional fields like schema and providers
|
|
450
|
+
* Either database or providers must be provided
|
|
449
451
|
*/
|
|
450
452
|
type LLMOpsConfigInput = {
|
|
451
|
-
database
|
|
453
|
+
database?: unknown;
|
|
452
454
|
basePath: string;
|
|
453
455
|
schema?: string;
|
|
454
456
|
providers?: InlineProvidersConfig;
|
package/dist/index.mjs
CHANGED
|
@@ -448,11 +448,11 @@ const inlineProviderConfigSchema = object({
|
|
|
448
448
|
*/
|
|
449
449
|
const providersConfigSchema = array(inlineProviderConfigSchema).optional();
|
|
450
450
|
const llmopsConfigSchema = object({
|
|
451
|
-
database: any(),
|
|
451
|
+
database: any().optional(),
|
|
452
452
|
basePath: string().min(1, "Base path is required and cannot be empty").refine((path$1) => path$1.startsWith("/"), "Base path must start with a forward slash"),
|
|
453
453
|
schema: string().optional().default("llmops"),
|
|
454
454
|
providers: providersConfigSchema
|
|
455
|
-
});
|
|
455
|
+
}).refine((config) => config.database !== void 0 || config.providers && config.providers.length > 0, "Either database or providers must be configured");
|
|
456
456
|
function validateLLMOpsConfig(config) {
|
|
457
457
|
const result = llmopsConfigSchema.safeParse(config);
|
|
458
458
|
if (!result.success) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llmops/core",
|
|
3
|
-
"version": "0.5.0-beta.
|
|
3
|
+
"version": "0.5.0-beta.2",
|
|
4
4
|
"description": "Core LLMOps functionality and utilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"kysely": "^0.28.8",
|
|
56
56
|
"kysely-neon": "^2.0.2",
|
|
57
57
|
"pino": "^10.1.0",
|
|
58
|
-
"@llmops/gateway": "^0.5.0-beta.
|
|
58
|
+
"@llmops/gateway": "^0.5.0-beta.2"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/json-logic-js": "^2.0.8",
|