feat: 代码优化

This commit is contained in:
ageer
2025-05-11 18:37:51 +08:00
parent e1dea1d9e2
commit e3da640737
16 changed files with 5 additions and 175 deletions

View File

@@ -70,8 +70,7 @@ public class ChatController {
@PostMapping("/audio")
@ResponseBody
public WhisperResponse audio(@RequestParam("file") MultipartFile file) {
WhisperResponse whisperResponse = sseService.speechToTextTranscriptionsV2(file);
return whisperResponse;
return sseService.speechToTextTranscriptionsV2(file);
}
/**

View File

@@ -62,7 +62,6 @@ public class OllamaServiceImpl implements IChatService {
OllamaStreamHandler streamHandler = (s) -> {
String substr = s.substring(response.length());
response.append(substr);
System.out.println(substr);
try {
emitter.send(substr);
} catch (IOException e) {