Skip to content

Commit

Permalink
Fix javadoc errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ilayaperumalg committed Dec 21, 2024
1 parent 80317e2 commit 1dd9de4
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -47,31 +52,35 @@ public class CosmosDBVectorStoreConfig implements AutoCloseable {
private List<String> 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() {
return this.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 void setVectorStoreThroughput(int vectorStoreThroughput) {
this.vectorStoreThroughput = 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() {
return this.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 void setMetadataFields(String metadataFields) {
Expand All @@ -80,87 +89,98 @@ 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<String> getMetadataFieldsList() {
return this.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 String getEndpoint() {
return this.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 void setEndpoint(String endpoint) {
this.endpoint = 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() {
return this.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 void setKey(String key) {
this.key = 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() {
return this.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 void setContainerName(String containerName) {
this.containerName = 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() {
return this.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 void setDatabaseName(String databaseName) {
this.databaseName = 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() {
return this.partitionKeyPath;
}

/**
* @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) {
Expand All @@ -173,15 +193,17 @@ 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() {
return this.vectorDimensions;
}

/**
* @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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,7 @@ public static class ElasticsearchBuilder extends AbstractVectorStoreBuilder<Elas
/**
* Sets the Elasticsearch REST client.
* @param restClient the Elasticsearch REST client
* @return the builder instance
* @throws IllegalArgumentException if restClient is null
* @param embeddingModel the Embedding Model to be used
*/
public ElasticsearchBuilder(RestClient restClient, EmbeddingModel embeddingModel) {
super(embeddingModel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,8 @@ public void setDeleteData(boolean deleteData) {
/**
* Configuration class for GemFire Vector Store.
*
* @deprecated Since 1.0.0-M5, use {@link GemFireVectorStore#builder()} instead
* @deprecated Since 1.0.0-M5, use {@link GemFireVectorStore#builder(EmbeddingModel)}
* instead
*/
@Deprecated(since = "1.0.0-M5", forRemoval = true)
public static final class GemFireVectorStoreConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@

package org.springframework.ai.vectorstore.hanadb;

import org.springframework.ai.embedding.EmbeddingModel;

/**
* The {@code HanaCloudVectorStoreConfig} class represents the configuration for the
* HanaCloudVectorStore. It provides methods to retrieve the table name and the topK
* value.
*
* @author Rahul Mittal
* @since 1.0.0
* @deprecated Since 1.0.0-M5, use {@link HanaCloudVectorStore#builder()}
* @deprecated Since 1.0.0-M5, use
* {@link HanaCloudVectorStore#builder(HanaVectorRepository, EmbeddingModel)}
*/
@Deprecated(since = "1.0.0-M5", forRemoval = true)
public final class HanaCloudVectorStoreConfig {
Expand All @@ -38,31 +41,35 @@ private HanaCloudVectorStoreConfig() {
/**
* Creates a new builder for HanaCloudVectorStoreConfig.
* @return a new builder instance
* @deprecated Since 1.0.0-M5, use {@link HanaCloudVectorStore#builder()}
* @deprecated Since 1.0.0-M5, use
* {@link HanaCloudVectorStore#builder(HanaVectorRepository, EmbeddingModel)}
*/
@Deprecated(since = "1.0.0-M5", forRemoval = true)
public static HanaCloudVectorStoreConfigBuilder builder() {
return new HanaCloudVectorStoreConfigBuilder();
}

/**
* @deprecated Since 1.0.0-M5, use {@link HanaCloudVectorStore#builder()}
* @deprecated Since 1.0.0-M5, use
* {@link HanaCloudVectorStore#builder(HanaVectorRepository, EmbeddingModel)}
*/
@Deprecated(since = "1.0.0-M5", forRemoval = true)
public String getTableName() {
return this.tableName;
}

/**
* @deprecated Since 1.0.0-M5, use {@link HanaCloudVectorStore#builder()}
* @deprecated Since 1.0.0-M5, use
* {@link HanaCloudVectorStore#builder(HanaVectorRepository, EmbeddingModel)}
*/
@Deprecated(since = "1.0.0-M5", forRemoval = true)
public int getTopK() {
return this.topK;
}

/**
* @deprecated Since 1.0.0-M5, use {@link HanaCloudVectorStore#builder()}
* @deprecated Since 1.0.0-M5, use
* {@link HanaCloudVectorStore#builder(HanaVectorRepository, EmbeddingModel)}
*/
@Deprecated(since = "1.0.0-M5", forRemoval = true)
public static class HanaCloudVectorStoreConfigBuilder {
Expand All @@ -72,7 +79,8 @@ public static class HanaCloudVectorStoreConfigBuilder {
private int topK;

/**
* @deprecated Since 1.0.0-M5, use {@link HanaCloudVectorStore#builder()}
* @deprecated Since 1.0.0-M5, use
* {@link HanaCloudVectorStore#builder(HanaVectorRepository, EmbeddingModel)}
*/
@Deprecated(since = "1.0.0-M5", forRemoval = true)
public HanaCloudVectorStoreConfigBuilder tableName(String tableName) {
Expand All @@ -81,7 +89,8 @@ public HanaCloudVectorStoreConfigBuilder tableName(String tableName) {
}

/**
* @deprecated Since 1.0.0-M5, use {@link HanaCloudVectorStore#builder()}
* @deprecated Since 1.0.0-M5, use
* {@link HanaCloudVectorStore#builder(HanaVectorRepository, EmbeddingModel)}
*/
@Deprecated(since = "1.0.0-M5", forRemoval = true)
public HanaCloudVectorStoreConfigBuilder topK(int topK) {
Expand All @@ -90,7 +99,8 @@ public HanaCloudVectorStoreConfigBuilder topK(int topK) {
}

/**
* @deprecated Since 1.0.0-M5, use {@link HanaCloudVectorStore#builder()}
* @deprecated Since 1.0.0-M5, use
* {@link HanaCloudVectorStore#builder(HanaVectorRepository, EmbeddingModel)}
*/
@Deprecated(since = "1.0.0-M5", forRemoval = true)
public HanaCloudVectorStoreConfig build() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -772,8 +772,7 @@ public static class OracleBuilder extends AbstractVectorStoreBuilder<OracleBuild
/**
* Sets the JdbcTemplate to be used for database operations.
* @param jdbcTemplate the JdbcTemplate instance
* @return the builder instance
* @throws IllegalArgumentException if jdbcTemplate is null
* @param embeddingModel the Embedding Model to be used
*/
public OracleBuilder(JdbcTemplate jdbcTemplate, EmbeddingModel embeddingModel) {
super(embeddingModel);
Expand Down

0 comments on commit 1dd9de4

Please sign in to comment.