简历读取基础逻辑添加以及用户语音配置信息字段添加

This commit is contained in:
2025-11-05 15:33:51 +08:00
parent 86e2fe238b
commit 6f2689fd1e
14 changed files with 143 additions and 22 deletions

View File

@@ -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());
}