Refactor PgVector to package org.springframework.ai.vectorstore.pgvector

This commit is contained in:
Mark Pollack
2024-12-14 16:45:06 -05:00
parent fc1f92d11c
commit 03a9379bb7
18 changed files with 25 additions and 25 deletions

View File

@@ -38,7 +38,7 @@ import org.springframework.ai.rag.preretrieval.query.transformation.TranslationQ
import org.springframework.ai.rag.retrieval.search.VectorStoreDocumentRetriever;
import org.springframework.ai.reader.markdown.MarkdownDocumentReader;
import org.springframework.ai.reader.markdown.config.MarkdownDocumentReaderConfig;
import org.springframework.ai.pgvector.vectorstore.PgVectorStore;
import org.springframework.ai.vectorstore.pgvector.PgVectorStore;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;

View File

@@ -29,7 +29,7 @@ import org.springframework.ai.integration.tests.TestApplication;
import org.springframework.ai.rag.Query;
import org.springframework.ai.rag.retrieval.search.DocumentRetriever;
import org.springframework.ai.rag.retrieval.search.VectorStoreDocumentRetriever;
import org.springframework.ai.pgvector.vectorstore.PgVectorStore;
import org.springframework.ai.vectorstore.pgvector.PgVectorStore;
import org.springframework.ai.vectorstore.filter.Filter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

View File

@@ -23,7 +23,7 @@ import io.micrometer.observation.ObservationRegistry;
import org.springframework.ai.embedding.BatchingStrategy;
import org.springframework.ai.embedding.EmbeddingModel;
import org.springframework.ai.embedding.TokenCountBatchingStrategy;
import org.springframework.ai.pgvector.vectorstore.PgVectorStore;
import org.springframework.ai.vectorstore.pgvector.PgVectorStore;
import org.springframework.ai.vectorstore.observation.VectorStoreObservationConvention;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.autoconfigure.AutoConfiguration;

View File

@@ -17,9 +17,9 @@
package org.springframework.ai.autoconfigure.vectorstore.pgvector;
import org.springframework.ai.autoconfigure.vectorstore.CommonVectorStoreProperties;
import org.springframework.ai.pgvector.vectorstore.PgVectorStore;
import org.springframework.ai.pgvector.vectorstore.PgVectorStore.PgDistanceType;
import org.springframework.ai.pgvector.vectorstore.PgVectorStore.PgIndexType;
import org.springframework.ai.vectorstore.pgvector.PgVectorStore;
import org.springframework.ai.vectorstore.pgvector.PgVectorStore.PgDistanceType;
import org.springframework.ai.vectorstore.pgvector.PgVectorStore.PgIndexType;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**

View File

@@ -33,7 +33,7 @@ import org.springframework.ai.document.Document;
import org.springframework.ai.embedding.EmbeddingModel;
import org.springframework.ai.observation.conventions.VectorStoreProvider;
import org.springframework.ai.transformers.TransformersEmbeddingModel;
import org.springframework.ai.pgvector.vectorstore.PgVectorStore;
import org.springframework.ai.vectorstore.pgvector.PgVectorStore;
import org.springframework.ai.vectorstore.SearchRequest;
import org.springframework.ai.vectorstore.observation.VectorStoreObservationContext;
import org.springframework.boot.autoconfigure.AutoConfigurations;

View File

@@ -18,9 +18,9 @@ package org.springframework.ai.autoconfigure.vectorstore.pgvector;
import org.junit.jupiter.api.Test;
import org.springframework.ai.pgvector.vectorstore.PgVectorStore;
import org.springframework.ai.pgvector.vectorstore.PgVectorStore.PgDistanceType;
import org.springframework.ai.pgvector.vectorstore.PgVectorStore.PgIndexType;
import org.springframework.ai.vectorstore.pgvector.PgVectorStore;
import org.springframework.ai.vectorstore.pgvector.PgVectorStore.PgDistanceType;
import org.springframework.ai.vectorstore.pgvector.PgVectorStore.PgIndexType;
import static org.assertj.core.api.Assertions.assertThat;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.ai.pgvector.vectorstore;
package org.springframework.ai.vectorstore.pgvector;
import java.util.List;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.ai.pgvector.vectorstore;
package org.springframework.ai.vectorstore.pgvector;
import java.util.ArrayList;
import java.util.List;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.ai.pgvector.vectorstore;
package org.springframework.ai.vectorstore.pgvector;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

View File

@@ -19,7 +19,7 @@
*/
@NonNullApi
@NonNullFields
package org.springframework.ai.pgvector.vectorstore;
package org.springframework.ai.vectorstore.pgvector;
import org.springframework.lang.NonNullApi;
import org.springframework.lang.NonNullFields;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.ai.pgvector.vectorstore;
package org.springframework.ai.vectorstore.pgvector;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.ai.pgvector.vectorstore;
package org.springframework.ai.vectorstore.pgvector;
import java.util.List;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.ai.pgvector.vectorstore;
package org.springframework.ai.vectorstore.pgvector;
import org.testcontainers.utility.DockerImageName;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.ai.pgvector.vectorstore;
package org.springframework.ai.vectorstore.pgvector;
import java.util.Random;
@@ -30,7 +30,7 @@ import org.testcontainers.junit.jupiter.Testcontainers;
import org.springframework.ai.embedding.EmbeddingModel;
import org.springframework.ai.openai.OpenAiEmbeddingModel;
import org.springframework.ai.openai.api.OpenAiApi;
import org.springframework.ai.pgvector.vectorstore.PgVectorStore.PgIndexType;
import org.springframework.ai.vectorstore.pgvector.PgVectorStore.PgIndexType;
import org.springframework.ai.vectorstore.VectorStore;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringBootConfiguration;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.ai.pgvector.vectorstore;
package org.springframework.ai.vectorstore.pgvector;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
@@ -43,7 +43,7 @@ import org.springframework.ai.document.Document;
import org.springframework.ai.embedding.EmbeddingModel;
import org.springframework.ai.openai.OpenAiEmbeddingModel;
import org.springframework.ai.openai.api.OpenAiApi;
import org.springframework.ai.pgvector.vectorstore.PgVectorStore.PgIndexType;
import org.springframework.ai.vectorstore.pgvector.PgVectorStore.PgIndexType;
import org.springframework.ai.vectorstore.SearchRequest;
import org.springframework.ai.vectorstore.VectorStore;
import org.springframework.ai.vectorstore.filter.FilterExpressionTextParser.FilterExpressionParseException;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.ai.pgvector.vectorstore;
package org.springframework.ai.vectorstore.pgvector;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
@@ -41,7 +41,7 @@ import org.springframework.ai.observation.conventions.VectorStoreSimilarityMetri
import org.springframework.ai.openai.OpenAiChatModel;
import org.springframework.ai.openai.OpenAiEmbeddingModel;
import org.springframework.ai.openai.api.OpenAiApi;
import org.springframework.ai.pgvector.vectorstore.PgVectorStore.PgIndexType;
import org.springframework.ai.vectorstore.pgvector.PgVectorStore.PgIndexType;
import org.springframework.ai.vectorstore.SearchRequest;
import org.springframework.ai.vectorstore.VectorStore;
import org.springframework.ai.vectorstore.observation.DefaultVectorStoreObservationConvention;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.ai.pgvector.vectorstore;
package org.springframework.ai.vectorstore.pgvector;
import java.util.Collections;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.ai.pgvector.vectorstore;
package org.springframework.ai.vectorstore.pgvector;
import java.util.List;
import java.util.Map;