From 1dd9de422dab08278763b2d551ee2157b924c52b Mon Sep 17 00:00:00 2001 From: Ilayaperumal Gopinathan Date: Sat, 21 Dec 2024 00:13:06 +0000 Subject: [PATCH] Fix javadoc errors --- .../ai/vectorstore/SearchRequest.java | 2 +- .../WeaviateVectorStoreAutoConfiguration.java | 4 +- .../cosmosdb/CosmosDBVectorStoreConfig.java | 58 +++++++++++++------ .../cassandra/CassandraVectorStoreConfig.java | 4 +- .../ElasticsearchVectorStore.java | 3 +- .../gemfire/GemFireVectorStore.java | 3 +- .../hanadb/HanaCloudVectorStoreConfig.java | 26 ++++++--- .../vectorstore/oracle/OracleVectorStore.java | 3 +- 8 files changed, 67 insertions(+), 36 deletions(-) diff --git a/spring-ai-core/src/main/java/org/springframework/ai/vectorstore/SearchRequest.java b/spring-ai-core/src/main/java/org/springframework/ai/vectorstore/SearchRequest.java index 6ebe287485e..97750f4ed9e 100644 --- a/spring-ai-core/src/main/java/org/springframework/ai/vectorstore/SearchRequest.java +++ b/spring-ai-core/src/main/java/org/springframework/ai/vectorstore/SearchRequest.java @@ -85,7 +85,7 @@ public static SearchRequest query(String query) { * string. Use the {@link Builder#query(String query)} to set/update the embedding * query text. * @return Returns new {@link SearchRequest} builder instance. - * @deprecated use {@link Builder#builder().build()} instead. + * @deprecated use {@link Builder#builder()} instead. */ @Deprecated(forRemoval = true, since = "1.0.0-M5") public static Builder defaults() { diff --git a/spring-ai-spring-boot-autoconfigure/src/main/java/org/springframework/ai/autoconfigure/vectorstore/weaviate/WeaviateVectorStoreAutoConfiguration.java b/spring-ai-spring-boot-autoconfigure/src/main/java/org/springframework/ai/autoconfigure/vectorstore/weaviate/WeaviateVectorStoreAutoConfiguration.java index 3fd8d7c518d..36400be51d0 100644 --- a/spring-ai-spring-boot-autoconfigure/src/main/java/org/springframework/ai/autoconfigure/vectorstore/weaviate/WeaviateVectorStoreAutoConfiguration.java +++ b/spring-ai-spring-boot-autoconfigure/src/main/java/org/springframework/ai/autoconfigure/vectorstore/weaviate/WeaviateVectorStoreAutoConfiguration.java @@ -25,10 +25,8 @@ import org.springframework.ai.embedding.BatchingStrategy; import org.springframework.ai.embedding.EmbeddingModel; import org.springframework.ai.embedding.TokenCountBatchingStrategy; -import org.springframework.ai.vectorstore.weaviate.WeaviateVectorStore; -import org.springframework.ai.vectorstore.weaviate.WeaviateVectorStore.WeaviateVectorStoreConfig; -import org.springframework.ai.vectorstore.weaviate.WeaviateVectorStore.WeaviateVectorStoreConfig.MetadataField; import org.springframework.ai.vectorstore.observation.VectorStoreObservationConvention; +import org.springframework.ai.vectorstore.weaviate.WeaviateVectorStore; import org.springframework.beans.factory.ObjectProvider; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; diff --git a/vector-stores/spring-ai-azure-cosmos-db-store/src/main/java/org/springframework/ai/vectorstore/cosmosdb/CosmosDBVectorStoreConfig.java b/vector-stores/spring-ai-azure-cosmos-db-store/src/main/java/org/springframework/ai/vectorstore/cosmosdb/CosmosDBVectorStoreConfig.java index c3c7f5fd244..2b2cd07ac26 100644 --- a/vector-stores/spring-ai-azure-cosmos-db-store/src/main/java/org/springframework/ai/vectorstore/cosmosdb/CosmosDBVectorStoreConfig.java +++ b/vector-stores/spring-ai-azure-cosmos-db-store/src/main/java/org/springframework/ai/vectorstore/cosmosdb/CosmosDBVectorStoreConfig.java @@ -18,12 +18,17 @@ import java.util.List; +import com.azure.cosmos.CosmosAsyncClient; + +import org.springframework.ai.embedding.EmbeddingModel; + /** * Configuration properties for a CosmosDB vector store. * * @author Theo van Kraay * @since 1.0.0 - * @deprecated Since 1.0.0-M5, use {@link CosmosDBVectorStore#builder()} instead + * @deprecated Since 1.0.0-M5, use + * {@link CosmosDBVectorStore#builder(CosmosAsyncClient, EmbeddingModel)} instead. */ @Deprecated(since = "1.0.0-M5", forRemoval = true) public class CosmosDBVectorStoreConfig implements AutoCloseable { @@ -47,7 +52,8 @@ public class CosmosDBVectorStoreConfig implements AutoCloseable { private List metadataFieldsList; /** - * @deprecated Since 1.0.0-M5, use {@link CosmosDBVectorStore#builder()} instead + * @deprecated Since 1.0.0-M5, use + * {@link CosmosDBVectorStore#builder(CosmosAsyncClient, EmbeddingModel)} instead */ @Deprecated(since = "1.0.0-M5", forRemoval = true) public int getVectorStoreThroughput() { @@ -55,7 +61,8 @@ public int getVectorStoreThroughput() { } /** - * @deprecated Since 1.0.0-M5, use {@link CosmosDBVectorStore#builder()} instead + * @deprecated Since 1.0.0-M5, use + * {@link CosmosDBVectorStore#builder(CosmosAsyncClient, EmbeddingModel)} instead */ @Deprecated(since = "1.0.0-M5", forRemoval = true) public void setVectorStoreThroughput(int vectorStoreThroughput) { @@ -63,7 +70,8 @@ public void setVectorStoreThroughput(int vectorStoreThroughput) { } /** - * @deprecated Since 1.0.0-M5, use {@link CosmosDBVectorStore#builder()} instead + * @deprecated Since 1.0.0-M5, use + * {@link CosmosDBVectorStore#builder(CosmosAsyncClient, EmbeddingModel)} instead */ @Deprecated(since = "1.0.0-M5", forRemoval = true) public String getMetadataFields() { @@ -71,7 +79,8 @@ public String getMetadataFields() { } /** - * @deprecated Since 1.0.0-M5, use {@link CosmosDBVectorStore#builder()} instead + * @deprecated Since 1.0.0-M5, use + * {@link CosmosDBVectorStore#builder(CosmosAsyncClient, EmbeddingModel)} instead */ @Deprecated(since = "1.0.0-M5", forRemoval = true) public void setMetadataFields(String metadataFields) { @@ -80,7 +89,8 @@ public void setMetadataFields(String metadataFields) { } /** - * @deprecated Since 1.0.0-M5, use {@link CosmosDBVectorStore#builder()} instead + * @deprecated Since 1.0.0-M5, use + * {@link CosmosDBVectorStore#builder(CosmosAsyncClient, EmbeddingModel)} instead */ @Deprecated(since = "1.0.0-M5", forRemoval = true) public List getMetadataFieldsList() { @@ -88,7 +98,8 @@ public List getMetadataFieldsList() { } /** - * @deprecated Since 1.0.0-M5, use {@link CosmosDBVectorStore#builder()} instead + * @deprecated Since 1.0.0-M5, use + * {@link CosmosDBVectorStore#builder(CosmosAsyncClient, EmbeddingModel)} instead */ @Deprecated(since = "1.0.0-M5", forRemoval = true) public String getEndpoint() { @@ -96,7 +107,8 @@ public String getEndpoint() { } /** - * @deprecated Since 1.0.0-M5, use {@link CosmosDBVectorStore#builder()} instead + * @deprecated Since 1.0.0-M5, use + * {@link CosmosDBVectorStore#builder(CosmosAsyncClient, EmbeddingModel)} instead */ @Deprecated(since = "1.0.0-M5", forRemoval = true) public void setEndpoint(String endpoint) { @@ -104,7 +116,8 @@ public void setEndpoint(String endpoint) { } /** - * @deprecated Since 1.0.0-M5, use {@link CosmosDBVectorStore#builder()} instead + * @deprecated Since 1.0.0-M5, use + * {@link CosmosDBVectorStore#builder(CosmosAsyncClient, EmbeddingModel)} instead */ @Deprecated(since = "1.0.0-M5", forRemoval = true) public String getKey() { @@ -112,7 +125,8 @@ public String getKey() { } /** - * @deprecated Since 1.0.0-M5, use {@link CosmosDBVectorStore#builder()} instead + * @deprecated Since 1.0.0-M5, use + * {@link CosmosDBVectorStore#builder(CosmosAsyncClient, EmbeddingModel)} instead */ @Deprecated(since = "1.0.0-M5", forRemoval = true) public void setKey(String key) { @@ -120,7 +134,8 @@ public void setKey(String key) { } /** - * @deprecated Since 1.0.0-M5, use {@link CosmosDBVectorStore#builder()} instead + * @deprecated Since 1.0.0-M5, use + * {@link CosmosDBVectorStore#builder(CosmosAsyncClient, EmbeddingModel)} instead */ @Deprecated(since = "1.0.0-M5", forRemoval = true) public String getContainerName() { @@ -128,7 +143,8 @@ public String getContainerName() { } /** - * @deprecated Since 1.0.0-M5, use {@link CosmosDBVectorStore#builder()} instead + * @deprecated Since 1.0.0-M5, use + * {@link CosmosDBVectorStore#builder(CosmosAsyncClient, EmbeddingModel)} )} instead */ @Deprecated(since = "1.0.0-M5", forRemoval = true) public void setContainerName(String containerName) { @@ -136,7 +152,8 @@ public void setContainerName(String containerName) { } /** - * @deprecated Since 1.0.0-M5, use {@link CosmosDBVectorStore#builder()} instead + * @deprecated Since 1.0.0-M5, use + * {@link CosmosDBVectorStore#builder(CosmosAsyncClient, EmbeddingModel)} instead */ @Deprecated(since = "1.0.0-M5", forRemoval = true) public String getDatabaseName() { @@ -144,7 +161,8 @@ public String getDatabaseName() { } /** - * @deprecated Since 1.0.0-M5, use {@link CosmosDBVectorStore#builder()} instead + * @deprecated Since 1.0.0-M5, use + * {@link CosmosDBVectorStore#builder(CosmosAsyncClient, EmbeddingModel)} instead */ @Deprecated(since = "1.0.0-M5", forRemoval = true) public void setDatabaseName(String databaseName) { @@ -152,7 +170,8 @@ public void setDatabaseName(String databaseName) { } /** - * @deprecated Since 1.0.0-M5, use {@link CosmosDBVectorStore#builder()} instead + * @deprecated Since 1.0.0-M5, use + * {@link CosmosDBVectorStore#builder(CosmosAsyncClient, EmbeddingModel)} instead */ @Deprecated(since = "1.0.0-M5", forRemoval = true) public String getPartitionKeyPath() { @@ -160,7 +179,8 @@ public String getPartitionKeyPath() { } /** - * @deprecated Since 1.0.0-M5, use {@link CosmosDBVectorStore#builder()} instead + * @deprecated Since 1.0.0-M5, use + * {@link CosmosDBVectorStore#builder(CosmosAsyncClient, EmbeddingModel)} instead */ @Deprecated(since = "1.0.0-M5", forRemoval = true) public void setPartitionKeyPath(String partitionKeyPath) { @@ -173,7 +193,8 @@ public void close() throws Exception { } /** - * @deprecated Since 1.0.0-M5, use {@link CosmosDBVectorStore#builder()} instead + * @deprecated Since 1.0.0-M5, use + * {@link CosmosDBVectorStore#builder(CosmosAsyncClient, EmbeddingModel)} instead */ @Deprecated(since = "1.0.0-M5", forRemoval = true) public long getVectorDimensions() { @@ -181,7 +202,8 @@ public long getVectorDimensions() { } /** - * @deprecated Since 1.0.0-M5, use {@link CosmosDBVectorStore#builder()} instead + * @deprecated Since 1.0.0-M5, use + * {@link CosmosDBVectorStore#builder(CosmosAsyncClient, EmbeddingModel)} instead */ @Deprecated(since = "1.0.0-M5", forRemoval = true) public void setVectorDimensions(long vectorDimensions) { diff --git a/vector-stores/spring-ai-cassandra-store/src/main/java/org/springframework/ai/vectorstore/cassandra/CassandraVectorStoreConfig.java b/vector-stores/spring-ai-cassandra-store/src/main/java/org/springframework/ai/vectorstore/cassandra/CassandraVectorStoreConfig.java index 725eacdefa7..9352b1a870e 100644 --- a/vector-stores/spring-ai-cassandra-store/src/main/java/org/springframework/ai/vectorstore/cassandra/CassandraVectorStoreConfig.java +++ b/vector-stores/spring-ai-cassandra-store/src/main/java/org/springframework/ai/vectorstore/cassandra/CassandraVectorStoreConfig.java @@ -48,6 +48,7 @@ import org.slf4j.LoggerFactory; import org.springframework.ai.cassandra.SchemaUtil; +import org.springframework.ai.embedding.EmbeddingModel; import org.springframework.lang.Nullable; /** @@ -65,7 +66,8 @@ * * @author Mick Semb Wever * @since 1.0.0 - * @deprecated since 1.0.0-M5, use {@link CassandraVectorStore#builder()} instead + * @deprecated since 1.0.0-M5, use {@link CassandraVectorStore#builder(EmbeddingModel)} + * instead. */ @Deprecated(since = "1.0.0-M5", forRemoval = true) public final class CassandraVectorStoreConfig implements AutoCloseable { diff --git a/vector-stores/spring-ai-elasticsearch-store/src/main/java/org/springframework/ai/vectorstore/elasticsearch/ElasticsearchVectorStore.java b/vector-stores/spring-ai-elasticsearch-store/src/main/java/org/springframework/ai/vectorstore/elasticsearch/ElasticsearchVectorStore.java index 341c9a3db9c..99a6dddf491 100644 --- a/vector-stores/spring-ai-elasticsearch-store/src/main/java/org/springframework/ai/vectorstore/elasticsearch/ElasticsearchVectorStore.java +++ b/vector-stores/spring-ai-elasticsearch-store/src/main/java/org/springframework/ai/vectorstore/elasticsearch/ElasticsearchVectorStore.java @@ -406,8 +406,7 @@ public static class ElasticsearchBuilder extends AbstractVectorStoreBuilder