bug fix for similarity function

This commit is contained in:
Mark Wolters 2024-05-10 18:48:44 -04:00
parent 101e9d93fa
commit 031fd5fc59
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ public class DataApiCreateCollectionOpDispenser extends DataApiOpDispenser {
Optional<LongFunction<String>> simFunc = op.getAsOptionalFunction("similarity", String.class);
if (simFunc.isPresent()) {
LongFunction<String> sf = simFunc.get();
optionsBldr.vectorSimilarity(SimilarityMetric.valueOf(sf.apply(l)));
optionsBldr.vectorSimilarity(SimilarityMetric.fromValue(sf.apply(l)));
}
DataApiCreateCollectionOp dataApiCreateCollectionOp =

View File

@ -8,4 +8,4 @@ blocks:
op1:
create_collection: "collectionName"
dimensions: 10
similarity: "cosine"
similarity: "COSINE"