调用本地大模型, 调通了
This commit is contained in:
@@ -39,7 +39,7 @@ public class AiQaItemController {
|
||||
@Autowired
|
||||
private IAiQaCustomerAskService aiQaCustomerAskService;
|
||||
|
||||
@PostMapping("/ask")
|
||||
@PostMapping("/askAI")
|
||||
@Operation(summary = "客户问答(大模型)", description = "接收客户问题,调用本地 OpenAI 兼容 Chat Completions,将回答返回给前端")
|
||||
public ResponseEntity<Map<String, Object>> askCustomer(
|
||||
@Parameter(description = "提问请求", required = true) @RequestBody AiQaCustomerAskRequestDto request) {
|
||||
|
||||
@@ -96,6 +96,7 @@ public class AiQaMainController {
|
||||
@RequestParam(required = false) String tenantId,
|
||||
@RequestParam(required = false) String title,
|
||||
@RequestParam(required = false) String qaType,
|
||||
@RequestParam(required = false) String askContent,
|
||||
@RequestParam(required = false) String salesId,
|
||||
@RequestParam(required = false) String salesPhone,
|
||||
@RequestParam(required = false) String salesName,
|
||||
@@ -114,6 +115,9 @@ public class AiQaMainController {
|
||||
if (qaType != null && !qaType.trim().isEmpty()) {
|
||||
q.eq(AiQaMain::getQaType, qaType);
|
||||
}
|
||||
if (askContent != null && !askContent.trim().isEmpty()) {
|
||||
q.like(AiQaMain::getAskContent, askContent);
|
||||
}
|
||||
if (salesId != null && !salesId.trim().isEmpty()) {
|
||||
q.eq(AiQaMain::getSalesId, salesId);
|
||||
}
|
||||
|
||||
@@ -35,6 +35,10 @@ public class AiQaMain implements Serializable {
|
||||
@TableField("qa_type")
|
||||
private String qaType;
|
||||
|
||||
@Schema(description = "提问内容")
|
||||
@TableField("ask_content")
|
||||
private String askContent;
|
||||
|
||||
@Schema(description = "销售ID")
|
||||
@TableField("sales_id")
|
||||
private String salesId;
|
||||
|
||||
Reference in New Issue
Block a user