UNPKG

@ai-sdk/mistral

Version:
30 lines (24 loc) • 788 B
import { z } from 'zod/v4'; import type { MistralModelIds } from './mistral-model-catalog'; export type MistralEmbeddingModelId = | MistralModelIds['embedding'] | (string & {}); export const mistralEmbeddingModelOptions = z.object({ /** * Additional metadata to attach to the embedding request. */ metadata: z.record(z.string(), z.any()).optional(), /** * The dimension of the output embeddings when supported by the model. */ outputDimension: z.number().int().positive().optional(), /** * The data type of the output embeddings when supported by the model. */ outputDtype: z .enum(['float', 'int8', 'uint8', 'binary', 'ubinary']) .optional(), }); export type MistralEmbeddingModelOptions = z.infer< typeof mistralEmbeddingModelOptions >;