ChatCompletion​Chat​Completion

yaml
type: "io.kestra.plugin.perplexity.ChatCompletion"

Simple Perplexity chat

yaml
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

API Key

The Perplexity API key used for authentication.

Messages

List of chat messages in conversational order.

Model

The Perplexity model to use (e.g., sonar, sonar-pro).

Default 0.0

Frequency Penalty

Decreases likelihood of repetition based on prior frequency. Valued between 0 and 2.0.

The maximum number of tokens to generate.

Default 0.0

Presence Penalty

Positive values increase the likelihood of discussing new topics. Valued between 0 and 2.0.

Default false

Stream

Determines whether to stream the response incrementally.

Default 0.2

Temperature

The amount of randomness in the response, valued between 0 and 2.

Default 0

Top K

The number of tokens to keep for top-k filtering.

Default 0.9

Top P

The nucleus sampling threshold, valued between 0 and 1.

The generated text output

Full, raw response from the API.

Possible Values
SYSTEMASSISTANTUSER