Skip to content

Commit

Permalink
bug fix for similarity function
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkWolters committed May 10, 2024
1 parent 101e9d9 commit 031fd5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -51,7 +51,7 @@ private LongFunction<DataApiCreateCollectionOp> createOpFunction(ParsedOp op) {
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 =
Expand Down
Expand Up @@ -8,4 +8,4 @@ blocks:
op1:
create_collection: "collectionName"
dimensions: 10
similarity: "cosine"
similarity: "COSINE"

0 comments on commit 031fd5f

Please sign in to comment.