Reference documentation and code samples for the Google Cloud Vector Search V1 Client class VertexEmbeddingConfig.
Message describing the configuration for generating embeddings for a vector field using Vertex AI embeddings API.
Generated from protobuf message google.cloud.vectorsearch.v1.VertexEmbeddingConfig
Namespace
Google \ Cloud \ VectorSearch \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ model_id |
string
Required. Required: ID of the embedding model to use. See https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models for the list of supported models. |
↳ text_template |
string
Optional. Text template for the input to the model. The template must contain one or more references to fields in the DataObject, e.g.: "Movie Title: {title} ---- Movie Plot: {plot}". Required when using the text-only path. |
↳ task_type |
int
Optional. Optional: Task type for the embeddings. Required for text-only embedding models, see https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/embeddings/task-types Not needed for multi modal embedding models, see https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/embeddings/get-multimodal-embeddings#specify-task-instructions |
getModelId
Required. Required: ID of the embedding model to use. See https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models for the list of supported models.
| Returns | |
|---|---|
| Type | Description |
string |
|
setModelId
Required. Required: ID of the embedding model to use. See https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models for the list of supported models.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getTextTemplate
Optional. Text template for the input to the model. The template must contain one or more references to fields in the DataObject, e.g.: "Movie Title: {title} ---- Movie Plot: {plot}".
Required when using the text-only path.
| Returns | |
|---|---|
| Type | Description |
string |
|
setTextTemplate
Optional. Text template for the input to the model. The template must contain one or more references to fields in the DataObject, e.g.: "Movie Title: {title} ---- Movie Plot: {plot}".
Required when using the text-only path.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getTaskType
Optional. Optional: Task type for the embeddings. Required for text-only embedding models, see https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/embeddings/task-types Not needed for multi modal embedding models, see https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/embeddings/get-multimodal-embeddings#specify-task-instructions
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type EmbeddingTaskType. |
setTaskType
Optional. Optional: Task type for the embeddings. Required for text-only embedding models, see https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/embeddings/task-types Not needed for multi modal embedding models, see https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/embeddings/get-multimodal-embeddings#specify-task-instructions
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type EmbeddingTaskType. |
| Returns | |
|---|---|
| Type | Description |
$this |
|