This plugin is currently in beta. While it is considered safe for use, please be aware that its API could change in ways that are not compatible with earlier versions in future releases, or it might become unsupported.
Chat completion with AI models.
Handles chat interactions using AI models (OpenAI, Ollama, Gemini, Anthropic, MistralAI, Deepseek).
type: "io.kestra.plugin.langchain4j.chatcompletion"
Chat completion with Google Gemini
id: chat_completion
namespace: company.team
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.core.plugin.langchain4j.ChatCompletion
provider:
type: io.kestra.plugin.langchain4j.provider.GoogleGemini
apiKey: "{{secret('GOOGLE_API_KEY')}}"
modelName: gemini-2.0-flash
messages:
- type: SYSTEM
content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
- type: USER
content: "{{inputs.prompt}}"
Chat Completion with Google Gemini and a WebSearch tool
id: chat_completion_with_tools
namespace: company.team
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion_with_tools
type: io.kestra.core.plugin.langchain4j.ChatCompletion
provider:
type: io.kestra.plugin.langchain4j.provider.GoogleGemini
apiKey: "{{secret('GOOGLE_API_KEY')}}"
modelName: gemini-2.0-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.langchain4j.tool.GoogleCustomWebSearch
apiKey: "{{ secret('GOOGLE_SEARCH_API_KEY') }}"
csi: "{{ secret('GOOGLE_SEARCH_CSI') }}"
AI Response
The generated response from the AI
STOP
LENGTH
TOOL_EXECUTION
CONTENT_FILTER
OTHER
Finish reason
Token usage
Endpoint URL
Project location
Model name
Project ID
SYSTEM
AI
USER
API endpoint
The Azure OpenAI endpoint in the format: https://{resource}.openai.azure.com/
Model name
API Key
Client ID
Client secret
API version
Tenant ID
API Key
Model name
https://api.deepseek.com/v1
API base URL
API Key
Model name
API Key
Model name
API base URL
API Key
Model endpoint
Model name
seed
Temperature
topK
topP
API Key
Model name
AWS Access Key ID
Model name
AWS Secret Access Key
COHERE
COHERE
TITAN
Amazon Bedrock Embedding Model Type
API Key
Model name
API base URL
The MCP client command, as a list of command parts.
Environment variables
API Key
API Key
SSE URL to the MCP server
duration
Connection timeout