yaml
type: "io.kestra.plugin.gcp.vertexai.ChatCompletion"

Chat completion using the Vertex AI for Google's Gemini large language models (LLM).

Examples

Chat completion using the Vertex AI Gemini API.

yaml
id: gcp_vertexai_chat_completion
namespace: company.team

tasks:
  - id: chat_completion
    type: io.kestra.plugin.gcp.vertexai.ChatCompletion
    region: us-central1
    projectId: my-project
    context: I love jokes that talk about sport
    messages:
      - author: user
        content: Please tell me a joke

Properties

messages

Chat messages.

Messages appear in chronological order: oldest first, newest last. When the history of messages causes the input to exceed the maximum length, the oldest messages are removed until the entire prompt is within the allowed limit.

region

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

The GCP region.

context

  • Type: string
  • Dynamic: ✔️
  • Required:

For backward compatibility, since migration to Gemini LLM this property will be the first message to be send to the chat.

examples

This property is not used anymore since migration to Gemini LLM.

history

Conversation history provided to the model.

Messages appear in chronological order: oldest first, newest last. When the history of messages causes the input to exceed the maximum length, the oldest messages are removed until the entire prompt is within the allowed limit.

impersonatedServiceAccount

  • Type: string
  • Dynamic: ✔️
  • Required:

The GCP service account to impersonate.

parameters

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

predictions

Definitions

io.kestra.plugin.gcp.vertexai.ChatCompletion-Example

  • input
    • Type: string
    • Dynamic: ✔️
    • Required: ✔️
  • output
    • Type: string
    • Dynamic: ✔️
    • Required: ✔️

io.kestra.plugin.gcp.vertexai.AbstractGenerativeAi-Prediction

io.kestra.plugin.gcp.vertexai.ChatCompletion-Message

  • content
    • Type: string
    • Dynamic: ✔️
    • Required: ✔️
  • author
    • Type: string
    • 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

io.kestra.plugin.gcp.vertexai.AbstractGenerativeAi-Citation

  • citations
    • Type: array
    • SubType: string
    • Dynamic:
    • Required: