diff --git a/utils/audio.py b/utils/audio.py index e9069f7a..b221d893 100644 --- a/utils/audio.py +++ b/utils/audio.py @@ -1005,7 +1005,7 @@ async def voice_change_and_put_to_queue(message, voice_tmp_path): voice_tmp_path = None if voice_tmp_path is None: - logging.error(f"{message['tts_type']}合成失败,请排查配置、网络等问题") + logging.error(f"{message['tts_type']}合成失败,请排查服务端是否启动、是否正常,配置、网络等问题") self.abnormal_alarm_handle("tts") return False @@ -1902,7 +1902,9 @@ def abnormal_alarm_handle(self, type): if not self.config.get("abnormal_alarm", type, "enable"): return True - + + logging.debug(f"abnormal_alarm_handle type={type}, error_count={Audio.abnormal_alarm_data[type]['error_count']}") + if self.config.get("abnormal_alarm", type, "type") == "local_audio": # 是否错误数大于 自动重启错误数 if Audio.abnormal_alarm_data[type]["error_count"] >= self.config.get("abnormal_alarm", type, "auto_restart_error_num"): diff --git a/webui.py b/webui.py index 97e5537a..fbb1204a 100644 --- a/webui.py +++ b/webui.py @@ -3913,6 +3913,9 @@ def anythingllm_get_workspaces_list(): "g4f.Provider.GptTalkRu", "g4f.Provider.Koala", ] + # 将用户配置的值插入list(如果不存在) + if config.get("gpt4free", "provider") not in providers: + providers.append(config.get("gpt4free", "provider")) data_json = {} for line in providers: data_json[line] = line @@ -3932,6 +3935,9 @@ def anythingllm_get_workspaces_list(): "gpt-4", "gpt-4-turbo", ] + # 将用户配置的值插入list(如果不存在) + if config.get("gpt4free", "model") not in gpt4free_models: + gpt4free_models.append(config.get("gpt4free", "model")) data_json = {} for line in gpt4free_models: data_json[line] = line