优化问题修改
This commit is contained in:
@@ -720,7 +720,7 @@ public class AiCommonPromptConstants {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static String initializationAttachmentResultMergingPrompt(String basicInformation, String attachmentContent){
|
public static String initializationAttachmentResultMergingPrompt(String basicInformation, String attachmentContent){
|
||||||
String promptStr = "You are a professional resume writing expert. Please generate a complete resume structure based on the candidate's basic information and analyzed attachment content.\n" +
|
String promptStr = "You are a professional resume writing expert. Please generate a complete resume structure based on the candidate's basic information and analyzed attachment content.The date should be automatically converted to the standard format of yyyy-MM.\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"Candidate Basic Information:\n" +
|
"Candidate Basic Information:\n" +
|
||||||
basicInformation +
|
basicInformation +
|
||||||
|
|||||||
@@ -51,6 +51,13 @@ public interface HotakeAiInterviewQuestionsInfoMapper
|
|||||||
*/
|
*/
|
||||||
public int deleteHotakeAiInterviewQuestionsInfoById(Long id);
|
public int deleteHotakeAiInterviewQuestionsInfoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除AI面试问题信息
|
||||||
|
*
|
||||||
|
* @param roleId
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteHotakeAiInterviewQuestionsInfoByRoleId(Long roleId);
|
||||||
/**
|
/**
|
||||||
* 批量删除AI面试问题信息
|
* 批量删除AI面试问题信息
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1034,6 +1034,9 @@ public class HotakeAiCommonToolsServiceImpl extends BaseServiceImpl implements I
|
|||||||
}
|
}
|
||||||
questionsInfo.setAiQuestionList(questionDtoList);
|
questionsInfo.setAiQuestionList(questionDtoList);
|
||||||
questionsInfo.setTimes(times.toString());
|
questionsInfo.setTimes(times.toString());
|
||||||
|
questionsInfo.setQuestionJson(JSONUtil.toJsonStr(questionDtoList));
|
||||||
|
//先删除数据
|
||||||
|
hotakeAiInterviewQuestionsInfoMapper.deleteHotakeAiInterviewQuestionsInfoByRoleId(rolesInfo.getId());
|
||||||
//进行数据更新
|
//进行数据更新
|
||||||
hotakeAiInterviewQuestionsInfoMapper.insertHotakeAiInterviewQuestionsInfo(questionsInfo);
|
hotakeAiInterviewQuestionsInfoMapper.insertHotakeAiInterviewQuestionsInfo(questionsInfo);
|
||||||
return questionsInfo;
|
return questionsInfo;
|
||||||
|
|||||||
@@ -547,7 +547,7 @@ public class HotakeCvInfoServiceImpl extends BaseServiceImpl implements IHotakeC
|
|||||||
List<Map<String, String>> list = new LinkedList();
|
List<Map<String, String>> list = new LinkedList();
|
||||||
Map<String, String> entity = new HashMap<>();
|
Map<String, String> entity = new HashMap<>();
|
||||||
entity.put("role", "user");
|
entity.put("role", "user");
|
||||||
entity.put("content", "从下面提供的文本中提取所有能识别到的简历信息,只提取原文中存在的内容,不要补充、不推测、不总结。需要提取的字段包括:name(姓名或人名)、phone(电话号码)、email(电子邮件地址)、experienceYear(根据工作经验计算出来的工作年限)、position(岗位或者简历中自己期望的职位等)、location(地点或者地址、家庭住址)、links(所有链接地址)、currentWork(当前工作公司)、about(关于我/自我介绍)、skills_tools(关键资格(许可证、注册/会员资格、认证))、languages(语言能力,主要就是Languages下面的语言)、experience(工作经历,除了title、company、location、durationStart、durationEnd,其他的都放到description里面,并且description里面要根据换行符分成不同的content),日期要拆分成开始时间(durationStart)和结束时间(durationEnd))、education(教育经历,日期要拆分成开始时间(durationStart)和结束时间(durationEnd))。请将提取结果以结构化 JSON 格式返回,格式如下:{ \\\"name\\\": \\\"\\\", \\\"phone\\\": \\\"\\\", \\\"currentWork\\\": \\\"\\\", \\\"position\\\": \\\"\\\", \\\"location\\\": \\\"\\\", \\\"email\\\": \\\"\\\", \\\"experienceYear\\\": \\\"\\\", \\\"links\\\": [{\\\"content\\\":\\\"\\\"}], \\\"about\\\": \\\"\\\", \\\"skillsTools\\\": [{\\\"content\\\":\\\"\\\"}], \\\"languages\\\": [{\\\"content\\\":\\\"\\\"}], \\\"experience\\\": [{\\\"title\\\": \\\"\\\", \\\"company\\\": \\\"\\\",\\\"location\\\": \\\"\\\",\\\"durationStart\\\": \\\"\\\",\\\"durationEnd\\\": \\\"\\\",\\\"description\\\": [{\\\"content\\\":\\\"\\\"}]}], \\\"education\\\": [{\\\"degree\\\": \\\"\\\",\\\"institution\\\": \\\"\\\",\\\"durationStart\\\": \\\"\\\",\\\"durationEnd\\\": \\\"\\\"}] }。字段不存在则返回 null 或空数组。只返回标准可解析的 JSON结构 ,不要多余的```json等信息,不要解释说明,不要改写内容。以下为待处理文本:" + contents);
|
entity.put("content", "从下面提供的文本中提取所有能识别到的简历信息,只提取原文中存在的内容,不要补充、不推测、不总结。需要提取的字段包括:name(姓名或人名)、phone(电话号码)、email(电子邮件地址)、experienceYear(根据工作经验计算出来的工作年限)、position(岗位或者简历中自己期望的职位等)、location(地点或者地址、家庭住址)、links(所有链接地址)、currentWork(当前工作公司)、about(关于我/自我介绍)、skills_tools(关键资格(许可证、注册/会员资格、认证))、languages(语言能力,主要就是Languages下面的语言)、experience(工作经历,除了title、company、location、durationStart、durationEnd,其他的都放到description里面,并且description里面要根据换行符分成不同的content),日期要拆分成开始时间(durationStart)和结束时间(durationEnd))、education(教育经历,日期要拆分成开始时间(durationStart)和结束时间(durationEnd))。请将提取结果以结构化 JSON 格式返回,格式如下:{ \\\"name\\\": \\\"\\\", \\\"phone\\\": \\\"\\\", \\\"currentWork\\\": \\\"\\\", \\\"position\\\": \\\"\\\", \\\"location\\\": \\\"\\\", \\\"email\\\": \\\"\\\", \\\"experienceYear\\\": \\\"\\\", \\\"links\\\": [{\\\"content\\\":\\\"\\\"}], \\\"about\\\": \\\"\\\", \\\"skillsTools\\\": [{\\\"content\\\":\\\"\\\"}], \\\"languages\\\": [{\\\"content\\\":\\\"\\\"}], \\\"experience\\\": [{\\\"title\\\": \\\"\\\", \\\"company\\\": \\\"\\\",\\\"location\\\": \\\"\\\",\\\"durationStart\\\": \\\"\\\",\\\"durationEnd\\\": \\\"\\\",\\\"description\\\": [{\\\"content\\\":\\\"\\\"}]}], \\\"education\\\": [{\\\"degree\\\": \\\"\\\",\\\"institution\\\": \\\"\\\",\\\"durationStart\\\": \\\"\\\",\\\"durationEnd\\\": \\\"\\\"}] }。字段不存在则返回 null 或空数组。只返回标准可解析的 JSON结构 ,不要多余的```json等信息,不要解释说明,不要改写内容,其中日期字段要转换格式为:yyyy-MM。以下为待处理文本:" + contents);
|
||||||
//根据AI做
|
//根据AI做
|
||||||
list.add(entity);
|
list.add(entity);
|
||||||
String resultCv = chatGPTClient.handleAiChat(JSONUtil.toJsonStr(list), "JX");
|
String resultCv = chatGPTClient.handleAiChat(JSONUtil.toJsonStr(list), "JX");
|
||||||
|
|||||||
@@ -297,8 +297,7 @@ public class HotakeRolesInfoServiceImpl extends BaseServiceImpl implements IHota
|
|||||||
}else{
|
}else{
|
||||||
rolesInfo.setRoleBenefitsJson("");
|
rolesInfo.setRoleBenefitsJson("");
|
||||||
}
|
}
|
||||||
//todo 暂时加在这里,完成第3步的时候,初始化第5步的内容
|
// createAiQuestion(rolesInfoId);
|
||||||
createAiQuestion(rolesInfoId);
|
|
||||||
}
|
}
|
||||||
if(RoleOperStepsEnum.STEPS_4.getCode().equals(hotakeRolesInfo.getOperStep())){
|
if(RoleOperStepsEnum.STEPS_4.getCode().equals(hotakeRolesInfo.getOperStep())){
|
||||||
|
|
||||||
|
|||||||
@@ -96,6 +96,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
delete from hotake_ai_interview_questions_info where id = #{id}
|
delete from hotake_ai_interview_questions_info where id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteHotakeAiInterviewQuestionsInfoByRoleId" parameterType="Long">
|
||||||
|
delete from hotake_ai_interview_questions_info where role_id = #{roleId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteHotakeAiInterviewQuestionsInfoByIds" parameterType="String">
|
<delete id="deleteHotakeAiInterviewQuestionsInfoByIds" parameterType="String">
|
||||||
delete from hotake_ai_interview_questions_info where id in
|
delete from hotake_ai_interview_questions_info where id in
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
|||||||
Reference in New Issue
Block a user