diff --git a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chatclient.adoc b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chatclient.adoc index 5ffa640f6..d2d65ddc0 100644 --- a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chatclient.adoc +++ b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chatclient.adoc @@ -198,14 +198,6 @@ image::spring-ai-chat-completions-clients.jpg[align="center", width="800px"] // // TBD -== API Docs (OUTDATED!!!) - -You can find the Javadoc https://docs.spring.io/spring-ai/docs/current-SNAPSHOT/[here]. - -== Feedback and Contributions - -The project's https://github.com/spring-projects/spring-ai/discussions[GitHub discussions] is a great place to send feedback. - // == Related Resources // // TBD diff --git a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/index.adoc b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/index.adoc index 9ff0f5050..43084751d 100644 --- a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/index.adoc +++ b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/index.adoc @@ -12,6 +12,14 @@ The <> can help you understand the basic constructs used impl * xref:api/vectordbs.adoc[Vector Database API] * xref:api/[Image Generation API](WIP) +== API Docs + +You can find the Javadoc https://docs.spring.io/spring-ai/docs/current-SNAPSHOT/[here]. + +== Feedback and Contributions + +The project's https://github.com/spring-projects/spring-ai/discussions[GitHub discussions] is a great place to send feedback. + == Spring AI Generic Model API [[generic-model-api]] image::spring-ai-generic-model-api.jpg[width=900, align="center"] diff --git a/vector-stores/spring-ai-azure/README.md b/vector-stores/spring-ai-azure/README.md new file mode 100644 index 000000000..5962ce892 --- /dev/null +++ b/vector-stores/spring-ai-azure/README.md @@ -0,0 +1 @@ +[Azure AI Search Vector Store Documentation](https://docs.spring.io/spring-ai/reference/api/vectordbs/azure.html) \ No newline at end of file diff --git a/vector-stores/spring-ai-chroma/README.md b/vector-stores/spring-ai-chroma/README.md new file mode 100644 index 000000000..57f4b1f56 --- /dev/null +++ b/vector-stores/spring-ai-chroma/README.md @@ -0,0 +1 @@ +[Chroma Vector Store Documentation](https://docs.spring.io/spring-ai/reference/api/vectordbs/chroma.html) \ No newline at end of file diff --git a/vector-stores/spring-ai-milvus-store/README.md b/vector-stores/spring-ai-milvus-store/README.md new file mode 100644 index 000000000..1a26931d1 --- /dev/null +++ b/vector-stores/spring-ai-milvus-store/README.md @@ -0,0 +1 @@ +[Milvus Vector Store Documentation](https://docs.spring.io/spring-ai/reference/api/vectordbs/milvus.html) \ No newline at end of file diff --git a/vector-stores/spring-ai-neo4j-store/README.md b/vector-stores/spring-ai-neo4j-store/README.md new file mode 100644 index 000000000..4c2ea45ed --- /dev/null +++ b/vector-stores/spring-ai-neo4j-store/README.md @@ -0,0 +1 @@ +[Neo4j Vector Store Documentation](https://docs.spring.io/spring-ai/reference/api/vectordbs/neo4j.html) \ No newline at end of file diff --git a/vector-stores/spring-ai-pgvector-store/README.md b/vector-stores/spring-ai-pgvector-store/README.md new file mode 100644 index 000000000..52bb7be01 --- /dev/null +++ b/vector-stores/spring-ai-pgvector-store/README.md @@ -0,0 +1 @@ +[PGvector Vector Store Documentation](https://docs.spring.io/spring-ai/reference/api/vectordbs/pgvector.html) \ No newline at end of file diff --git a/vector-stores/spring-ai-pinecone/README.md b/vector-stores/spring-ai-pinecone/README.md index 37b1bc022..8cfa37640 100644 --- a/vector-stores/spring-ai-pinecone/README.md +++ b/vector-stores/spring-ai-pinecone/README.md @@ -1,125 +1 @@ -# Pinecone Vector Store - -This readme walks you through setting up the Pinecone `VectorStore` to store document embeddings and perform similarity searches. - -## What is Pinecone? - -[Pinecone](https://www.pinecone.io/) is a popular cloud-based vector database, which allows you to store and search vectors efficiently. - -## Prerequisites - -1. Pinecone Account: Before you start, sign up for a [Pinecone account](https://app.pinecone.io/). -2. Pinecone Project: Once registered, create a new project, an index, and generate an API key. You'll need these details for configuration. -3. OpenAI Account: Create an account at [OpenAI Signup](https://platform.openai.com/signup) and generate the token at [API Keys](https://platform.openai.com/account/api-keys) - -## Configuration - -To set up `PineconeVectorStore`, gather the following details from your Pinecone account: - -* Pinecone API Key -* Pinecone Environment -* Pinecone Project ID -* Pinecone Index Name -* Pinecone Namespace - -> **Note** -> This information is available to you in the Pinecone UI portal. - - -When setting up embeddings, select a vector dimension of `1536`. This matches the dimensionality of OpenAI's model `text-embedding-ada-002`, which we'll be using for this guide. - -Additionally, you'll need to provide your OpenAI API Key. Set it as an environment variable like so: - -```bash -export SPRING_AI_OPENAI_API_KEY='Your_OpenAI_API_Key' -``` - -## Repository - -To acquire Spring AI artifacts, declare the Spring Snapshot repository: - -```xml - - spring-snapshots - Spring Snapshots - https://repo.spring.io/snapshot - - false - - -``` - -## Dependencies - -Add these dependencies to your project: - -1. OpenAI: Required for calculating embeddings. - -```xml - - org.springframework.experimental.ai - spring-ai-openai-spring-boot-starter - 0.8.0-SNAPSHOT - -``` - -2. Pinecone - -```xml - - org.springframework.experimental.ai - spring-ai-pinecone - 0.8.0-SNAPSHOT - -``` - -## Sample Code - -To configure Pinecone in your application, you can use the following setup: - -```java -@Bean -public PineconeVectorStoreConfig pineconeVectorStoreConfig() { - - return PineconeVectorStoreConfig.builder() - .withApiKey() - .withEnvironment("gcp-starter") - .withProjectId("89309e6") - .withIndexName("spring-ai-test-index") - .withNamespace("") // the free tier doesn't support namespaces. - .build(); -} -``` - -Integrate with OpenAI's embeddings by adding the Spring Boot OpenAI starter to your project. -This provides you with an implementation of the Embeddings client: - -```java -@Bean -public VectorStore vectorStore(PineconeVectorStoreConfig config, EmbeddingClient embeddingClient) { - return new PineconeVectorStore(config, embeddingClient); -} -``` - -In your main code, create some documents: - -```java -List documents = List.of( - new Document("Spring AI rocks!! Spring AI rocks!! Spring AI rocks!! Spring AI rocks!! Spring AI rocks!!", Map.of("meta1", "meta1")), - new Document("The World is Big and Salvation Lurks Around the Corner"), - new Document("You walk forward facing the past and you turn back toward the future.", Map.of("meta2", "meta2"))); -``` - -Add the documents to Pinecone: - -```java -vectorStore.add(List.of(document)); -``` - -And finally, retrieve documents similar to a query: - -```java -List results = vectorStore.similaritySearch(SearchRequest.query("Spring").withTopK(5)); -``` - -If all goes well, you should retrieve the document containing the text "Spring AI rocks!!". +[Pinecone Vector Store Documentation](https://docs.spring.io/spring-ai/reference/api/vectordbs/pinecone.html) \ No newline at end of file diff --git a/vector-stores/spring-ai-redis/README.md b/vector-stores/spring-ai-redis/README.md new file mode 100644 index 000000000..f4c404575 --- /dev/null +++ b/vector-stores/spring-ai-redis/README.md @@ -0,0 +1 @@ +[Redis Vector Store Documentation](https://docs.spring.io/spring-ai/reference/api/vectordbs/redis.html) \ No newline at end of file diff --git a/vector-stores/spring-ai-redis/pom.xml b/vector-stores/spring-ai-redis/pom.xml index 9cf7a082b..a7cd67cdb 100644 --- a/vector-stores/spring-ai-redis/pom.xml +++ b/vector-stores/spring-ai-redis/pom.xml @@ -15,11 +15,11 @@ https://github.com/spring-projects/spring-ai - https://github.com/spring-projects-experimental/spring-ai - git://github.com/spring-projects-experimental/spring-ai.git - git@github.com:spring-projects-experimental/spring-ai.git + https://github.com/spring-projects/spring-ai + git://github.com/spring-projects/spring-ai.git + git@github.com:spring-projects/spring-ai.git - + 2.0.1 5.1.0 @@ -39,7 +39,7 @@ jedis ${jedis.version} - + org.springframework.ai diff --git a/vector-stores/spring-ai-weaviate/README.md b/vector-stores/spring-ai-weaviate/README.md new file mode 100644 index 000000000..093dcbe41 --- /dev/null +++ b/vector-stores/spring-ai-weaviate/README.md @@ -0,0 +1 @@ +[Weaviate Vector Store Documentation](https://docs.spring.io/spring-ai/reference/api/vectordbs/weaviate.html) \ No newline at end of file