htknow/todo.md

32 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

文档122-06A0014-B01001_发动机-维修手册.pdf
搜索:保养主推进柴油机的步骤
搜索方式:高级搜索
curl -X 'GET' \
'http://localhost:3000/api/v1/knowledge/search/image-by-text?query=%E5%9B%BE%203.2%20%E8%88%B9%E8%88%B6%E4%B8%BB%E5%8F%91%E5%8A%A8%E6%9C%BA%E7%BB%84%E6%88%90%E5%9B%BE.jpg' \
-H 'accept: application/json' \
-H 'x-user-id: 1' \
-H 'x-user-name: testuser' \
-H 'x-role: admin'服务有个问题,当我调用问搜图检索接口时,输出如下:{
"results": [
{
"id": 11,
"file_id": 2,
"content": "163-06A0015-B01001_发动机-维修手册.pdf/8/images/ae9bcbc029d318bd8189bbb9c67cd730ea4c950b1e383ed8454834040d7d16ae.jpg",
"score": 0.98560935,
"file": {
"id": 2,
"filename": "163-06A0015-B01001_发动机-维修手册.pdf",
"kb_id": 8,
"is_public": false,
"user_id": "user1",
"created_at": 1784875238
},
"kb": {
"id": 8,
"name": "测试0724",
"is_public": false,
"user_id": "user1"
},
"image_filename": "images/ae9bcbc029d318bd8189bbb9c67cd730ea4c950b1e383ed8454834040d7d16ae.jpg",
"jpg_filename": "images/ae9bcbc029d318bd8189bbb9c67cd730ea4c950b1e383ed8454834040d7d16ae.jpg",}]
首先jpg_filename返回的字段值不对数据库中已经是图 3.2 船舶主发动机组成图.jpg但这里仍然是和image_filename一样的值同时content返回的内容需要修改应该为filename_jpg_filename例如163-06A0015-B01001_发动机-维修手册.pdf_图 3.2 船舶主发动机组成图.jpg