StructuredOutputCompletion
Generate Structured JSON Output Using the Gemini Client.
See Gemini API about structured output completion for more information.
yaml
type: "io.kestra.plugin.gemini.StructuredOutputCompletion"
Examples
Structured JSON Output Completion using the Gemini Client.
yaml
id: gemini_structured_json_completion
namespace: company.team
tasks:
- id: gemini_structured_json_completion
type: io.kestra.plugin.gemini.StructuredOutputCompletion
apiKey: ${{ secrets.GEMINI_API_KEY }}
model: "gemini-2.5-flash-preview-05-20"
prompt: What are the weather predictions for tomorrow in London?
jsonResponseSchema: |
{
"type": "object",
"properties": {
"predictions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"content": {
"type": "string"
}
}
}
}
}
}
Properties
apiKey *Requiredstring
Gemini API Key
jsonResponseSchema *Requiredstring
jsonResponseSchema
model *Requiredstring
Model
Specifies which generative model (e.g., 'gemini-1.5-flash', 'gemini-1.0-pro') to use for the completion.
prompt *Requiredstring
Prompt
Outputs
predictions array
SubType string
List of text predictions made by the model.