WeaviateEx.API.Vectorizers.Text2VecCohere (WeaviateEx v0.7.4)
View SourceText2Vec-Cohere vectorizer configuration.
Uses Cohere's embedding models for text vectorization.
Example
# Basic usage with model
Text2VecCohere.new(model: "embed-english-v3.0")
# With dimensions and truncation
Text2VecCohere.new(
model: "embed-multilingual-v3.0",
dimensions: 512,
truncate: :end
)
# Full configuration
Text2VecCohere.new(
model: "embed-english-v3.0",
dimensions: 384,
truncate: :end,
base_url: "https://api.cohere.ai",
vectorize_collection_name: false
)
Summary
Functions
Parse configuration from API response.
Create a new Text2Vec-Cohere configuration.
Convert configuration to API format.
Returns the vectorizer name for the API.
Types
@type t() :: %WeaviateEx.API.Vectorizers.Text2VecCohere{ base_url: String.t() | nil, dimensions: pos_integer() | nil, model: String.t() | nil, truncate: truncate_mode() | nil, vectorize_collection_name: boolean() }
@type truncate_mode() :: :none | :start | :end
Functions
Parse configuration from API response.
Create a new Text2Vec-Cohere configuration.
Options
:model- Cohere model name (e.g., "embed-english-v3.0", "embed-multilingual-v3.0"):dimensions- Output dimensions:truncate- Truncation mode::none,:start, or:end:base_url- Custom Cohere API endpoint:vectorize_collection_name- Include collection name in vectorization (default: true)
Convert configuration to API format.
@spec vectorizer_name() :: String.t()
Returns the vectorizer name for the API.