Google Vertex AI
Google Vertex AI provides text embedding models. seekdb provides a GoogleVertexEmbeddingFunction wrapper so you can generate embeddings via Vertex AI and use them with seekdb collections.
tip
Using Google Vertex AI service requires you to follow Google Cloud's pricing rules and may incur corresponding fees. Before proceeding, please visit their official website or refer to relevant documentation to confirm and accept their pricing standards. If you do not agree, please do not proceed.
Dependencies and authentication
GoogleVertexEmbeddingFunction calls the Vertex AI embedding API via the Google Cloud SDK. In practice, you typically need:
- A Google Cloud project with Vertex AI enabled and permission to invoke embedding models
- Python packages:
pyseekdbandgoogle-cloud-aiplatform - Google Application Default Credentials (ADC) configured for your environment
Example: create a Google Vertex AI embedding function
from pyseekdb.utils.embedding_functions import GoogleVertexEmbeddingFunction
ef = GoogleVertexEmbeddingFunction(
project_id="your-project-id",
model_name="textembedding-gecko",
)
Parameters
project_id: your Google Cloud project ID.model_name: the Vertex AI embedding model name (for example,textembedding-gecko).