From b9f264b8837625599785799113f0cad62435d71a Mon Sep 17 00:00:00 2001 From: begoniezhao Date: Thu, 20 Nov 2025 17:52:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?docs:=20=E7=A7=BB=E9=99=A4=E7=9F=A5?= =?UTF-8?q?=E8=AF=86=E5=BA=93=E6=B7=B7=E5=90=88=E6=90=9C=E7=B4=A2API?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/API.md | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) diff --git a/docs/API.md b/docs/API.md index d42beffe..50a63646 100644 --- a/docs/API.md +++ b/docs/API.md @@ -334,7 +334,6 @@ curl --location 'http://localhost:8080/api/v1/tenants' \ | GET | `/knowledge-bases/:id` | 获取知识库详情 | | PUT | `/knowledge-bases/:id` | 更新知识库 | | DELETE | `/knowledge-bases/:id` | 删除知识库 | -| GET | `/knowledge-bases/:id/hybrid-search` | 混合搜索知识库内容 | | POST | `/knowledge-bases/copy` | 拷贝知识库 | #### POST `/knowledge-bases` - 创建知识库 @@ -656,51 +655,6 @@ curl --location --request DELETE 'http://localhost:8080/api/v1/knowledge-bases/b } ``` -#### GET `/knowledge-bases/:id/hybrid-search` - 混合搜索知识库内容 - -**请求**: - -```curl -curl --location --request GET 'http://localhost:8080/api/v1/knowledge-bases/kb-00000001/hybrid-search' \ ---header 'Content-Type: application/json' \ ---header 'X-API-Key: sk-vQHV2NZI_LK5W7wHQvH3yGYExX8YnhaHwZipUYbiZKCYJbBQ' \ ---data '{ - "query_text": "彗星", - "vector_threshold": 0.1, - "keyword_threshold": 0.1, - "match_count": 1 -}' -``` - -**响应**: - -```json -{ - "data": [ - { - "id": "7d955251-3f79-4fd5-a6aa-02f81e044091", - "content": "有几位后来xxxxx", - "knowledge_id": "a6790b93-4700-4676-bd48-0d4804e1456b", - "chunk_index": 3, - "knowledge_title": "彗星.txt", - "start_at": 2287, - "end_at": 2760, - "seq": 3, - "score": 0.7402352891601821, - "match_type": 2, - "sub_chunk_id": null, - "metadata": {}, - "chunk_type": "text", - "parent_chunk_id": "", - "image_info": "", - "knowledge_filename": "彗星.txt", - "knowledge_source": "" - } - ], - "success": true -} -``` -
返回顶部 ↑
### 知识管理API From a0685a22db44f34363fef9138962eb483a803ba7 Mon Sep 17 00:00:00 2001 From: begoniezhao Date: Fri, 21 Nov 2025 15:13:57 +0800 Subject: [PATCH 2/2] refactor: remove unnecessary header handling in chunk processing and update example usage --- docreader/splitter/splitter.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/docreader/splitter/splitter.py b/docreader/splitter/splitter.py index abb4851b..c3c7128f 100644 --- a/docreader/splitter/splitter.py +++ b/docreader/splitter/splitter.py @@ -198,8 +198,6 @@ class TextSplitter(BaseModel, Generic[T]): # handle the last chunk assert cur_chunk - if cur_headers and cur_len < self.chunk_size: - cur_chunk.insert(0, (cur_chunk[0][0], cur_chunk[0][1], cur_headers)) chunks.append( ( cur_chunk[0][0],