128, 256, 512, 768, 1024, 1536, 2048, 3072, 4096,
] as const;
export function validateVectorDimension(
dimension: number
): asserts dimension is VectorDimension {
if (!VectorDimensions.includes(dimension as VectorDimension)) {
throw new Error(
`Unsupported vector dimension${dimension}. Supported: ${VectorDimensions.join(", ")}`
);
}
}
If I use google's multimodalEmbedding001, which outputs 1408 dimensions, won't it break with existing code above?