fix:心肺复苏
This commit is contained in:
@@ -14,6 +14,7 @@ from .plugins.chat.storage import MessageStorage
|
||||
from .plugins.config.config import global_config
|
||||
from .plugins.chat.bot import chat_bot
|
||||
from .common.logger import get_module_logger
|
||||
from .plugins.remote import heartbeat_thread
|
||||
|
||||
logger = get_module_logger("main")
|
||||
|
||||
|
||||
@@ -57,18 +57,20 @@ def send_heartbeat(server_url, client_id):
|
||||
data = json.dumps(
|
||||
{"system": sys, "Version": global_config.MAI_VERSION},
|
||||
)
|
||||
logger.info(f"正在发送心跳到服务器: {server_url}")
|
||||
logger.debug(f"心跳数据: {data}")
|
||||
response = requests.post(f"{server_url}/api/clients", headers=headers, data=data)
|
||||
|
||||
if response.status_code == 201:
|
||||
data = response.json()
|
||||
logger.debug(f"心跳发送成功。服务器响应: {data}")
|
||||
logger.info(f"心跳发送成功。服务器响应: {data}")
|
||||
return True
|
||||
else:
|
||||
logger.debug(f"心跳发送失败。状态码: {response.status_code}")
|
||||
logger.error(f"心跳发送失败。状态码: {response.status_code}, 响应内容: {response.text}")
|
||||
return False
|
||||
|
||||
except requests.RequestException as e:
|
||||
logger.debug(f"发送心跳时出错: {e}")
|
||||
logger.error(f"发送心跳时出错: {e}")
|
||||
return False
|
||||
|
||||
|
||||
|
||||
@@ -213,6 +213,8 @@ pri_out = 0.35
|
||||
[model.embedding] #嵌入
|
||||
name = "BAAI/bge-m3"
|
||||
provider = "SILICONFLOW"
|
||||
pri_in = 0
|
||||
pri_out = 0
|
||||
|
||||
#测试模型,给think_glow用,如果你没开实验性功能,随便写就行,但是要有
|
||||
[model.llm_outer_world] #外世界判断:建议使用qwen2.5 7b
|
||||
|
||||
Reference in New Issue
Block a user