ChatCompletion
yaml
type: "io.kestra.plugin.deepseek.chatcompletion"
Examples
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.
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
Outputs
raw string
response string
Definitions
io.kestra.plugin.deepseek.ChatCompletion-ChatMessage
content string
type string
Possible Values
SYSTEM
ASSISTANT
USER