root 1 месяц назад
Родитель
Сommit
c23df5de5f
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      ai-slibra-assistant/api/interface.py

+ 3 - 3
ai-slibra-assistant/api/interface.py

@@ -129,7 +129,7 @@ class ChatResponse:
                 for content in contents:
                     if not content or len(content)==0:
                         continue
-                    if len(content)<400:
+                    if len(content)<300:
                         if len(contents) > 1 and contents[1] and content != contents[-1]:
                             voice_url = voice_service(content, True, 1000)
                         else:
@@ -144,9 +144,9 @@ class ChatResponse:
                         )
                     else:
                         size = len(content)
-                        nsize = int(len(content)/400)
+                        nsize = int(len(content)/300)
                         for i in range(nsize):
-                            segment = content[i*400:min((i+1)*400, size)]
+                            segment = content[i*300:min((i+1)*300, size)]
                             voice_url = voice_service(segment, True, 1000)
                             _contents.append(
                                 ChatContent(**{