Cleanup: removed redundant methods

This commit is contained in:
deep-learning-dynamo 2023-09-26 15:51:58 +02:00
parent 7801eca701
commit b242e614ec
3 changed files with 0 additions and 25 deletions

View File

@ -159,11 +159,6 @@ public class ChromaEmbeddingStore implements EmbeddingStore<TextSegment> {
chromaClient.addEmbeddings(collectionId, addEmbeddingsRequest);
}
@Override
public List<EmbeddingMatch<TextSegment>> findRelevant(Embedding referenceEmbedding, int maxResults) {
return findRelevant(referenceEmbedding, maxResults, 0);
}
@Override
public List<EmbeddingMatch<TextSegment>> findRelevant(Embedding referenceEmbedding, int maxResults, double minScore) {
QueryRequest queryRequest = new QueryRequest(referenceEmbedding.vectorAsList(), maxResults);

View File

@ -44,7 +44,6 @@ public class VespaEmbeddingStore implements EmbeddingStore<TextSegment> {
private static final String FIELD_NAME_VECTOR = "vector";
private static final String FIELD_NAME_DOCUMENT_ID = "documentid";
private static final String DEFAULT_RANK_PROFILE = "cosine_similarity";
private static final double DEFAULT_MIN_SCORE = 0.0;
private static final int DEFAULT_TARGET_HITS = 10;
private final String url;
@ -171,15 +170,6 @@ public class VespaEmbeddingStore implements EmbeddingStore<TextSegment> {
return ids;
}
/**
* {@inheritDoc}
* The score inside {@link EmbeddingMatch} is Vespa relevance according to provided rank profile.
*/
@Override
public List<EmbeddingMatch<TextSegment>> findRelevant(Embedding referenceEmbedding, int maxResults) {
return findRelevant(referenceEmbedding, maxResults, DEFAULT_MIN_SCORE);
}
/**
* {@inheritDoc}
* The score inside {@link EmbeddingMatch} is Vespa relevance according to provided rank profile.

View File

@ -32,7 +32,6 @@ import lombok.Builder;
public class WeaviateEmbeddingStore implements EmbeddingStore<TextSegment> {
private static final String DEFAULT_CLASS = "Default";
private static final Double DEFAULT_MIN_CERTAINTY = 0.0;
private static final boolean DEFAULT_AVOID_DUPS = true;
private static final String DEFAULT_CONSISTENCY_LEVEL = ConsistencyLevel.QUORUM;
private static final String METADATA_TEXT_SEGMENT = "text";
@ -110,15 +109,6 @@ public class WeaviateEmbeddingStore implements EmbeddingStore<TextSegment> {
return addAll(null, embeddings, embedded);
}
/**
* {@inheritDoc}
* The score inside {@link EmbeddingMatch} is Weaviate's certainty.
*/
@Override
public List<EmbeddingMatch<TextSegment>> findRelevant(Embedding referenceEmbedding, int maxResults) {
return findRelevant(referenceEmbedding, maxResults, DEFAULT_MIN_CERTAINTY);
}
/**
* {@inheritDoc}
* The score inside {@link EmbeddingMatch} is Weaviate's certainty.