File tree Expand file tree Collapse file tree 6 files changed +13
-21
lines changed
src/test/java/dev/langchain4j/store/embedding/astradb Expand file tree Collapse file tree 6 files changed +13
-21
lines changed Original file line number Diff line number Diff line change 8
8
<parent >
9
9
<groupId >com.datastax.astra</groupId >
10
10
<artifactId >astra-db-java-parent</artifactId >
11
- <version >1.4.6-SNAPSHOT </version >
11
+ <version >1.4.6</version >
12
12
</parent >
13
13
14
14
<properties >
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
- <project xmlns =" http://maven.apache.org/POM/4.0.0"
3
- xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
- xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
2
+ <project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
5
3
6
4
<modelVersion >4.0.0</modelVersion >
7
5
<artifactId >astra-db-java-examples</artifactId >
10
8
<parent >
11
9
<groupId >com.datastax.astra</groupId >
12
10
<artifactId >astra-db-java-parent</artifactId >
13
- <version >1.4.6-SNAPSHOT </version >
11
+ <version >1.4.6</version >
14
12
</parent >
15
13
16
14
<dependencies >
Original file line number Diff line number Diff line change 8
8
<parent >
9
9
<groupId >com.datastax.astra</groupId >
10
10
<artifactId >astra-db-java-parent</artifactId >
11
- <version >1.4.6-SNAPSHOT </version >
11
+ <version >1.4.6</version >
12
12
</parent >
13
13
14
14
<properties >
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ void testAddEmbeddingAndFindRelevant() {
138
138
* OVERRIDING FROM DEFAULT TEST AS THE UUID are ENCODED AS {"$uuid":"value"} in ASTRA
139
139
*/
140
140
@ Test
141
- void should_add_embedding_with_segment_with_metadata () {
141
+ void should_add_embedding_with_segment_with_metadata () throws InterruptedException {
142
142
143
143
Metadata metadata = createMetadata ();
144
144
@@ -148,15 +148,11 @@ void should_add_embedding_with_segment_with_metadata() {
148
148
String id = embeddingStore ().add (embedding , segment );
149
149
assertThat (id ).isNotBlank ();
150
150
151
- {
152
- // Not returned.
153
- TextSegment altSegment = TextSegment .from ("hello?" );
154
- Embedding altEmbedding = embeddingModel ().embed (altSegment .text ()).content ();
155
- embeddingStore ().add (altEmbedding , altSegment );
156
- }
157
-
158
- awaitUntilPersisted ();
151
+ TextSegment altSegment = TextSegment .from ("hello?" );
152
+ Embedding altEmbedding = embeddingModel ().embed (altSegment .text ()).content ();
153
+ embeddingStore ().add (altEmbedding , altSegment );
159
154
155
+ Thread .sleep (1000 );
160
156
List <EmbeddingMatch <TextSegment >> relevant = embeddingStore ().findRelevant (embedding , 1 );
161
157
assertThat (relevant ).hasSize (1 );
162
158
Original file line number Diff line number Diff line change 4
4
<groupId >com.datastax.astra</groupId >
5
5
<artifactId >astra-db-java-parent</artifactId >
6
6
<name >Data API Client</name >
7
- <version >1.4.6-SNAPSHOT </version >
7
+ <version >1.4.6</version >
8
8
<packaging >pom</packaging >
9
9
<url >https://github.com/datastax/astra-db-java</url >
10
10
<inceptionYear >2024</inceptionYear >
329
329
<
connection >scm:git:
[email protected] :datastax/astra-db-java.git</
connection >
330
330
<
developerConnection >scm:git:
[email protected] :datastax/astra-db-java.git</
developerConnection >
331
331
<url >https://github.com/datastax/astra-db-java</url >
332
- <tag >1.0.0-beta1 </tag >
332
+ <tag >1.4.6 </tag >
333
333
</scm >
334
334
335
335
<developers >
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
- <project xmlns =" http://maven.apache.org/POM/4.0.0"
3
- xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
- xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
2
+ <project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
5
3
6
4
<modelVersion >4.0.0</modelVersion >
7
5
<artifactId >astra-db-java-tools</artifactId >
10
8
<parent >
11
9
<groupId >com.datastax.astra</groupId >
12
10
<artifactId >astra-db-java-parent</artifactId >
13
- <version >1.4.6-SNAPSHOT </version >
11
+ <version >1.4.6</version >
14
12
</parent >
15
13
16
14
<dependencies >
You can’t perform that action at this time.
0 commit comments