简历读取基础逻辑添加以及用户语音配置信息字段添加
This commit is contained in:
@@ -33,6 +33,9 @@ public class ChatGPTClient {
|
||||
@Value("${chatGpt.model}")
|
||||
private String model;
|
||||
|
||||
@Value("${chatGpt.modelCV}")
|
||||
private String modelCV;
|
||||
|
||||
@Value("${chatGpt.role}")
|
||||
private String role;
|
||||
|
||||
@@ -42,7 +45,7 @@ public class ChatGPTClient {
|
||||
* @param promptText 文字提示信息
|
||||
* @return
|
||||
*/
|
||||
public String handleAiChat(String promptText) {
|
||||
public String handleAiChat(String promptText,String type) {
|
||||
String resultText = "";
|
||||
// 创建ChatGPT客户端
|
||||
// HTTP客户端
|
||||
@@ -54,7 +57,14 @@ public class ChatGPTClient {
|
||||
ObjectMapper objectMapper = new ObjectMapper();;
|
||||
// 单轮对话返回结果
|
||||
try {
|
||||
resultText = sendMessage(promptText, model,objectMapper,client,role);
|
||||
if("CV".equals(type)){
|
||||
resultText = sendMessage(promptText, modelCV,objectMapper,client,role);
|
||||
}else if("QA".equals(type)){
|
||||
resultText = sendMessage(promptText, "ft:gpt-3.5-turbo-0125:vetti:construction-labourer-test:CWKBNvE2",objectMapper,client,role);
|
||||
} else {
|
||||
resultText = sendMessage(promptText, model,objectMapper,client,role);
|
||||
}
|
||||
|
||||
} catch (IOException | InterruptedException e) {
|
||||
System.err.println("单轮对话出错: " + e.getMessage());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.vetti.common.utils.readText.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@@ -15,8 +16,13 @@ import java.util.List;
|
||||
@Accessors(chain = true)
|
||||
public class PersonalInfo {
|
||||
|
||||
@ApiModelProperty("候选人姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("候选人职位")
|
||||
private String position;
|
||||
|
||||
@ApiModelProperty("工作年限")
|
||||
private int experienceYears;
|
||||
|
||||
private List<String> certifications;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.vetti.common.utils.readText.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@@ -15,11 +16,15 @@ import java.util.List;
|
||||
@Accessors(chain = true)
|
||||
public class ResumeData {
|
||||
|
||||
@ApiModelProperty("候选人基础信息")
|
||||
private PersonalInfo personalInfo;
|
||||
|
||||
@ApiModelProperty("候选人工作经验")
|
||||
private List<WorkExperience> workExperience;
|
||||
|
||||
@ApiModelProperty("候选人技能")
|
||||
private List<String> skills;
|
||||
|
||||
@ApiModelProperty("候选人教育经历")
|
||||
private List<Education> education;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user