ChatCompletion​Chat​Completion

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

Chat completion with DeepSeek

yaml
id: deepseek_chat
namespace: company.team

tasks:
  - id: chat_completion
    type: io.kestra.plugin.deepseek.ChatCompletion
    apiKey: "{{ secret('DEEPSEEK_API_KEY') }}"
    modelName: deepseek-chat
    messages:
      - type: SYSTEM
        content: You are a helpful assistant.
      - type: USER
        content: What is the capital of Germany? Return only the name.

DeepSeek chat with JSON Mode (schema guidance)

yaml
id: deepseek_chat_json_mode
namespace: company.team

tasks:
  - id: chat_completion_json
    type: io.kestra.plugin.deepseek.ChatCompletion
    apiKey: "{{ secret('DEEPSEEK_API_KEY') }}"
    modelName: deepseek-chat
    messages:
      - type: USER
        content: Extract the book information from: "I recently read 'To Kill a Mockingbird' by Harper Lee." Return JSON only.
    jsonResponseSchema: |
      {
        "type": "object",
        "title": "Book",
        "additionalProperties": false,
        "required": ["name", "authors"],
        "properties": {
          "name": { "type": "string" },
          "authors": { "type": "array", "items": { "type": "string" } }
        }
      }
Properties

API Key

The DeepSeek API key used for authentication

Messages

The list of messages in the conversation history

Model name

The name of the DeepSeek model to use, e.g. deepseek-chat or deepseek-coder

Default https://api.deepseek.com/v1

Base URL

The base URL of the DeepSeek API. Using the /v1 URL allows to be compatible with OpenAI.

JSON Response Schema

JSON schema (as string) to guide JSON-only output when using DeepSeek JSON Mode. If provided, the request sets response_format = {"type": "json_object"} and prepends a system message instructing the model to output valid JSON following the given schema. DeepSeek does not currently enforce server-side schema validation; the schema is used as guidance.

Possible Values
SYSTEMASSISTANTUSER