Ask a question to get started
Enter to sendā¢Shift+Enter new line
embed_documents( self, texts: list[str], *, batch_size: int = _DEFAULT_BATCH_SIZE
texts
list[str]
The list of strings to embed.
batch_size
int
_DEFAULT_BATCH_SIZE
Batch size of embeddings to send to the model
task_type
str | None
None
titles
list[str] | None
output_dimensionality
int | None
Embed a list of strings.
Google Generative AI currently sets a max batch size of 100 strings.
Optional list of titles for texts provided.
Only applicable when TaskType is 'RETRIEVAL_DOCUMENT'.
TaskType
'RETRIEVAL_DOCUMENT'
Optional reduced dimension for the output embedding.