File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 34
34
_EMBED_CONTENT_DOC = """Calls the API to create embeddings for content passed in.
35
35
36
36
Args:
37
- model: Which model to call, as a string or a `types.Model`.
37
+ model:
38
+ Which [model](https://ai.google.dev/models/gemini#embedding) to
39
+ call, as a string or a `types.Model`.
38
40
39
- content: Content to embed.
41
+ content:
42
+ Content to embed.
40
43
41
- task_type: Optional task type for which the embeddings will be used. Can only be set for `models/embedding-001`.
44
+ task_type:
45
+ Optional task type for which the embeddings will be used. Can only
46
+ be set for `models/embedding-001`.
42
47
43
- title: An optional title for the text. Only applicable when task_type is `RETRIEVAL_DOCUMENT`.
48
+ title:
49
+ An optional title for the text. Only applicable when task_type is
50
+ `RETRIEVAL_DOCUMENT`.
44
51
45
52
Return:
46
- Dictionary containing the embedding (list of float values) for the input content.
53
+ Dictionary containing the embedding (list of float values) for the
54
+ input content.
47
55
"""
48
56
49
57
DEFAULT_EMB_MODEL = "models/embedding-001"
You can’t perform that action at this time.
0 commit comments