---
title: "搜索历史对话"
method: POST
path: "/messages/search"
tags: ["消息"]
---

# 搜索历史对话

`POST /messages/search`

通过关键词和/或向量相似度搜索历史对话记录，支持关键词、向量、混合三种模式

## Request body

- InternalHandlerSearchMessagesRequest
  - `limit` integer — Maximum number of results to return (default: 20)
  - `mode` string — Search mode: "keyword", "vector", "hybrid" (default: "hybrid")
  - `query` string, required — Query text for search
  - `session_ids` string[] — Filter by specific session IDs (optional)

## Response `200`

搜索结果

- object

## Other responses

- `400` — 请求参数错误

---

[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/revisions/d6921ae22ce0/schema)
