Google Vertex AI
Google Vertex AI provides text embedding models. seekdb provides GoogleVertexEmbeddingFunction 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
- Have a Google Cloud project with Vertex AI enabled and permission to invoke embedding models.
- Configure Application Default Credentials (ADC) for your environment.
Installation
npm i seekdb @seekdb/google-vertex
Example: create a Google Vertex AI embedding function
import { GoogleVertexEmbeddingFunction } from "@seekdb/google-vertex";
const ef = new GoogleVertexEmbeddingFunction({
projectId: "your-gcp-project-id",
modelName: "textembedding-gecko",
});
Configurations:
- projectId: Google Cloud project ID (required).
- location: Vertex AI region (default:
"us-central1"). - modelName: Embedding model name (default:
"textembedding-gecko").