ChatCompletion
ChatCompletion
yaml
type: "io.kestra.plugin.perplexity.ChatCompletion"Examples
yaml
id: perplexity_chat
namespace: company.team
tasks:
- id: ask_ai
type: io.kestra.plugin.perplexity.ChatCompletion
apiKey: '{{ secret("PERPLEXITY_API_KEY") }}'
model: sonar
messages:
- type: USER
content: "What is Kestra?"
temperature: 0.7
yaml
id: perplexity_structured
namespace: company.name
tasks:
- id: chat_completion_structured
type: io.kestra.plugin.perplexity.ChatCompletion
apiKey: '{{ secret("PERPLEXITY_API_KEY") }}'
model: sonar
messages:
- type: USER
content: "Make a JSON todo from this casual note: schedule team check-in next week; tags: work, planning;"
jsonResponseSchema: |
{
"type": "object",
"additionalProperties": false,
"required": ["title", "done", "tags"],
"properties": {
"title": { "type": "string" },
"done": { "type": "boolean" },
"tags": { "type": "array", "items": { "type": "string" } },
"notes": { "type": "string" }
}
}
Properties
apiKey *Requiredstring
messages *Requiredarray
Definitions
io.kestra.plugin.perplexity.ChatCompletion-ChatMessage
contentstring
typestring
Possible Values
SYSTEMASSISTANTUSERmodel *Requiredstring
frequencyPenalty numberstring
Default
0.0jsonResponseSchema string
maxTokens integerstring
presencePenalty numberstring
Default
0.0stream booleanstring
Default
falsetemperature numberstring
Default
0.2topK integerstring
Default
0topP numberstring
Default
0.9