haive.core.engine.embedding.providers.GoogleVertexAIEmbeddingConfigΒΆ
Google Vertex AI embedding configuration.
ClassesΒΆ
Configuration for Google Vertex AI embeddings. |
Module ContentsΒΆ
- class haive.core.engine.embedding.providers.GoogleVertexAIEmbeddingConfig.GoogleVertexAIEmbeddingConfig[source]ΒΆ
Bases:
haive.core.engine.embedding.base.BaseEmbeddingConfig
Configuration for Google Vertex AI embeddings.
This configuration provides access to Googleβs Vertex AI embedding models including text-embedding-004, text-multilingual-embedding-002, and others.
Examples
Basic usage:
config = GoogleVertexAIEmbeddingConfig( name="vertex_embeddings", model="text-embedding-004", project="your-project-id", location="us-central1" ) embeddings = config.instantiate()
With custom task type:
config = GoogleVertexAIEmbeddingConfig( name="vertex_embeddings", model="text-embedding-004", project="your-project-id", location="us-central1", task_type="SEMANTIC_SIMILARITY" )
Using service account:
config = GoogleVertexAIEmbeddingConfig( name="vertex_embeddings", model="text-embedding-004", project="your-project-id", location="us-central1", credentials_path="/path/to/service-account.json" )
- embedding_typeΒΆ
Always EmbeddingType.GOOGLE_VERTEX_AI
- modelΒΆ
Vertex AI model name (e.g., βtext-embedding-004β)
- projectΒΆ
Google Cloud project ID
- locationΒΆ
Google Cloud location/region
- task_typeΒΆ
Task type for embeddings
- credentials_pathΒΆ
Path to service account credentials
- instantiate()[source]ΒΆ
Create a Google Vertex AI embeddings instance.
- Returns:
VertexAIEmbeddings instance configured with the provided parameters
- Raises:
ImportError β If langchain-google-vertexai is not installed
ValueError β If configuration is invalid
- Return type:
Any