|
@@ -145,6 +145,19 @@ public class DocumentController {
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @GetMapping("{dataset_id}/documents/{document_id}/download")
|
|
|
|
|
+ @ApiOperation("下载文档")
|
|
|
|
|
+ public Result<Object> downloadDocument (
|
|
|
|
|
+ @PathVariable String dataset_id,
|
|
|
|
|
+ @PathVariable String document_id
|
|
|
|
|
+ ) {
|
|
|
|
|
+ String url = difyProperties.getBaseUrl() + "datasets/"+dataset_id + "/documents/"+ document_id+"/download";
|
|
|
|
|
+ return httpService.get(
|
|
|
|
|
+ url,
|
|
|
|
|
+ null,
|
|
|
|
|
+ "Bearer "+difyProperties.getDatasetApiKey(),
|
|
|
|
|
+ new TypeReference<>() {});
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("getAllDocumnets")
|
|
@GetMapping("getAllDocumnets")
|