| | |
| | | import com.ruoyi.ai.bean.PurchaseAiConfirmRequest; |
| | | import com.ruoyi.ai.service.PurchaseAiService; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | |
| | | } |
| | | |
| | | @Operation(summary = "采购对话") |
| | | @Log(title = "采购智能体对话", businessType = BusinessType.OTHER) |
| | | @PostMapping(value = "/chat", produces = "text/stream;charset=utf-8") |
| | | public Flux<String> chat(@RequestBody ChatForm chatForm) { |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | |
| | | } |
| | | |
| | | @Operation(summary = "采购多文件分析") |
| | | @Log(title = "采购多文件分析", businessType = BusinessType.OTHER) |
| | | @PostMapping(value = "/analyze-files", consumes = "multipart/form-data", produces = "text/stream;charset=utf-8") |
| | | public Flux<String> analyzeFiles(@RequestParam("files") MultipartFile[] files, |
| | | @RequestParam(value = "message", required = false) String message, |
| | |
| | | } |
| | | |
| | | @Operation(summary = "采购多文件分析确认处理") |
| | | @Log(title = "采购多文件分析确认", businessType = BusinessType.OTHER) |
| | | @PostMapping("/analyze-files/confirm") |
| | | public AjaxResult confirmAnalyzeResult(@RequestBody PurchaseAiConfirmRequest request) { |
| | | return purchaseAiService.confirmAnalyzeResult(request); |
| | |
| | | } |
| | | |
| | | @Operation(summary = "删除采购会话") |
| | | @Log(title = "删除采购智能体会话", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/history/{memoryId}") |
| | | public AjaxResult deleteSession(@PathVariable String memoryId) { |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |