ki.templates.create
Neues Prompt-Template erstellen
Hilfe
Erstellt ein neues Prompt-Template. chain_type bestimmt die Pflicht-Platzhalter: standard → {context} + {question}, agent → {tools_prompt}, unchained → keine. Template-Name muss eindeutig sein.
Parameter
| Name | Typ | Required | Default | Beschreibung |
|---|---|---|---|---|
name |
string | Ja | — | Eindeutiger Template-Name |
content |
string | Ja | — | Template-Inhalt |
label |
string | Nein | — | Anzeige-Label |
description |
string | Nein | — | Beschreibung |
final_prompt |
string | Nein | — | Finaler Prompt |
chain_type |
string | Nein | — | Typ: standard, unchained, agent (Default: standard) |
is_cloud |
boolean | Nein | — | Cloud-Template (Default: false) |
show_in_chat |
boolean | Nein | — | Im Chat anzeigen (Default: false) |
badge_color |
string | Nein | — | Badge-Farbe |
sort_order |
integer | Nein | — | Sortierung (Default: 0) |
Rueckgabe
ID und Bestaetigungsmeldung
Beispiel-Prompts
- Erstelle ein Template 'Zusammenfassung' mit chain_type standard
- Neues Agent-Template mit Name 'Recherche'
Changelog
Area: prompt_templates | Action: create
HTTP-Request (curl)
curl -X POST 'http://HOST:8502/api/admin/ki/prompt-templates' \
-H 'Cookie: kiara_admin_session=SESSION' \
-H 'X-Requested-With: XMLHttpRequest' \
-H 'Content-Type: application/json' \
-d '{
"name": "...",
"content": "...",
"label": "...",
"description": "...",
"final_prompt": "...",
"chain_type": "...",
"is_cloud": "...",
"show_in_chat": "...",
"badge_color": "...",
"sort_order": "..."
}'