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.
Classify text with AI models.
The task is currently compatible with OpenAI, Ollama, and Gemini models.
type: "io.kestra.plugin.langchain4j.classification"
Text Classification using Gemini
id: text_classification
namespace: company.team
task:
id: text_classification
type: io.kestra.core.plugin.langchain4j.Classification
prompt: "Classify the sentiment of this sentence: 'I love this product!'"
classes:
- positive
- negative
- neutral
provider:
type: io.kestra.plugin.langchain4j.provider.GoogleGemini
apiKey: "{{secret('GOOGLE_API_KEY')}}"
modelName: gemini-2.0-flash
Classification Options
The list of possible classification categories.
Text prompt
The input text to classify.
Language Model Provider
{}
Chat configuration
Classification Result
The classified category of the input text.
STOP
LENGTH
TOOL_EXECUTION
CONTENT_FILTER
OTHER
Finish reason
Token usage
seed
Temperature
topK
topP
Endpoint URL
Project location
Model name
Project ID
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
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
API Key
Model name
API Key
Model name
API base URL
Model endpoint
Model name