You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: integrations/google_genai/src/haystack_integrations/components/embedders/google_genai/document_embedder.py
+14-7Lines changed: 14 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -102,7 +102,9 @@ def __init__(
102
102
The name of the model to use for calculating embeddings.
103
103
The default model is `gemini-embedding-001`.
104
104
:param prefix:
105
-
A string to add at the beginning of each text.
105
+
A string to add at the beginning of each text. It can be used to specify a task type for
106
+
`gemini-embedding-2`. For available task types, see
Copy file name to clipboardExpand all lines: integrations/google_genai/src/haystack_integrations/components/embedders/google_genai/multimodal_document_embedder.py
+4-8Lines changed: 4 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -177,7 +177,7 @@ def __init__(
177
177
file_path_meta_field: str="file_path",
178
178
root_path: str|None=None,
179
179
image_size: tuple[int, int] |None=None,
180
-
model: str="gemini-embedding-2-preview",
180
+
model: str="gemini-embedding-2",
181
181
batch_size: int=6,
182
182
progress_bar: bool=True,
183
183
config: dict[str, Any] |None=None,
@@ -213,11 +213,10 @@ def __init__(
213
213
:param progress_bar:
214
214
If `True`, shows a progress bar when running.
215
215
:param config:
216
-
A dictionary of keyword arguments to configure embedding content configuration `types.EmbedContentConfig`.
216
+
A dictionary of keyword arguments to configure embedding content configuration.
217
217
You can for example set the output dimensionality of the embedding: `{"output_dimensionality": 768}`.
218
-
It also allows customizing the task type. If the task type is not specified, it defaults to
219
-
`{"task_type": "RETRIEVAL_DOCUMENT"}`.
220
-
For more information, see the [Google AI documentation](https://ai.google.dev/gemini-api/docs/embeddings#task-types).
218
+
See [Google API documentation](https://googleapis.github.io/python-genai/genai.html#genai.types.EmbedContentConfig)
0 commit comments