diff --git a/packages/config-yaml/src/index.ts b/packages/config-yaml/src/index.ts index 3d68743db..2e39af496 100644 --- a/packages/config-yaml/src/index.ts +++ b/packages/config-yaml/src/index.ts @@ -9,5 +9,5 @@ export * from "./load/proxySecretResolution.js"; export * from "./load/unroll.js"; export * from "./schemas/data/index.js"; export * from "./schemas/index.js"; -export type { ModelConfig, ModelRole } from "./schemas/models.js"; +export type { EmbedOptions, ModelConfig, ModelRole } from "./schemas/models.js"; export * from "./validation.js"; diff --git a/packages/config-yaml/src/schemas/models.ts b/packages/config-yaml/src/schemas/models.ts index 05df2c1ad..19cf65e51 100644 --- a/packages/config-yaml/src/schemas/models.ts +++ b/packages/config-yaml/src/schemas/models.ts @@ -42,6 +42,12 @@ export const completionOptionsSchema = z.object({ }); export type CompletionOptions = z.infer; +export const embedOptionsSchema = z.object({ + maxChunkSize: z.number().optional(), + maxBatchSize: z.number().optional(), +}); +export type EmbedOptions = z.infer; + /** Prompt templates use Handlebars syntax */ const promptTemplatesSchema = z.object({ apply: z.string().optional(), @@ -57,7 +63,9 @@ const baseModelFields = { roles: modelRolesSchema.array().optional(), defaultCompletionOptions: completionOptionsSchema.optional(), requestOptions: requestOptionsSchema.optional(), + embedOptions: embedOptionsSchema.optional(), promptTemplates: promptTemplatesSchema.optional(), + env: z.record(z.string(), z.string()).optional(), }; export const modelSchema = z.union([