update:优化参数读取

This commit is contained in:
hrz
2025-04-15 00:44:34 +08:00
parent 6cf6b0d645
commit 11c9915a70
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -204,7 +204,7 @@ class ConnectionHandler:
self.headers.get("device-id", None),
self.headers.get("client-id", None),
)
private_config["delete_audio"] = bool(self.config["delete_audio"], True)
private_config["delete_audio"] = bool(self.config.get("delete_audio", True))
self.logger.bind(tag=TAG).info(f"获取差异化配置成功: {private_config}")
except Exception as e:
self.logger.bind(tag=TAG).error(f"获取差异化配置失败: {e}")
+1 -1
View File
@@ -25,7 +25,7 @@ class WebSocketServer:
async def start(self):
server_config = self.config["server"]
host = server_config["ip"]
port = server_config["port"]
port = int(server_config.get("port", 8000))
self.logger.bind(tag=TAG).info(
"Server is running at ws://{}:{}/xiaozhi/v1/", get_local_ip(), port