ChatCompletion ​Chat​Completion

yaml
type: "io.kestra.plugin.perplexity.chatcompletion"
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
Default 0.0
Default 0.0
Default false
Default 0.2
Default 0
Default 0.9
Possible Values
SYSTEMASSISTANTUSER