Sean AguinagaS
Convex Community8mo ago
10 replies
Sean Aguinaga

@convex-dev/agent Vector Embedding Size Limitations

export const VectorDimensions = [
  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?
Was this page helpful?