This commit is contained in:
parent
ebd2f6fabb
commit
a9230fcf81
@ -303,6 +303,7 @@ func (s *LLMService) processStreamSegment(initialSessage *string, all_message *s
|
|||||||
fmt.Printf("Error synthesizing speech: %v\n", err)
|
fmt.Printf("Error synthesizing speech: %v\n", err)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
fmt.Println("触发音频", speechResp)
|
||||||
audio = speechResp.Data.Audio
|
audio = speechResp.Data.Audio
|
||||||
if audio != "" {
|
if audio != "" {
|
||||||
resp, err := http.Get(audio)
|
resp, err := http.Get(audio)
|
||||||
@ -595,7 +596,7 @@ func (s *LLMService) handleStreamingResponseV2(req *http.Request, data map[strin
|
|||||||
line = strings.TrimSpace(strings.TrimPrefix(line, "data:"))
|
line = strings.TrimSpace(strings.TrimPrefix(line, "data:"))
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("line: ", line)
|
// fmt.Println("line: ", line)
|
||||||
|
|
||||||
if line == "[DONE]" {
|
if line == "[DONE]" {
|
||||||
messageChan <- Message{
|
messageChan <- Message{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user