MultimodalCompletion
yaml
type: "io.kestra.plugin.gcp.vertexai.MultimodalCompletion"
Multimodal completion using the Vertex AI Gemini large language models (LLM).
See Overview of multimodal models for more information.
Examples
Text completion using the Vertex Gemini API
yaml
id: gcp_vertexai_multimodal_completion
namespace: company.team
tasks:
- id: multimodal_completion
type: io.kestra.plugin.gcp.vertexai.MultimodalCompletion
region: us-central1
projectId: my-project
contents:
- content: Please tell me a joke
Multimodal completion using the Vertex Gemini API
yaml
id: gcp_vertexai_multimodal_completion
namespace: company.team
inputs:
- id: image
type: FILE
tasks:
- id: multimodal_completion
type: io.kestra.plugin.gcp.vertexai.MultimodalCompletion
region: us-central1
projectId: my-project
contents:
- content: Can you describe this image?
- mimeType: image/jpeg
content: "{{ inputs.image }}"
Properties
contents
- Type: array
- SubType: MultimodalCompletion-Content
- Dynamic: ✔️
- Required: ✔️
- Min items:
1
The contents.
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.
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
blocked
- Type: boolean
- Required: ❌
- Default:
false
finishReason
- Type: string
- Required: ❌
safetyRatings
- Type: array
- SubType: MultimodalCompletion-SafetyRating
- Required: ❌
text
- Type: string
- Required: ❌
Definitions
io.kestra.plugin.gcp.vertexai.MultimodalCompletion-Content
content
- Type: string
- Dynamic: ❌
- Required: ✔️
mimeType
- Type: string
- Dynamic: ✔️
- Required: ❌
io.kestra.plugin.gcp.vertexai.MultimodalCompletion-SafetyRating
blocked
- Type: boolean
- Dynamic: ❌
- Required: ❓
category
- Type: string
- Dynamic: ❌
- Required: ❓
probability
- Type: string
- 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