@llmops/core 0.1.0 → 0.1.1-beta.1
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/{bun-sqlite-dialect-BY9UbL3J.cjs → bun-sqlite-dialect-Dzur5J1r.cjs} +1 -1
- package/dist/db/index.cjs +1 -1
- package/dist/db/index.d.cts +2 -2
- package/dist/db/index.d.mts +2 -2
- package/dist/db/index.mjs +1 -1
- package/dist/{db-DCfAacY7.mjs → db-DN6gkyRp.mjs} +42 -7
- package/dist/{db-16I7_mus.cjs → db-gMDwCuHR.cjs} +43 -8
- package/dist/{index-9HhrwwZi.d.cts → index-CG30o-6r.d.cts} +51 -27
- package/dist/{index-BKx9C2tK.d.mts → index-Ddhbb3O5.d.mts} +28 -4
- package/dist/index.cjs +3 -2
- package/dist/index.d.cts +195 -182
- package/dist/index.d.mts +18 -5
- package/dist/index.mjs +3 -2
- package/dist/{node-sqlite-dialect-CuJrXyHn.cjs → node-sqlite-dialect-BTbo14Y2.cjs} +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as TargetingRulesTable, B as schemas, C as EnvironmentSecretsTable, D as Selectable, E as SCHEMA_METADATA, F as VariantsTable, H as variantVersionsSchema, I as configVariantsSchema, L as configsSchema, M as Variant, N as VariantVersion, O as TableName, P as VariantVersionsTable, R as environmentSecretsSchema, S as EnvironmentSecret, T as Insertable, U as variantsSchema, V as targetingRulesSchema, _ as ConfigVariant, a as createDatabaseFromConnection, b as Database, c as MigrationResult, d as runAutoMigrations, f as parsePartialTableData, g as Config, h as validateTableData, i as createDatabase, j as Updateable, k as TargetingRule, l as getMigrations, m as validatePartialTableData, n as DatabaseOptions, o as detectDatabaseType, p as parseTableData, r as DatabaseType, s as MigrationOptions, t as DatabaseConnection, u as matchType, v as ConfigVariantsTable, w as EnvironmentsTable, x as Environment, y as ConfigsTable, z as environmentsSchema } from "./index-Ddhbb3O5.mjs";
|
|
2
2
|
import gateway from "@llmops/gateway";
|
|
3
3
|
import { Kysely } from "kysely";
|
|
4
4
|
import pino from "pino";
|
|
@@ -827,16 +827,26 @@ declare const llmopsConfigSchema: z.ZodObject<{
|
|
|
827
827
|
}, z.core.$loose>>;
|
|
828
828
|
}, z.core.$strip>;
|
|
829
829
|
autoMigrate: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"development">]>>>;
|
|
830
|
+
schema: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
830
831
|
}, z.core.$strip>;
|
|
831
832
|
/**
|
|
832
833
|
* Validated LLMOps configuration with typed providers
|
|
833
834
|
* Uses ProvidersConfig for proper provider-specific typing
|
|
834
835
|
*
|
|
835
|
-
* Note: autoMigrate
|
|
836
|
+
* Note: autoMigrate and schema are optional in input but always present after validation
|
|
836
837
|
*/
|
|
837
|
-
type ValidatedLLMOpsConfig = Omit<z.infer<typeof llmopsConfigSchema>, 'providers' | 'autoMigrate'> & {
|
|
838
|
+
type ValidatedLLMOpsConfig = Omit<z.infer<typeof llmopsConfigSchema>, 'providers' | 'autoMigrate' | 'schema'> & {
|
|
838
839
|
providers: ProvidersConfig;
|
|
839
840
|
autoMigrate?: AutoMigrateConfig;
|
|
841
|
+
schema: string;
|
|
842
|
+
};
|
|
843
|
+
/**
|
|
844
|
+
* Input type for LLMOps configuration (before validation)
|
|
845
|
+
* Users can omit optional fields like autoMigrate and schema
|
|
846
|
+
*/
|
|
847
|
+
type LLMOpsConfigInput = Omit<ValidatedLLMOpsConfig, 'autoMigrate' | 'schema'> & {
|
|
848
|
+
autoMigrate?: AutoMigrateConfig;
|
|
849
|
+
schema?: string;
|
|
840
850
|
};
|
|
841
851
|
declare function validateLLMOpsConfig(config: unknown): ValidatedLLMOpsConfig;
|
|
842
852
|
//#endregion
|
|
@@ -847,7 +857,10 @@ declare function validateLLMOpsConfig(config: unknown): ValidatedLLMOpsConfig;
|
|
|
847
857
|
type Prettify<T> = Omit<T, never>;
|
|
848
858
|
//#endregion
|
|
849
859
|
//#region src/types/index.d.ts
|
|
850
|
-
|
|
860
|
+
/**
|
|
861
|
+
* LLMOpsConfig is the user-facing config type (allows optional fields)
|
|
862
|
+
*/
|
|
863
|
+
type LLMOpsConfig = LLMOpsConfigInput;
|
|
851
864
|
type LLMOpsClient = {
|
|
852
865
|
handler: (request: Request) => Promise<Response>;
|
|
853
866
|
config: LLMOpsConfig;
|
|
@@ -2072,4 +2085,4 @@ declare const createDataLayer: (db: Kysely<Database>) => Promise<{
|
|
|
2072
2085
|
}[]>;
|
|
2073
2086
|
}>;
|
|
2074
2087
|
//#endregion
|
|
2075
|
-
export { type AnthropicProviderConfig, type AnyProviderConfig, AutoMigrateConfig, type AzureAIProviderConfig, type AzureOpenAIProviderConfig, type BaseProviderConfig, type BedrockProviderConfig, ChatCompletionCreateParamsBase, Config, ConfigVariant, type ConfigVariantsTable, type ConfigsTable, type CortexProviderConfig, type Database, DatabaseConnection, DatabaseType, Environment, EnvironmentSecret, type EnvironmentSecretsTable, type EnvironmentsTable, type FireworksAIProviderConfig, type GoogleProviderConfig, type HuggingFaceProviderConfig, Insertable, LLMOpsClient, LLMOpsConfig, MigrationResult, type MistralAIProviderConfig, type OpenAIProviderConfig, type OracleProviderConfig, Prettify, type ProviderConfigMap, type ProvidersConfig, SCHEMA_METADATA, type SagemakerProviderConfig, Selectable, type StabilityAIProviderConfig, SupportedProviders, type TableName, TargetingRule, type TargetingRulesTable, Updateable, type ValidatedLLMOpsConfig, Variant, VariantJsonData, VariantVersion, VariantVersionsTable, type VariantsTable, type VertexAIProviderConfig, type WorkersAIProviderConfig, chatCompletionCreateParamsBaseSchema, configVariantsSchema, configsSchema, createDataLayer, createDatabase, createDatabaseFromConnection, detectDatabaseType, environmentSecretsSchema, environmentsSchema, gateway, generateId, getMigrations, llmopsConfigSchema, logger, matchType, parsePartialTableData, parseTableData, runAutoMigrations, schemas, targetingRulesSchema, validateLLMOpsConfig, validatePartialTableData, validateTableData, variantJsonDataSchema, variantVersionsSchema, variantsSchema };
|
|
2088
|
+
export { type AnthropicProviderConfig, type AnyProviderConfig, AutoMigrateConfig, type AzureAIProviderConfig, type AzureOpenAIProviderConfig, type BaseProviderConfig, type BedrockProviderConfig, ChatCompletionCreateParamsBase, Config, ConfigVariant, type ConfigVariantsTable, type ConfigsTable, type CortexProviderConfig, type Database, DatabaseConnection, DatabaseOptions, DatabaseType, Environment, EnvironmentSecret, type EnvironmentSecretsTable, type EnvironmentsTable, type FireworksAIProviderConfig, type GoogleProviderConfig, type HuggingFaceProviderConfig, Insertable, LLMOpsClient, LLMOpsConfig, type LLMOpsConfigInput, MigrationOptions, MigrationResult, type MistralAIProviderConfig, type OpenAIProviderConfig, type OracleProviderConfig, Prettify, type ProviderConfigMap, type ProvidersConfig, SCHEMA_METADATA, type SagemakerProviderConfig, Selectable, type StabilityAIProviderConfig, SupportedProviders, type TableName, TargetingRule, type TargetingRulesTable, Updateable, type ValidatedLLMOpsConfig, Variant, VariantJsonData, VariantVersion, VariantVersionsTable, type VariantsTable, type VertexAIProviderConfig, type WorkersAIProviderConfig, chatCompletionCreateParamsBaseSchema, configVariantsSchema, configsSchema, createDataLayer, createDatabase, createDatabaseFromConnection, detectDatabaseType, environmentSecretsSchema, environmentsSchema, gateway, generateId, getMigrations, llmopsConfigSchema, logger, matchType, parsePartialTableData, parseTableData, runAutoMigrations, schemas, targetingRulesSchema, validateLLMOpsConfig, validatePartialTableData, validateTableData, variantJsonDataSchema, variantVersionsSchema, variantsSchema };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as string, C as any, D as number, E as literal, M as unknown, O as object, S as _enum, T as boolean, _ as schemas, a as matchType, b as variantsSchema, c as parsePartialTableData, d as validateTableData, f as SCHEMA_METADATA, g as environmentsSchema, h as environmentSecretsSchema, i as getMigrations, j as union, k as record, l as parseTableData, m as configsSchema, n as createDatabaseFromConnection, o as runAutoMigrations, p as configVariantsSchema, r as detectDatabaseType, s as logger, t as createDatabase, u as validatePartialTableData, v as targetingRulesSchema, w as array, x as zod_default, y as variantVersionsSchema } from "./db-
|
|
1
|
+
import { A as string, C as any, D as number, E as literal, M as unknown, O as object, S as _enum, T as boolean, _ as schemas, a as matchType, b as variantsSchema, c as parsePartialTableData, d as validateTableData, f as SCHEMA_METADATA, g as environmentsSchema, h as environmentSecretsSchema, i as getMigrations, j as union, k as record, l as parseTableData, m as configsSchema, n as createDatabaseFromConnection, o as runAutoMigrations, p as configVariantsSchema, r as detectDatabaseType, s as logger, t as createDatabase, u as validatePartialTableData, v as targetingRulesSchema, w as array, x as zod_default, y as variantVersionsSchema } from "./db-DN6gkyRp.mjs";
|
|
2
2
|
import gateway from "@llmops/gateway";
|
|
3
3
|
import { createRandomStringGenerator } from "@better-auth/utils/random";
|
|
4
4
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
@@ -448,7 +448,8 @@ const llmopsConfigSchema = object({
|
|
|
448
448
|
auth: authSchema,
|
|
449
449
|
basePath: string().min(1, "Base path is required and cannot be empty").refine((path) => path.startsWith("/"), "Base path must start with a forward slash"),
|
|
450
450
|
providers: providersSchema,
|
|
451
|
-
autoMigrate: union([boolean(), literal("development")]).optional().default(false)
|
|
451
|
+
autoMigrate: union([boolean(), literal("development")]).optional().default(false),
|
|
452
|
+
schema: string().optional().default("llmops")
|
|
452
453
|
});
|
|
453
454
|
function validateLLMOpsConfig(config) {
|
|
454
455
|
const result = llmopsConfigSchema.safeParse(config);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llmops/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1-beta.1",
|
|
4
4
|
"description": "Core LLMOps functionality and utilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"hono": "^4.10.7",
|
|
52
52
|
"kysely": "^0.28.8",
|
|
53
53
|
"pino": "^10.1.0",
|
|
54
|
-
"@llmops/gateway": "^0.1.
|
|
54
|
+
"@llmops/gateway": "^0.1.1-beta.1"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "tsdown",
|