问答

在知识库中搜索(不使用LLM总结)。与产品内问答使用同一检索流程(召回、rerank、合并),外部检索首选;可覆盖召回参数与 rerank

post/knowledge-search

Request

  • Base URL
    /api/v1 (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/v1/knowledge-search
  • Auth
    • API key in header Authorization
    • or API key in header X-API-Key

Query parameters

resource_urls'handle' | 'public'

文件引用形式,public 返回可加载直链

Request body

disable_keywords_matchboolean

Vector recall only

disable_vector_matchboolean

Keyword recall only

keyword_thresholdnumber

Minimum keyword score

knowledge_base_idstring

Single knowledge base ID (for backward compatibility)

knowledge_base_idsstring[]

IDs of knowledge bases to search (multi-KB support)

knowledge_idsstring[]

IDs of specific knowledge (files) to search

match_countinteger

Number of results to return

querystring required

Query text to search for

tag_idsstring[]

Tag IDs for filtering within a single KB

vector_thresholdnumber

Optional overrides of the tenant retrieval config. Omitted fields keep it.

Response

搜索结果

object required

Changes