Skip to content

Commit 8fc5894

Browse files
authored
feat: add GoogleGenAIMultimodalDocumentEmbedder to support gemini-embedding-2 (#2944)
* feat: add GoogleGenAIMultimodalDocumentEmbedder to support gemini-embedding-2 * refinements * fix tests
1 parent 95f7786 commit 8fc5894

6 files changed

Lines changed: 743 additions & 2 deletions

File tree

integrations/google_genai/pydoc/config_docusaurus.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ loaders:
33
- haystack_integrations.components.generators.google_genai.chat.chat_generator
44
- haystack_integrations.components.embedders.google_genai.document_embedder
55
- haystack_integrations.components.embedders.google_genai.text_embedder
6+
- haystack_integrations.components.embedders.google_genai.multimodal_document_embedder
67
search_path: [../src]
78
processors:
89
- type: filter

integrations/google_genai/src/haystack_integrations/components/embedders/google_genai/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#
33
# SPDX-License-Identifier: Apache-2.0
44
from .document_embedder import GoogleGenAIDocumentEmbedder
5+
from .multimodal_document_embedder import GoogleGenAIMultimodalDocumentEmbedder
56
from .text_embedder import GoogleGenAITextEmbedder
67

7-
__all__ = ["GoogleGenAIDocumentEmbedder", "GoogleGenAITextEmbedder"]
8+
__all__ = ["GoogleGenAIDocumentEmbedder", "GoogleGenAIMultimodalDocumentEmbedder", "GoogleGenAITextEmbedder"]

integrations/google_genai/src/haystack_integrations/components/embedders/google_genai/document_embedder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def __init__(
101101
Required when using Vertex AI with Application Default Credentials.
102102
:param model:
103103
The name of the model to use for calculating embeddings.
104-
The default model is `text-embedding-ada-002`.
104+
The default model is `gemini-embedding-001`.
105105
:param prefix:
106106
A string to add at the beginning of each text.
107107
:param suffix:

0 commit comments

Comments
 (0)