模型调整以及业务流程处理

This commit is contained in:
2025-10-25 10:32:53 +08:00
parent 775bd96417
commit 6ce56d7219
4 changed files with 20 additions and 12 deletions

View File

@@ -10,6 +10,7 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
@@ -38,7 +39,12 @@ public class AiCommonController extends BaseController
@GetMapping("/handleTextToVice")
public AjaxResult handleTextToVice()
{
elevenLabsClient.handleTextToVoice("Hello ! I can","/Users/wangxiangshun/Desktop/临时文件/output1112.wav");
//你好,我是本次的面试官Vetti,请点击开始按钮后,做一段自我介绍.
elevenLabsClient.handleTextToVoice("Hello, I am Vetti, the interviewer for this interview. Please click the start button and give a self introduction","/Users/wangxiangshun/Desktop/临时文件/opening2.wav");
elevenLabsClient.handleTextToVoice("Good","/Users/wangxiangshun/Desktop/临时文件/good.wav");
return success();
}
@@ -47,9 +53,9 @@ public class AiCommonController extends BaseController
*/
@ApiOperation("AI 聊天")
@GetMapping("/handleAiChat")
public AjaxResult handleAiChat()
public AjaxResult handleAiChat(@RequestParam String text)
{
String resultMsg = chatGPTClient.handleAiChat("你好,我叫wangxiangshun");
String resultMsg = chatGPTClient.handleAiChat(text);
return AjaxResult.success(resultMsg);
}

View File

@@ -159,7 +159,7 @@ whisper:
chatGpt:
apiKey: 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
apiUrl: https://api.openai.com/v1/chat/completions
model: gpt-3.5-turbo
model: ft:gpt-3.5-turbo-0125:vetti:construction-labourer-test:CTIvLD5n
role: user