---
title: "获取提示词模板"
method: GET
path: "/tenants/kv/prompt-templates"
tags: ["空间管理"]
---

# 获取提示词模板

`GET /tenants/kv/prompt-templates`

## Request

- Base URL: `/api/v1` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/v1/tenants/kv/prompt-templates`
- Auth: one of:
  - API key in header `Authorization`
  - API key in header `X-API-Key`

获取系统配置的提示词模板列表

## Response `200`

提示词模板配置

- object
  - `data` GithubComTencentWeKnoraInternalConfigPromptTemplatesConfig
    - `agent_system_prompt` GithubComTencentWeKnoraInternalConfigPromptTemplate[]
      - `content` string
      - `default` boolean
      - `description` string
      - `has_knowledge_base` boolean
      - `has_web_search` boolean
      - `id` string
      - `mode` string
      - `name` string
      - `user` string
    - `context_template` GithubComTencentWeKnoraInternalConfigPromptTemplate[]
      - `content` string
      - `default` boolean
      - `description` string
      - `has_knowledge_base` boolean
      - `has_web_search` boolean
      - `id` string
      - `mode` string
      - `name` string
      - `user` string
    - `fallback` GithubComTencentWeKnoraInternalConfigPromptTemplate[]: Fallback 合并了固定回复模板和模型兜底 prompt（通过 mode:"model" 区分）
      - `content` string
      - `default` boolean
      - `description` string
      - `has_knowledge_base` boolean
      - `has_web_search` boolean
      - `id` string
      - `mode` string
      - `name` string
      - `user` string
    - `generate_kb_description` GithubComTencentWeKnoraInternalConfigPromptTemplate[]: GenerateKBDescription writes the knowledge-base gist from the document profile aggregate.
      - `content` string
      - `default` boolean
      - `description` string
      - `has_knowledge_base` boolean
      - `has_web_search` boolean
      - `id` string
      - `mode` string
      - `name` string
      - `user` string
    - `generate_questions` GithubComTencentWeKnoraInternalConfigPromptTemplate[]
      - `content` string
      - `default` boolean
      - `description` string
      - `has_knowledge_base` boolean
      - `has_web_search` boolean
      - `id` string
      - `mode` string
      - `name` string
      - `user` string
    - `generate_session_title` GithubComTencentWeKnoraInternalConfigPromptTemplate[]
      - `content` string
      - `default` boolean
      - `description` string
      - `has_knowledge_base` boolean
      - `has_web_search` boolean
      - `id` string
      - `mode` string
      - `name` string
      - `user` string
    - `generate_summary` GithubComTencentWeKnoraInternalConfigPromptTemplate[]
      - `content` string
      - `default` boolean
      - `description` string
      - `has_knowledge_base` boolean
      - `has_web_search` boolean
      - `id` string
      - `mode` string
      - `name` string
      - `user` string
    - `graph_extraction` GithubComTencentWeKnoraInternalConfigPromptTemplate[]
      - `content` string
      - `default` boolean
      - `description` string
      - `has_knowledge_base` boolean
      - `has_web_search` boolean
      - `id` string
      - `mode` string
      - `name` string
      - `user` string
    - `intent_prompts` GithubComTencentWeKnoraInternalConfigPromptTemplate[]: IntentPrompts holds per-intent system prompt overrides (template ID = intent value).
      - `content` string
      - `default` boolean
      - `description` string
      - `has_knowledge_base` boolean
      - `has_web_search` boolean
      - `id` string
      - `mode` string
      - `name` string
      - `user` string
    - `keywords_extraction` GithubComTencentWeKnoraInternalConfigPromptTemplate[]
      - `content` string
      - `default` boolean
      - `description` string
      - `has_knowledge_base` boolean
      - `has_web_search` boolean
      - `id` string
      - `mode` string
      - `name` string
      - `user` string
    - `rewrite` GithubComTencentWeKnoraInternalConfigPromptTemplate[]: Rewrite 合并了前端可选模板和运行时默认模板，每个模板同时包含 content + user
      - `content` string
      - `default` boolean
      - `description` string
      - `has_knowledge_base` boolean
      - `has_web_search` boolean
      - `id` string
      - `mode` string
      - `name` string
      - `user` string
    - `system_prompt` GithubComTencentWeKnoraInternalConfigPromptTemplate[]
      - `content` string
      - `default` boolean
      - `description` string
      - `has_knowledge_base` boolean
      - `has_web_search` boolean
      - `id` string
      - `mode` string
      - `name` string
      - `user` string
  - `success` boolean

## Other responses

- `400`: 请求参数错误

## Changes

- **2026-07-14** `1c6aac86ddd1`: 2 info
  - api tag `空间管理` added
  - api tag `租户管理` removed
- **2026-02-27** `3762795e29b6`: 1 info
  - endpoint added
- **2025-12-17** `edf61e68559d`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/tencentblueking/apis/weknora-api/changes/tenants/kv/prompt-templates/get.md)

---

[API](https://skmtc.dev/tencentblueking/apis/weknora-api.md) - [All operations](https://skmtc.dev/tencentblueking/apis/weknora-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tencentblueking/apis/weknora-api/revisions/b64b227d0d54?raw)
