diff --git a/pom.xml b/pom.xml index d0336a39e98..cf06a4338e2 100644 --- a/pom.xml +++ b/pom.xml @@ -13,6 +13,7 @@ Building AI applications with Spring Boot + spring-ai-bom spring-ai-core models/spring-ai-transformers models/spring-ai-postgresml @@ -51,7 +52,6 @@ vector-stores/spring-ai-redis spring-ai-spring-boot-starters/spring-ai-starter-vertex-ai spring-ai-spring-boot-starters/spring-ai-starter-bedrock-ai - diff --git a/spring-ai-bom/pom.xml b/spring-ai-bom/pom.xml new file mode 100644 index 00000000000..8ad3c6a3db7 --- /dev/null +++ b/spring-ai-bom/pom.xml @@ -0,0 +1,260 @@ + + + 4.0.0 + + + org.springframework.ai + spring-ai + 0.8.0-SNAPSHOT + + + spring-ai-bom + pom + + Spring AI BOM + Bill of Materials POM (BOM) for the Spring AI modules + + https://github.com/spring-projects/spring-ai + + + https://github.com/spring-projects/spring-ai + git://github.com/spring-projects/spring-ai.git + git@github.com:spring-projects/spring-ai.git + + + + + + + + org.springframework.ai + spring-ai-core + ${project.version} + + + + + org.springframework.ai + spring-ai-pdf-document-reader + ${project.version} + + + + org.springframework.ai + spring-ai-tika-document-reader + ${project.version} + + + + + org.springframework.ai + spring-ai-azure-openai + ${project.version} + + + + org.springframework.ai + spring-ai-bedrock + ${project.version} + + + + org.springframework.ai + spring-ai-huggingface + ${project.version} + + + + org.springframework.ai + spring-ai-ollama + ${project.version} + + + + org.springframework.ai + spring-ai-openai + ${project.version} + + + + org.springframework.ai + spring-ai-postgresml + ${project.version} + + + + org.springframework.ai + spring-ai-stability-ai + ${project.version} + + + + org.springframework.ai + spring-ai-transformers + ${project.version} + + + + org.springframework.ai + spring-ai-vertex-ai + ${project.version} + + + + + org.springframework.ai + spring-ai-azure-vector-store + ${project.version} + + + + org.springframework.ai + spring-ai-chroma-store + ${project.version} + + + + org.springframework.ai + spring-ai-milvus-store + ${project.version} + + + + org.springframework.ai + spring-ai-neo4j-store + ${project.version} + + + + org.springframework.ai + spring-ai-pgvector-store + ${project.version} + + + + org.springframework.ai + spring-ai-pinecone + ${project.version} + + + + org.springframework.ai + spring-ai-redis + ${project.version} + + + + org.springframework.ai + spring-ai-weaviate-store + ${project.version} + + + + + org.springframework.ai + spring-ai-test + ${project.version} + + + + org.springframework.ai + spring-ai-spring-boot-autoconfigure + ${project.version} + + + + + org.springframework.ai + spring-ai-azure-openai-spring-boot-starter + ${project.version} + + + + org.springframework.ai + spring-ai-azure-vector-store-spring-boot-starter + ${project.version} + + + + org.springframework.ai + spring-ai-bedrock-ai-spring-boot-starter + ${project.version} + + + + org.springframework.ai + spring-ai-chroma-store-spring-boot-starter + ${project.version} + + + + org.springframework.ai + spring-ai-milvus-store-spring-boot-starter + ${project.version} + + + + org.springframework.ai + spring-ai-neo4j-store-spring-boot-starter + ${project.version} + + + + org.springframework.ai + spring-ai-ollama-spring-boot-starter + ${project.version} + + + + org.springframework.ai + spring-ai-openai-spring-boot-starter + ${project.version} + + + + org.springframework.ai + spring-ai-pgvector-store-spring-boot-starter + ${project.version} + + + + org.springframework.ai + spring-ai-pinecone-store-spring-boot-starter + ${project.version} + + + + org.springframework.ai + spring-ai-postgresml-spring-boot-starter + ${project.version} + + + + org.springframework.ai + spring-ai-redis-spring-boot-starter + ${project.version} + + + + org.springframework.ai + spring-ai-transformers-spring-boot-starter + ${project.version} + + + + org.springframework.ai + spring-ai-vertex-ai-spring-boot-starter + ${project.version} + + + + org.springframework.ai + spring-ai-weaviate-store-spring-boot-starter + ${project.version} + + + + + + \ No newline at end of file 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 2dd1f5aecfa..5ffa640f62c 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 @@ -179,17 +179,16 @@ The `ChatClient` and `StreamingChatClient` implementations are provided for the image::spring-ai-chat-completions-clients.jpg[align="center", width="800px"] -* link:clients/openai-chat.html[OpenAI Chat Completion] -* link:clients/azure-openai-chat.html[Microsoft Azure Open AI Chat Completion] -* link:clients/ollama-chat.html[Ollama Chat Completion] -* link:clients/huggingface.html[HuggingFace Chat Completion] (no streaming support) -* link:clients/vertex-chat.html[Google Vertex Chat Completion] (no streaming support) -* link:clients/bedrock.html[Amazon Bedrock] -** link:clients/bedrock/bedrock-cohere.html[Cohere Chat Completion] -** link:clients/bedrock/bedrock-llama2.html[Llama2 Chat Completion] -** link:clients/bedrock/bedrock-titan.html[Titan Chat Completion] -** link:clients/bedrock/bedrock-anthropic.html[Anthropic Chat Completion] -** link:clients/bedrock/bedrock-jurassic.html[Jurassic2 Chat Completion] (WIP, no streaming support) +* xref:api/clients/openai-chat.adoc[OpenAI Chat Completion] +* xref:api/clients/azure-openai-chat.adoc[Microsoft Azure Open AI Chat Completion] +* xref:api/clients/ollama-chat.adoc[Ollama Chat Completion] +* xref:api/clients/huggingface.adoc[HuggingFace Chat Completion] (no streaming support) +* xref:api/clients/vertexai-chat.adoc[Google Vertex Chat Completion] (no streaming support) +* xref:api/bedrock.adoc[Amazon Bedrock] +** xref:api/clients/bedrock/bedrock-cohere.adoc[Cohere Chat Completion] +** xref:api/clients/bedrock/bedrock-llama2.adoc[Llama2 Chat Completion] +** xref:api/clients/bedrock/bedrock-titan.adoc[Titan Chat Completion] +** xref:api/clients/bedrock/bedrock-anthropic.adoc[Anthropic Chat Completion] // == Best Practices // diff --git a/spring-ai-docs/src/main/antora/modules/ROOT/pages/getting-started.adoc b/spring-ai-docs/src/main/antora/modules/ROOT/pages/getting-started.adoc index 99a2f4102e4..1706cd991e2 100644 --- a/spring-ai-docs/src/main/antora/modules/ROOT/pages/getting-started.adoc +++ b/spring-ai-docs/src/main/antora/modules/ROOT/pages/getting-started.adoc @@ -7,7 +7,44 @@ This section offers jumping off points for how to get started using Spring AI. The Spring AI project provides artifacts in the Spring Milestone and Snapshot repositories. -You need to add references to the Spring Milestone and/or Snapshot repositories in your build file. +=== Bill of Materials + +The Spring AI Bill of Materials (BOM) declares the recommended versions of all the dependencies used by a given release of Spring AI. +Using the BOM from your application’s build script avoids the need for you to specify and maintain the dependency versions yourself. +Instead, the version of the BOM you’re using determines the utilized dependency versions. +It also ensures that you’re using supported and tested versions of the dependencies by default, unless you choose to override them. + +If you’re a Maven user, you can use the BOM by adding the following to your pom.xml file - + +[source,xml] +---- + + + + org.springframework.ai + spring-ai-bom + {project-version} + pom + import + + + +---- + +Gradle users can also use the Spring AI BOM by leveraging Gradle (5.0+) native support for declaring dependency constraints using a Maven BOM. +This is implemented by adding a 'platform' dependency handler method to the dependencies section of your Gradle build script. +As shown in the snippet below this can then be followed by version-less declarations of the Starter Dependencies for the one or more spring-ai modules you wish to use, e.g. spring-ai-openai. + +[source,gradle] +---- +dependencies { + implementation platform("org.springframework.ai:spring-ai-bom:${springAiVersion}") + // Replace the following with the starter dependencies of specific modules you wish to use + implementation 'org.springframework.ai:spring-ai-openai' +} +---- + +To use the Milestone and Snapshot version, you need to add references to the Spring Milestone and/or Snapshot repositories in your build file. For Maven, add the following repository definitions as needed: @@ -44,23 +81,45 @@ repositories { } ---- +== Embeddings Models +* xref:api/embeddings.adoc[Embeddings API] +** xref:api/embeddings/openai-embeddings.adoc[Spring AI OpenAI Embeddings] +** xref:api/embeddings/azure-openai-embeddings.adoc[Spring AI Azure OpenAI Embeddings] +** xref:api/embeddings/ollama-embeddings.adoc[Spring AI Ollama Embeddings] +** xref:api/embeddings/onnx.adoc[Spring AI Transformers (ONNX) Embeddings] +** xref:api/embeddings/postgresml-embeddings.adoc[Spring AI PostgresML Embeddings] +** xref:api/embeddings/bedrock-cohere-embedding.adoc[Spring AI Bedrock Cohere Embeddings] +** xref:api/embeddings/bedrock-titan-embedding.adoc[Spring AI Bedrock Titan Embeddings] +** xref:api/embeddings/vertexai-embeddings.adoc[Spring AI VertexAI Embeddings] == Chat Models +* xref:api/chatclient.adoc[Chat Completion API] +** xref:api/clients/openai-chat.adoc[OpenAI Chat Completion] +** xref:api/clients/azure-openai-chat.adoc[Microsoft Azure Open AI Chat Completion] +** xref:api/clients/ollama-chat.adoc[Ollama Chat Completion] +** xref:api/clients/huggingface.adoc[HuggingFace Chat Completion] (no streaming support) +** xref:api/clients/vertexai-chat.adoc[Google Vertex Chat Completion] (no streaming support) +** xref:api/bedrock.adoc[Amazon Bedrock] +*** xref:api/clients/bedrock/bedrock-cohere.adoc[Cohere Chat Completion] +*** xref:api/clients/bedrock/bedrock-llama2.adoc[Llama2 Chat Completion] +*** xref:api/clients/bedrock/bedrock-titan.adoc[Titan Chat Completion] +*** xref:api/clients/bedrock/bedrock-anthropic.adoc[Anthropic Chat Completion] +// ** xref:api/clients/bedrock/bedrock-jurassic.adoc[Jurassic2 Chat Completion] (WIP, no streaming support) + + +== Vector Databases +* xref:api/vectordbs.adoc[Vector Database API] +** xref:api/vectordbs/azure.adoc[ Azure Vector Search] - The https://learn.microsoft.com/en-us/azure/search/vector-search-overview[Azure] vector store. +** xref:api/vectordbs/chroma.adoc[ChromaVectorStore] - The https://www.trychroma.com/[Chroma] vector store. +** xref:api/vectordbs/milvus.adoc[MilvusVectorStore] - The https://milvus.io/[Milvus] vector store. +** xref:api/vectordbs/neo4j.adoc[Neo4jVectorStore] - The https://neo4j.com/[Neo4j] vector store. +** xref:api/vectordbs/pgvector.adoc[PgVectorStore] - The https://github.com/pgvector/pgvector[PostgreSQL/PGVector] vector store. +** xref:api/vectordbs/pinecone.adoc[PineconeVectorStore] - https://www.pinecone.io/[PineCone] vector store. +** xref:api/vectordbs/redis.adoc[RedisVectorStore] - The https://redis.io/[Redis] vector store. +** xref:api/vectordbs/weaviate.adoc[WeaviateVectorStore] - The https://weaviate.io/[Weaviate] vector store. +** link:https://github.com/spring-projects/spring-ai/blob/main/spring-ai-core/src/main/java/org/springframework/ai/vectorstore/SimpleVectorStore.java[SimpleVectorStore] - A simple implementation of persistent vector storage, good for educational purposes. -* xref:api/clients/openai-chat.adoc[OpenAI] -* xref:api/clients/azure-openai-chat.adoc[Azure OpenAI] -* xref:api/clients/huggingface.adoc[HuggingFace] -* xref:api/bedrock.adoc[Bedrock] -* xref:api/clients/ollama-chat.adoc[Ollama] - -== Embedding Models - -* xref:api/embeddings/openai-embeddings.adoc[OpenAI Embeddings] -* xref:api/embeddings/azure-openai-embeddings.adoc[Azure OpenAI Embeddings] -* xref:api/embeddings/ollama-embeddings.adoc[Ollama Embeddings] -* xref:api/embeddings/onnx.adoc[Transformers (ONNX) Embeddings] -* xref:api/embeddings/postgresml-embeddings.adoc[PostgresML Embeddings] == Spring CLI