diff --git a/internal/entity/embedding.go b/internal/entity/embedding.go index 4239b11b7..38806412b 100644 --- a/internal/entity/embedding.go +++ b/internal/entity/embedding.go @@ -22,6 +22,10 @@ func EmbeddingsMidpoint(m Embeddings) (result Embedding, radius float64, count i continue } + if len(m[i]) != len(m[i-1]) { + continue + } + for j, val := range result { result[j] = (val + emb[j]) / 2 }