Skip to main content
POST
/
api
/
v1
/
knowledge
/
bases
/
{kb_uuid}
/
retrieve
检索知识库
curl --request POST \
  --url http://localhost:5300/api/v1/knowledge/bases/{kb_uuid}/retrieve \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "query": "<string>",
  "retrieval_settings": {
    "top_k": 123
  }
}
'
{
  "code": 0,
  "data": {
    "results": [
      {}
    ]
  }
}

Authorizations

X-API-Key
string
header
required

Path Parameters

kb_uuid
string<uuid>
required

Body

application/json
query
string
required

检索查询文本

retrieval_settings
object

检索参数(如 top_k 等)

Response

200 - application/json

成功

code
integer
Example:

0

data
object