Skip to content

Commit

Permalink
Fix generating vectors with 0 as single value
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosdelest committed May 14, 2024
1 parent 32498fc commit cb770ca
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ protected ServiceSettings getServiceSettingsFromMap(Map<String, Object> serviceS
private static double[] generateEmbedding(String input, int dimensions, SimilarityMeasure similarityMeasure) {
double[] embedding = new double[dimensions];
for (int j = 0; j < dimensions; j++) {
embedding[j] = input.hashCode() + (double) j;
embedding[j] = input.hashCode() + 1 + j;
}

return embedding;
Expand Down

0 comments on commit cb770ca

Please sign in to comment.