mirror of
https://gitcode.com/ageerle/ruoyi-ai.git
synced 2026-04-06 00:07:34 +00:00
feat: 代码优化
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user