AI 集成基础方法添加
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
package com.vetti.hotake.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 招聘者AI简历评分和排名系统 信息对象
|
||||
*
|
||||
* @author wangxiangshun
|
||||
* @date 2026-01-17
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class HotakeAiCvScoringRankingVo {
|
||||
|
||||
@ApiModelProperty("职位名称")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty("职位描述")
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty("必需技能")
|
||||
private List<String> requiredSkills;
|
||||
|
||||
@ApiModelProperty("优选技能")
|
||||
private List<String> niceToHaveSkills;
|
||||
|
||||
@ApiModelProperty("工作经验要求")
|
||||
private String experienceRequired;
|
||||
|
||||
@ApiModelProperty("教育要求")
|
||||
private String educationRequired;
|
||||
|
||||
@ApiModelProperty("候选人信息")
|
||||
private List<HotakeCandidateVcInfoVo> candidates;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.vetti.hotake.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 招聘者查看候选人匹配度 信息对象
|
||||
*
|
||||
* @author wangxiangshun
|
||||
* @date 2026-01-17
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class HotakeCandidateCompatibilityVo {
|
||||
|
||||
@ApiModelProperty("岗位")
|
||||
private String position;
|
||||
|
||||
@ApiModelProperty("候选人")
|
||||
private String candidate;
|
||||
|
||||
@ApiModelProperty("当前岗位")
|
||||
private String currentPosition;
|
||||
|
||||
@ApiModelProperty("工作经验")
|
||||
private String workExperience;
|
||||
|
||||
@ApiModelProperty("技能")
|
||||
private List<String> skills;
|
||||
|
||||
@ApiModelProperty("综合评分")
|
||||
private String overallRating;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.vetti.hotake.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 候选人简历信息 信息对象
|
||||
*
|
||||
* @author wangxiangshun
|
||||
* @date 2026-01-17
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class HotakeCandidateVcInfoVo {
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("当前职位")
|
||||
private String currentPosition;
|
||||
|
||||
@ApiModelProperty("工作经验")
|
||||
private String workExperience;
|
||||
|
||||
@ApiModelProperty("教育背景")
|
||||
private String education;
|
||||
|
||||
@ApiModelProperty("技能列表")
|
||||
private List<String> skills;
|
||||
|
||||
@ApiModelProperty("简历摘要")
|
||||
private String summary;
|
||||
}
|
||||
@@ -135,4 +135,20 @@ public interface IHotakeAiCommonToolsService {
|
||||
*/
|
||||
public String handleCandidateAiInterviewAnalysis(HotakeCandidateAiInterviewAnalysisVo analysisVo);
|
||||
|
||||
|
||||
/**
|
||||
* 招聘者AI简历评分和排名系统
|
||||
* @param scoringRankingVo 招聘者AI简历评分和排名系统输入信息
|
||||
* @return
|
||||
*/
|
||||
public String handleAiCvScoringRanking(HotakeAiCvScoringRankingVo scoringRankingVo);
|
||||
|
||||
|
||||
/**
|
||||
* 招聘者查看候选人匹配度
|
||||
* @param compatibilityVo 招聘者查看候选人匹配度 输入信息
|
||||
* @return
|
||||
*/
|
||||
public String handleCandidateCompatibility(HotakeCandidateCompatibilityVo compatibilityVo);
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.vetti.hotake.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.vetti.common.ai.gpt.ChatGPTClient;
|
||||
import com.vetti.common.constant.AiCommonPromptConstants;
|
||||
@@ -1036,4 +1035,70 @@ public class HotakeAiCommonToolsServiceImpl extends BaseServiceImpl implements I
|
||||
|
||||
return resultJsonOne;
|
||||
}
|
||||
|
||||
/**
|
||||
* 招聘者AI简历评分和排名系统
|
||||
* @param scoringRankingVo 招聘者AI简历评分和排名系统输入信息
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String handleAiCvScoringRanking(HotakeAiCvScoringRankingVo scoringRankingVo) {
|
||||
|
||||
String prompt = AiCommonPromptConstants.initializationAiCvScoringRankingPrompt();
|
||||
String userPrompt_1 = JSONUtil.toJsonStr(scoringRankingVo);
|
||||
//处理岗位信息补充
|
||||
List<Map<String, String>> listOne = new LinkedList();
|
||||
Map<String, String> mapEntityOne = new HashMap<>();
|
||||
mapEntityOne.put("role", "system");
|
||||
mapEntityOne.put("content",prompt);
|
||||
listOne.add(mapEntityOne);
|
||||
Map<String, String> mapUserEntityOne = new HashMap<>();
|
||||
mapUserEntityOne.put("role", "user");
|
||||
mapUserEntityOne.put("content",userPrompt_1);
|
||||
listOne.add(mapUserEntityOne);
|
||||
String promptJsonOne = JSONUtil.toJsonStr(listOne);
|
||||
String resultStrOne = chatGPTClient.handleAiChat(promptJsonOne,"AICVSR");
|
||||
String resultJsonOne = resultStrOne.replaceAll("```json","").replaceAll("```","");
|
||||
log.info("招聘者AI简历评分和排名系统结果:{}",resultJsonOne);
|
||||
|
||||
return resultJsonOne;
|
||||
}
|
||||
|
||||
/**
|
||||
* 招聘者查看候选人匹配度
|
||||
* @param compatibilityVo 招聘者查看候选人匹配度 输入信息
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String handleCandidateCompatibility(HotakeCandidateCompatibilityVo compatibilityVo) {
|
||||
String prompt = AiCommonPromptConstants.initializationCandidateCompatibilityPrompt();
|
||||
|
||||
String userPrompt_1 = "Please analyze the matching details of the following candidates:\n" +
|
||||
"\n" +
|
||||
"【Position】: "+compatibilityVo.getPosition()+"\n" +
|
||||
"【Candidate】: "+compatibilityVo.getCandidate()+"\n" +
|
||||
"【Current position】: "+compatibilityVo.getCurrentPosition()+"\n" +
|
||||
"【Work Experience】: "+compatibilityVo.getWorkExperience()+"\n" +
|
||||
"【Skill】: "+JSONUtil.toJsonStr(compatibilityVo.getSkills())+"\n" +
|
||||
"【Overall Rating】: "+compatibilityVo.getOverallRating()+"\n" +
|
||||
"\n" +
|
||||
"Please return a detailed analysis in JSON format。";
|
||||
|
||||
//处理岗位信息补充
|
||||
List<Map<String, String>> listOne = new LinkedList();
|
||||
Map<String, String> mapEntityOne = new HashMap<>();
|
||||
mapEntityOne.put("role", "system");
|
||||
mapEntityOne.put("content",prompt);
|
||||
listOne.add(mapEntityOne);
|
||||
Map<String, String> mapUserEntityOne = new HashMap<>();
|
||||
mapUserEntityOne.put("role", "user");
|
||||
mapUserEntityOne.put("content",userPrompt_1);
|
||||
listOne.add(mapUserEntityOne);
|
||||
String promptJsonOne = JSONUtil.toJsonStr(listOne);
|
||||
String resultStrOne = chatGPTClient.handleAiChat(promptJsonOne,"AICAC");
|
||||
String resultJsonOne = resultStrOne.replaceAll("```json","").replaceAll("```","");
|
||||
log.info("招聘者查看候选人匹配度结果:{}",resultJsonOne);
|
||||
|
||||
return resultJsonOne;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user