| | |
| | | |
| | | private final IKnowledgeFragmentService fragmentService; |
| | | |
| | | private final PdfImageExtractService pdfImageExtractService; |
| | | // private final PdfImageExtractService pdfImageExtractService; |
| | | |
| | | /** |
| | | * 根据用户信息查询本地知识库 |
| | |
| | | * @param file PDF文件 |
| | | * @return 文件名称和图片内容 |
| | | */ |
| | | @PostMapping("/extract-images") |
| | | @Operation(summary = "提取PDF中的图片并调用大模型,识别图片内容并返回", description = "提取PDF中的图片并调用gpt-4o-mini,识别图片内容并返回") |
| | | public R<List<PdfFileContentResult>> extractImages( |
| | | @RequestPart("file") MultipartFile file |
| | | ) throws IOException { |
| | | return R.ok(pdfImageExtractService.extractImages(file)); |
| | | } |
| | | // @PostMapping("/extract-images") |
| | | // @Operation(summary = "提取PDF中的图片并调用大模型,识别图片内容并返回", description = "提取PDF中的图片并调用gpt-4o-mini,识别图片内容并返回") |
| | | // public R<List<PdfFileContentResult>> extractImages( |
| | | // @RequestPart("file") MultipartFile file |
| | | // ) throws IOException { |
| | | // return R.ok(pdfImageExtractService.extractImages(file)); |
| | | // } |
| | | } |