ChatCompletion ​Chat​Completion

yaml
type: "io.kestra.plugin.ai.completion.chatcompletion"
yaml
id: chat_completion
namespace: company.ai

inputs:
  - id: prompt
    type: STRING

tasks:
  - id: chat_completion
    type: io.kestra.plugin.ai.completion.ChatCompletion
    provider:
      type: io.kestra.plugin.ai.provider.GoogleGemini
      apiKey: "{{ kv('GOOGLE_API_KEY') }}"
      modelName: gemini-2.5-flash
    messages:
      - type: SYSTEM
        content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
      - type: USER
        content: "{{inputs.prompt}}"

yaml
id: chat_completion_with_tools
namespace: company.ai

inputs:
  - id: prompt
    type: STRING

tasks:
  - id: chat_completion_with_tools
    type: io.kestra.plugin.ai.completion.ChatCompletion
    provider:
      type: io.kestra.plugin.ai.provider.GoogleGemini
      apiKey: "{{ kv('GOOGLE_API_KEY') }}"
      modelName: gemini-2.5-flash
    messages:
      - type: SYSTEM
        content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
      - type: USER
        content: "{{inputs.prompt}}"
    tools:
      - type: io.kestra.plugin.ai.tool.GoogleCustomWebSearch
        apiKey: "{{ kv('GOOGLE_SEARCH_API_KEY') }}"
        csi: "{{ kv('GOOGLE_SEARCH_CSI') }}"

yaml
id: structured-output
namespace: company.ai

inputs:
  - id: prompt
    type: STRING
    defaults: |
      Hello, my name is John. I was born on January 1, 2000.

tasks:
  - id: ai-agent
    type: io.kestra.plugin.ai.completion.ChatCompletion
    provider:
      type: io.kestra.plugin.ai.provider.GoogleGemini
      modelName: gemini-2.5-flash
      apiKey: "{{ kv('GEMINI_API_KEY') }}"
    configuration:
      responseFormat:
        type: JSON
        jsonSchema:
          type: object
          properties:
            name:
              type: string
            birth:
              type: string
      messages:
      - type: USER
        content: "{{inputs.prompt}}"
Properties
Possible Values
STOPLENGTHTOOL_EXECUTIONCONTENT_FILTEROTHER
SubType string
Possible Values
SYSTEMAIUSER
SubType string
SubType string
Default false
Default false
Format date-time
SubType string
Default false
Default false
Format duration
SubType
Default https://api.deepseek.com/v1
Possible Values
STOPLENGTHTOOL_EXECUTIONCONTENT_FILTEROTHER
Default TEXT
Possible Values
TEXTJSON
SubType string
SubType string
SubType string
Default false
SubType string
Default false
Default false
Format duration
Default COHERE
Possible Values
COHERETITAN