perf: btn color (#423)

This commit is contained in:
Archer
2023-10-24 13:19:23 +08:00
committed by GitHub
parent bf6dbfb245
commit 1942cb0d67
41 changed files with 350 additions and 221 deletions

View File

@@ -225,9 +225,9 @@ data: [{"moduleName":"KB Search","price":1.2000000000000002,"model":"Embedding-2
此部分 API 需使用全局通用的 API Key。
{{% /alert %}}
| 如何获取知识库IDkbId | 如何获取文件IDfile_id |
| 如何获取知识库IDdatasetId | 如何获取文件IDfile_id |
| --------------------- | --------------------- |
| ![](/imgs/getKbId.png) | ![](/imgs/getfile_id.png) |
| ![](/imgs/getDatasetId.png) | ![](/imgs/getfile_id.png) |
### 知识库添加数据
@@ -241,7 +241,7 @@ curl --location --request POST 'https://fastgpt.run/api/core/dataset/data/pushDa
--header 'Authorization: Bearer apikey' \
--header 'Content-Type: application/json' \
--data-raw '{
    "kbId": "64663f451ba1676dbdef0499",
    "collectionId": "64663f451ba1676dbdef0499",
"mode": "index",
"prompt": "qa 拆分引导词index 模式下可以忽略",
"billId": "可选。如果有这个值,本次的数据会被聚合到一个订单中,这个值可以重复使用。可以参考 [创建训练订单] 获取该值。",
@@ -268,7 +268,7 @@ curl --location --request POST 'https://fastgpt.run/api/core/dataset/data/pushDa
```json
{
"kbId": "知识库的ID可以在知识库详情查看。",
"collectionId": "文件的ID参考上面的第二张图",
"mode": "index | qa ", // index 模式: 直接将 q 转成向量存起来a 直接入库。qa 模式: 只关注 data 里的 q将 q 丢给大模型,让其根据 prompt 拆分成 qa 问答对。
"prompt": "拆分提示词,需严格按照模板,建议不要传入。",
"data": [
@@ -351,7 +351,7 @@ curl --location --request POST 'https://fastgpt.run/api/core/dataset/searchTest'
--header 'Authorization: Bearer apiKey' \
--header 'Content-Type: application/json' \
--data-raw '{
"kbId": "xxxxx",
"datasetId": "知识库的ID",
"text": "导演是谁"
}'
```

View File

@@ -29,6 +29,10 @@ ALTER EXTENSION vector UPDATE;
alter system set maintenance_work_mem = '2400MB';
select pg_reload_conf();
-- 重构数据库索引和排序
REINDEX DATABASE postgres;
ALTER DATABASE postgres REFRESH COLLATION VERSION;
-- 开始构建索引,该索引构建时间非常久,直接点击右上角的叉,退出 Terminal 即可
CREATE INDEX CONCURRENTLY vector_index ON modeldata USING hnsw (vector vector_ip_ops) WITH (m = 16, ef_construction = 64);
-- 可以再次点击一键链接,进入 Terminal输入下方命令如果看到 "vector_index" hnsw (vector vector_ip_ops) WITH (m='16', ef_construction='64') 则代表构建完成(注意,后面没有 INVALID

View File

@@ -32,4 +32,4 @@ curl --location --request POST 'https://{{host}}/api/admin/initv451' \
1. 新增知识库文件夹管理
2. 修复了 openai4.x sdk 无法兼容 oneapi 的智谱和阿里的接口。
3. 修复部分模块无法触发完成事件