Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,30 @@

This guide helps you migrate from the old Vertex AI-based autoconfiguration to the new Google GenAI SDK-based autoconfiguration.

## Starter Dependencies

Spring AI provides separate starters for Google GenAI functionality:

### Chat Functionality
```xml
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-model-google-genai</artifactId>
<version>1.1.0-SNAPSHOT</version>
</dependency>
```

### Embedding Functionality
```xml
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-model-google-genai-embedding</artifactId>
<version>1.1.0-SNAPSHOT</version>
</dependency>
```

**Note**: If you need both chat and embedding capabilities, include both starters in your project. The starters are designed to be used independently or together based on your requirements.

## Key Changes

### 1. Property Namespace Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
* @since 1.1.0
*/
@AutoConfiguration
@ConditionalOnClass(Client.class)
@ConditionalOnClass({ Client.class, GoogleGenAiEmbeddingConnectionDetails.class })
@EnableConfigurationProperties(GoogleGenAiEmbeddingConnectionProperties.class)
public class GoogleGenAiEmbeddingConnectionAutoConfiguration {

Expand Down
40 changes: 37 additions & 3 deletions models/spring-ai-google-genai-embedding/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# Google Gen AI Embeddings module
# Google GenAI Embeddings Module

Please note that at this time the *spring-ai-google-genai-embedding* module supports only text embeddings only.
[Google GenAI Text Embeddings Documentation](https://docs.spring.io/spring-ai/reference/api/embeddings/google-genai-embeddings-text.html)

This is due to the fact that the Google GenAI SDK supports text embeddings only, with multimedia embeddings pending.
## Overview

The Google GenAI Embeddings module provides text embedding generation using Google's embedding models through either the Gemini Developer API or Vertex AI.

## Current Support

Please note that at this time the *spring-ai-google-genai-embedding* module supports **text embeddings only**.

This is due to the fact that the Google GenAI SDK currently supports text embeddings only, with multimodal embeddings support pending.

## Starter Dependency

```xml
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-model-google-genai-embedding</artifactId>
</dependency>
```

## Manual Configuration

```xml
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-google-genai-embedding</artifactId>
</dependency>
```

## Authentication Modes

The module supports two authentication modes:
- **Gemini Developer API**: Use an API key for quick prototyping
- **Vertex AI**: Use Google Cloud credentials for production deployments

See the [documentation](https://docs.spring.io/spring-ai/reference/api/embeddings/google-genai-embeddings-text.html) for detailed configuration instructions.
6 changes: 3 additions & 3 deletions models/spring-ai-google-genai/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[VertexAI Gemini Chat](https://docs.spring.io/spring-ai/reference/api/chat/vertexai-gemini-chat.html)
[Google GenAI Chat](https://docs.spring.io/spring-ai/reference/api/chat/google-genai-chat.html)

### Starter - WIP
### Starter
```xml
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-model-spring-ai-google-genai</artifactId>
<artifactId>spring-ai-starter-model-google-genai</artifactId>
</dependency>
```

Expand Down
8 changes: 6 additions & 2 deletions spring-ai-docs/src/main/antora/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
**** xref:api/chat/azure-openai-chat.adoc[Azure OpenAI]
**** xref:api/chat/deepseek-chat.adoc[DeepSeek]
**** xref:api/chat/dmr-chat.adoc[Docker Model Runner]
**** xref:api/chat/google-vertexai.adoc[Google VertexAI]
***** xref:api/chat/vertexai-gemini-chat.adoc[VertexAI Gemini]
**** Google
***** xref:api/chat/google-genai-chat.adoc[Google GenAI]
***** xref:api/chat/google-vertexai.adoc[Google VertexAI]
****** xref:api/chat/vertexai-gemini-chat.adoc[VertexAI Gemini]
**** xref:api/chat/groq-chat.adoc[Groq]
**** xref:api/chat/huggingface.adoc[Hugging Face]
**** xref:api/chat/mistralai-chat.adoc[Mistral AI]
Expand All @@ -39,6 +41,8 @@
***** xref:api/embeddings/bedrock-cohere-embedding.adoc[Cohere]
***** xref:api/embeddings/bedrock-titan-embedding.adoc[Titan]
**** xref:api/embeddings/azure-openai-embeddings.adoc[Azure OpenAI]
**** Google
***** xref:api/embeddings/google-genai-embeddings-text.adoc[Google GenAI Text Embedding]
**** xref:api/embeddings/mistralai-embeddings.adoc[Mistral AI]
**** xref:api/embeddings/minimax-embeddings.adoc[MiniMax]
**** xref:api/embeddings/oci-genai-embeddings.adoc[OCI GenAI]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ This table compares various Chat Models supported by Spring AI, detailing their
| xref::api/chat/anthropic-chat.adoc[Anthropic Claude] | text, pdf, image ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12]
| xref::api/chat/azure-openai-chat.adoc[Azure OpenAI] | text, image ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::no.svg[width=12] ^a| image::yes.svg[width=16]
| xref::api/chat/deepseek-chat.adoc[DeepSeek (OpenAI-proxy)] | text ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16]
| xref::api/chat/google-genai-chat.adoc[Google GenAI] | text, pdf, image, audio, video ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12]
| xref::api/chat/vertexai-gemini-chat.adoc[Google VertexAI Gemini] | text, pdf, image, audio, video ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::no.svg[width=12] ^a| image::yes.svg[width=16]
| xref::api/chat/groq-chat.adoc[Groq (OpenAI-proxy)] | text, image ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::yes.svg[width=16] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::yes.svg[width=16]
| xref::api/chat/huggingface.adoc[HuggingFace] | text ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12] ^a| image::no.svg[width=12]
Expand Down
Loading