Skip to content

Commit 11eba60

Browse files
authored
Title vs content difference for Gemini Embedding (run-llama#9547)
Title vs content diff for Gemini Emb
1 parent f9a14df commit 11eba60

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llama_index/embeddings/gemini.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ class GeminiEmbedding(BaseEmbedding):
1818
"""
1919

2020
_model: Any = PrivateAttr()
21-
## TBD: whether put title and task_type in the init or not
2221
title: Optional[str] = Field(
2322
default="",
24-
description="The title for the content for the embedding model.",
23+
description="Title is only applicable for retrieval_document tasks, and is used to represent a document title. For other tasks, title is invalid.",
2524
)
2625
task_type: Optional[str] = Field(
2726
default="retrieval_document",
@@ -92,7 +91,8 @@ def _get_text_embeddings(self, texts: List[str]) -> List[List[float]]:
9291
]
9392

9493
### Async methods ###
95-
# need to wait async calls from Gemini side to be implemented
94+
# need to wait async calls from Gemini side to be implemented.
95+
# Issue: https://github.com/google/generative-ai-python/issues/125
9696
async def _aget_query_embedding(self, query: str) -> List[float]:
9797
"""The asynchronous version of _get_query_embedding."""
9898
return self._get_query_embedding(query)

0 commit comments

Comments
 (0)