优化大模型生成时-将项目详情做为历史内容拼接
This commit is contained in:
@@ -13,6 +13,7 @@ import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.pwl.entity.PwlProjectLibrary;
|
||||
import com.gxwebsoft.pwl.service.PwlProjectLibraryService;
|
||||
import com.gxwebsoft.pwl.service.PwlProjectService;
|
||||
import com.gxwebsoft.ai.service.AiCloudDocService;
|
||||
import com.gxwebsoft.ai.service.AiCloudFileService;
|
||||
import com.gxwebsoft.ai.service.KnowledgeBaseService;
|
||||
@@ -45,6 +46,9 @@ public abstract class BaseAuditContentController extends BaseController {
|
||||
@Autowired
|
||||
protected KnowledgeBaseService knowledgeBaseService;
|
||||
|
||||
@Autowired
|
||||
protected PwlProjectService pwlProjectService;
|
||||
|
||||
@Autowired
|
||||
protected PwlProjectLibraryService pwlProjectLibraryService;
|
||||
|
||||
@@ -69,6 +73,13 @@ public abstract class BaseAuditContentController extends BaseController {
|
||||
log.info("返回历史数据,请求哈希: {}", requestHash);
|
||||
return success(JSONObject.parseObject(history.getResponseData()));
|
||||
}
|
||||
|
||||
//将项目详情做为历史内容拼接
|
||||
var project = pwlProjectService.getById(request.getProjectId());
|
||||
if (project != null) {
|
||||
String projectJson = JSONObject.toJSONString(project);
|
||||
requestHistory = projectJson + requestHistory;
|
||||
}
|
||||
request.setHistory(requestHistory);
|
||||
|
||||
String libraryKbIds = "";
|
||||
|
||||
Reference in New Issue
Block a user