ChatCompletion
type: "io.kestra.plugin.perplexity.ChatCompletion"
Examples
Simple Perplexity chat
id: perplexity_chat
namespace: company.name
tasks:
- id: chat_completion
type: io.kestra.plugin.perplexity.ChatCompletion
apiKey: '{{ secret("PERPLEXITY_API_KEY") }}'
model: sonar
messages:
- type: USER
content: "What is Kestra?"
temperature: 0.7
Properties
apiKey *Requiredstring
API Key
The Perplexity API key used for authentication.
model *Requiredstring
Model
The Perplexity model to use (e.g., sonar
, sonar-pro
).
frequencyPenalty numberstring
0.0
Frequency Penalty
Decreases likelihood of repetition based on prior frequency. Valued between 0 and 2.0.
maxTokens integerstring
The maximum number of tokens to generate.
presencePenalty numberstring
0.0
Presence Penalty
Positive values increase the likelihood of discussing new topics. Valued between 0 and 2.0.
stream booleanstring
false
Stream
Determines whether to stream the response incrementally.
temperature numberstring
0.2
Temperature
The amount of randomness in the response, valued between 0 and 2.
topK integerstring
0
Top K
The number of tokens to keep for top-k filtering.
topP numberstring
0.9
Top P
The nucleus sampling threshold, valued between 0 and 1.
Outputs
outputText string
The generated text output
rawResponse string
Full, raw response from the API.
Definitions
io.kestra.plugin.perplexity.ChatCompletion-ChatMessage
content string
type string
SYSTEM
ASSISTANT
USER