---
title: "清空会话消息"
method: DELETE
path: "/sessions/{id}/messages"
tags: ["会话"]
---

# 清空会话消息

`DELETE /sessions/{id}/messages`

删除会话中的所有消息，同时清除 LLM 上下文和聊天历史知识库条目。会话本身保留。

## Path parameters

- `id` string, required

## Response `200`

清空成功

- object

## Other responses

- `400` — 请求参数错误
- `404` — 会话不存在

---

[API](https://skmtc.net/tencentblueking/apis/weknora-api.md) · [All operations](https://skmtc.net/tencentblueking/apis/weknora-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tencentblueking/weknora-api/versions/d6921ae22ce0/schema)
