WeaviateEx.API.Vectorizers.Text2VecGoogle (WeaviateEx v0.7.4)
View SourceText2Vec-Google vectorizer configuration.
Supports both Google Vertex AI and Google AI Studio (Gemini) services.
Services
:vertex- Google Vertex AI (requires project_id):gemini- Google AI Studio (Gemini, uses generativelanguage.googleapis.com)
Vertex AI Example
Text2VecGoogle.new(
service: :vertex,
project_id: "my-project",
model: "textembedding-gecko@001"
)Gemini Example
Text2VecGoogle.new(
service: :gemini,
model: "text-embedding-004"
)
Summary
Functions
Parse configuration from API response.
Create a new Text2Vec-Google configuration.
Convert configuration to API format.
Returns the vectorizer name for the API.
Types
@type service() :: :vertex | :gemini
@type t() :: %WeaviateEx.API.Vectorizers.Text2VecGoogle{ api_endpoint: String.t() | nil, dimensions: non_neg_integer() | nil, model: String.t() | nil, project_id: String.t() | nil, service: service(), task_type: String.t() | nil, title_property: String.t() | nil, vectorize_collection_name: boolean() }
Functions
Parse configuration from API response.
Create a new Text2Vec-Google configuration.
Options
Common
:service- Service type::vertexor:gemini(default::vertex):model- Model ID:dimensions- Output dimensions:title_property- Property to use as title:task_type- Task type for embeddings (e.g., "RETRIEVAL_DOCUMENT"):vectorize_collection_name- Include collection name (default: true)
Vertex AI specific
:project_id- Google Cloud project ID (required for Vertex):api_endpoint- API endpoint (optional, default varies by region)
Gemini specific
- For Gemini,
:api_endpointdefaults to "generativelanguage.googleapis.com"
Convert configuration to API format.
@spec vectorizer_name() :: String.t()
Returns the vectorizer name for the API.