 ChatCompletion
ChatCompletion
type: "io.kestra.plugin.deepseek.ChatCompletion"Examples
Chat completion with DeepSeek
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)
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
apiKey *Requiredstring
API Key
The DeepSeek API key used for authentication
modelName *Requiredstring
Model name
The name of the DeepSeek model to use, e.g. deepseek-chat or deepseek-coder
baseUrl string
https://api.deepseek.com/v1Base URL
The base URL of the DeepSeek API. Using the /v1 URL allows to be compatible with OpenAI.
jsonResponseSchema string
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.
Outputs
raw string
response string
Definitions
io.kestra.plugin.deepseek.ChatCompletion-ChatMessage
content string
type string
SYSTEMASSISTANTUSER