v4.6.6-search test adapt diff search mode (#685)

This commit is contained in:
Archer
2024-01-03 15:40:03 +08:00
committed by GitHub
parent c766a0ed8a
commit 13b10720ac
57 changed files with 1101 additions and 612 deletions

View File

@@ -157,7 +157,7 @@ A2:
## 搜索测试
{{< tabs tabTotal="2" >}}
{{< tabs tabTotal="3" >}}
{{< tab tabName="请求示例" >}}
{{< markdownify >}}
@@ -168,18 +168,33 @@ curl --location --request POST 'https://api.fastgpt.in/api/core/dataset/searchTe
--data-raw '{
"datasetId": "知识库的ID",
"text": "导演是谁",
"rarank": true,
"limit": 20
"limit": 5000,
"similarity": 0,
"searchMode": "embedding",
"usingReRank": false
}'
```
{{< /markdownify >}}
{{< /tab >}}
{{< tab tabName="参数说明" >}}
{{< markdownify >}}
- datasetId - 知识库ID
- text - 需要测试的文本
- limit - 最大 tokens 数量
- similarity - 最低相关度0~1可选
- searchMode - 搜索模式embedding | fullTextRecall | mixedRecall
- usingReRank - 使用重排
{{< /markdownify >}}
{{< /tab >}}
{{< tab tabName="响应示例" >}}
{{< markdownify >}}
返回 top k 结果, limit 为预估条数,会按每条数据 800 tokens 的长度进行预估20条也就是返回 16000 tokens 长度的数据,最多测试 30000 tokens 的数据
返回 top k 结果, limit 为最大 Tokens 数量,最多 20000 tokens。
```bash
{
@@ -190,15 +205,6 @@ curl --location --request POST 'https://api.fastgpt.in/api/core/dataset/searchTe
"id": "65599c54a5c814fb803363cb",
"q": "你是谁",
"a": "我是FastGPT助手",
"indexes": [
{
"defaultIndex": true,
"type": "qa",
"dataId": "3645952",
"text": "你是谁\n我是FastGPT助手",
"_id": "65599c5588271af95b019862"
}
],
"datasetId": "6554684f7f9ed18a39a4d15c",
"collectionId": "6556cd795e4b663e770bb66d",
"sourceName": "GBT 15104-2021 装饰单板贴面人造板.pdf",