TextCompletion
yaml
type: "io.kestra.plugin.gcp.vertexai.TextCompletion"
Text completion using the Vertex AI API for Google's Gemini large language models (LLM).
See Generative AI quickstart using the Vertex AI API for more information.
Examples
Text completion using the Vertex AI Gemini API.
yaml
id: gcp_vertexai_text_completion
namespace: company.team
tasks:
- id: text_completion
type: io.kestra.plugin.gcp.vertexai.TextCompletion
region: us-central1
projectId: my-project
prompt: Please tell me a joke
Properties
region
- Type: string
- Dynamic: ✔️
- Required: ✔️
The GCP region.
impersonatedServiceAccount
- Type: string
- Dynamic: ✔️
- Required: ❌
The GCP service account to impersonate.
parameters
- Type: AbstractGenerativeAi-ModelParameter
- Dynamic: ❌
- Required: ❌
- Default:
{ "temperature": 0.2, "maxOutputTokens": 128, "topK": 40, "topP": 0.95 }
The model parameters.
projectId
- Type: string
- Dynamic: ✔️
- Required: ❌
The GCP project ID.
prompt
- Type: string
- Dynamic: ✔️
- Required: ❌
Text input to generate model response.
Prompts can include preamble, questions, suggestions, instructions, or examples.
scopes
- Type: array
- SubType: string
- Dynamic: ✔️
- Required: ❌
- Default:
[ "https://www.googleapis.com/auth/cloud-platform" ]
The GCP scopes to be used.
serviceAccount
- Type: string
- Dynamic: ✔️
- Required: ❌
The GCP service account.
Outputs
predictions
- Type: array
- SubType: AbstractGenerativeAi-Prediction
- Required: ❌
Definitions
io.kestra.plugin.gcp.vertexai.AbstractGenerativeAi-Prediction
citationMetadata
- Type: AbstractGenerativeAi-CitationMetadata
- Dynamic: ❌
- Required: ❓
content
- Type: string
- Dynamic: ❌
- Required: ❓
safetyAttributes
- Type: AbstractGenerativeAi-SafetyAttributes
- Dynamic: ❌
- Required: ❓
io.kestra.plugin.gcp.vertexai.AbstractGenerativeAi-SafetyAttributes
blocked
- Type: boolean
- Dynamic: ❌
- Required: ❓
categories
- Type: array
- SubType: string
- Dynamic: ❌
- Required: ❓
scores
- Type: array
- SubType: number
- Dynamic: ❌
- Required: ❓
io.kestra.plugin.gcp.vertexai.AbstractGenerativeAi-ModelParameter
maxOutputTokens
- Type: integer
- Dynamic: ❌
- Required: ❌
- Default:
128
- Minimum:
›= 1
- Maximum:
‹= 1024
temperature
- Type: number
- Dynamic: ❌
- Required: ❌
- Default:
0.2
- Minimum:
›
- Maximum:
‹= 1
topK
- Type: integer
- Dynamic: ❌
- Required: ❌
- Default:
40
- Minimum:
›= 1
- Maximum:
‹= 40
topP
- Type: number
- Dynamic: ❌
- Required: ❌
- Default:
0.95
- Minimum:
›
- Maximum:
‹= 1
io.kestra.plugin.gcp.vertexai.AbstractGenerativeAi-CitationMetadata
citations
- Type: array
- SubType: AbstractGenerativeAi-Citation
- Dynamic: ❌
- Required: ❓
io.kestra.plugin.gcp.vertexai.AbstractGenerativeAi-Citation
citations
- Type: array
- SubType: string
- Dynamic: ❌
- Required: ❓