diff --git a/service/llm_service.go b/service/llm_service.go index 4464687..b6cc376 100644 --- a/service/llm_service.go +++ b/service/llm_service.go @@ -282,6 +282,9 @@ func (s *LLMService) handleStreamingResponse(req *http.Request, data map[string] if utf8.RuneCountInString(initialSessage) > 10 { new_message = initialSessage initialSessage = "" + } else if utf8.RuneCountInString(initialSessage) <= 10 && strings.HasSuffix(initialSessage, "。") { + new_message = initialSessage + initialSessage = "" } else { continue }