VertexAITextGenerator
Generate text using Google Vertex AI generative models.
Basic Information
- Pipeline type: Query
- Components that can precede it in a pipeline:
- Components that can follow it in a pipeline:
- Required inputs:
- "prompt": A string with instructions for the model.
- Outputs:
A dictionary with the following keys:- "replies": A list of generated texts.
- "safety_attributes": A dictionary with the safety score for each answer. To learn more, see Safety Scores.
- "citations": A list of grounding citations for each answer.
Overview
VertexAITextGenerator uses the text-bison model by default, but you can replace it with any other supported model. Supported models are:
- text-bison
- text-unicorn
- text-bison-32k
Authentication
VertexAITextGenerator authenticates using Google Cloud Application Default Credentials (ADCs). For more information, see Google documentation. Use an account that can access projects authorized to use Google Vertex AI endpoints.
Usage Example
Parameters
Parameter | Type | Possible values | Description |
---|---|---|---|
model | String | text-bison text-unicorn text-bison-32k Default: text-bison | Name of the model to use. Required. |
project_id | String | ID of the GCP project to use. You can find your project ID in the GCP resource manager, or locally by running gcloud projects list in your terminal. For information on using gcloud CLI, see the official documentation.Required. | |
location | String | Default: None | The default location to use when making API calls. Optional. |
kwargs | Dictionary | Additional keyword arguments to pass to the model. |
Updated 5 months ago
Related Links