gcp_vertex_ai_embeddings
Generates vector embeddings to represent a text string, using the Vertex AI API.
This processor sends text strings to the Vertex AI API, which generates vector embeddings for them. By default, the processor submits the entire payload of each message as a string, unless you use the text field to customize it.
# Config fields, showing default values
processor:
label: ""
gcp_vertex_ai_embeddings:
credentials_json: ""
location: us-central1
model: "" # No default (required)
output_dimensions: 0
project: "" # No default (required)
task_type: RETRIEVAL_DOCUMENT
text: ""
Examples
- Basic embeddings
- Tuned embeddings
Generate a vector embedding for each message payload using a chosen model.
processor:
gcp_vertex_ai_embeddings:
project: my-gcp-project
model: text-embedding-004
Target a specific region, optimize the embeddings for document retrieval, and truncate each vector to a fixed length.
processor:
gcp_vertex_ai_embeddings:
project: my-gcp-project
location: us-central1
model: text-embedding-004
task_type: RETRIEVAL_DOCUMENT
output_dimensions: 256
Fields
credentials_json
Set your Google Service Account Credentials as JSON. :::warning Secret This field contains sensitive information that usually shouldn't be added to a config directly, read our secrets page for more info. :::
Type: string
Default: ""
location
The location of the Vertex AI large language model (LLM) that you want to use.
Type: string
Default: "us-central1"
model
The name of the LLM to use. For a full list of models, see the Vertex AI Model Garden.
Type: string
output_dimensions
The maximum length of a generated vector embedding. If this value is set, generated embeddings are truncated to this size.
Type: int
Default: 0
project
The ID of your Google Cloud project.
Type: string
task_type
Optimize the embeddings that the model generates for a specific use case, such as document retrieval or similarity.
Type: string
Default: "RETRIEVAL_DOCUMENT"
text
The text you want to generate vector embeddings for. By default, the processor submits the entire payload as a string.
Type: string
Default: ""