Skip to content

Commit

Permalink
refactor: Update AstraDbEmbeddingStoreIT.java (langchain4j#863)
Browse files Browse the repository at this point in the history
<!-- Thank you so much for your contribution! -->

## Context
<!-- Please provide some context so that it is clear why this change is
required. -->

## Change
refereceEmbedding -> referenceEmbedding

## Checklist
Before submitting this PR, please check the following points:
- [ ] I have added unit and integration tests for my change
- [ ] All unit and integration tests in the module I have added/changed
are green
- [ ] All unit and integration tests in the
[core](https://github.com/langchain4j/langchain4j/tree/main/langchain4j-core)
and
[main](https://github.com/langchain4j/langchain4j/tree/main/langchain4j)
modules are green
- [ ] I have added/updated the
[documentation](https://github.com/langchain4j/langchain4j/tree/main/docs/docs)
- [ ] I have added an example in the [examples
repo](https://github.com/langchain4j/langchain4j-examples) (only for
"big" features)
- [ ] I have added my new module in the
[BOM](https://github.com/langchain4j/langchain4j/blob/main/langchain4j-bom/pom.xml)
(only when a new module is added)
  • Loading branch information
eltociear committed Apr 3, 2024
1 parent 0577991 commit b6f3df8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ void testAddEmbeddingAndFindRelevant() {
String id = embeddingStore.add(embedding, textSegment);
assertThat(id != null && !id.isEmpty()).isTrue();

Embedding refereceEmbedding = Embedding.from(new float[]{8.7F, 4.5F, 3.4F, 1.2F, 5.5F, 5.6F, 6.4F, 5.5F, 8.1F, 9.1F, 1.1F});
List<EmbeddingMatch<TextSegment>> embeddingMatches = embeddingStore.findRelevant(refereceEmbedding, 1);
Embedding referenceEmbedding = Embedding.from(new float[]{8.7F, 4.5F, 3.4F, 1.2F, 5.5F, 5.6F, 6.4F, 5.5F, 8.1F, 9.1F, 1.1F});
List<EmbeddingMatch<TextSegment>> embeddingMatches = embeddingStore.findRelevant(referenceEmbedding, 1);
assertThat(embeddingMatches).hasSize(1);

EmbeddingMatch<TextSegment> embeddingMatch = embeddingMatches.get(0);
Expand Down

0 comments on commit b6f3df8

Please sign in to comment.