We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16ebde7 commit b2f4217Copy full SHA for b2f4217
genai/embeddings/embeddings_docretrieval_with_txt.py
@@ -20,15 +20,11 @@ def embed_content() -> str:
20
21
client = genai.Client()
22
response = client.models.embed_content(
23
- model="text-embedding-005",
24
- contents=[
25
- "How do I get a driver's license/learner's permit?",
26
- "How do I renew my driver's license?",
27
- "How do I change my address on my driver's license?",
28
- ],
+ model="gemini-embedding-001",
+ contents="How do I get a driver's license/learner's permit?",
29
config=EmbedContentConfig(
30
task_type="RETRIEVAL_DOCUMENT", # Optional
31
- output_dimensionality=768, # Optional
+ output_dimensionality=3072, # Optional
32
title="Driver's License", # Optional
33
),
34
)
0 commit comments