
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
frequencyPenaltynumberstring
Default
0.0jsonResponseSchemastring
maxTokensintegerstring
presencePenaltynumberstring
Default
0.0streambooleanstring
Default
falsetemperaturenumberstring
Default
0.2topKintegerstring
Default
0topPnumberstring
Default
0.9