chore: 去除一些不必要的注释

This commit is contained in:
Soulter
2024-11-17 16:01:13 +08:00
parent c14813c0b2
commit 4623f2f12a
10 changed files with 10 additions and 13 deletions
+2 -2
View File
@@ -34,9 +34,9 @@
- Ollama
- 几乎所有已知模型(可接入 [OneAPI](https://astrbot.soulter.top/docs/docs/adavanced/one-api)
🌍 机器人支持的能力一览
🌍 机器人支持的能力:
- 大模型对话、人格、网页搜索
- 可视化仪表盘
- 可视化管理面板
- 同时处理多平台消息
- 精确到个人的会话隔离
- 插件支持
+1 -1
View File
@@ -122,7 +122,7 @@ class AstrBotBootstrap():
continue
self.load_openai(llm)
f = True
logger.info(f"已启用 LLM Provider(OpenAI API): {llm.name}")
logger.info(f"已启用 LLM Provider(OpenAI API): {llm.id}({llm.name})")
if f:
from model.command.openai_official_handler import OpenAIOfficialCommandHandler
self.openai_command_handler = OpenAIOfficialCommandHandler(self.command_manager)
+1
View File
@@ -65,6 +65,7 @@ class StatRoute(Route):
"platform": self.db_helper.get_grouped_base_stats(offset_sec).platform,
"message_count": self.db_helper.get_total_message_count() or 0,
"platform_count": len(self.context.platforms),
"plugin_count": len(self.context.cached_plugins),
"message_time_series": message_time_based_stats,
"running": self.format_sec(int(time.time() - self.context._start_running)),
"memory": {
+1 -1
View File
@@ -35,5 +35,5 @@ class AstrBotDashboard():
def run(self):
ip_addr = get_local_ip_addresses()
logger.info(f"仪表盘已启动,可访问 http://{ip_addr}:6185 登录。")
logger.info(f"管理面板已启动,可访问 http://{ip_addr}:6185 登录。")
return self.app.run_task(host="0.0.0.0", port=6185, shutdown_trigger=self.shutdown_trigger_placeholder)
+2 -2
View File
@@ -59,9 +59,9 @@ class CommandManager():
description=description
)
if plugin_metadata:
logger.info(f"已注册 {plugin_metadata.author}/{plugin_metadata.plugin_name} 的指令 {command}")
logger.debug(f"已注册 {plugin_metadata.author}/{plugin_metadata.plugin_name} 的指令 {command}")
else:
logger.info(f"已注册指令 {command}")
logger.debug(f"已注册指令 {command}")
def register_from_pcb(self, pcb: PluginCommandBridge):
for request in pcb.plugin_commands_waitlist:
-1
View File
@@ -25,7 +25,6 @@ class PlatformManager():
tasks = []
platforms = self.context.config_helper.platform
logger.info(f"加载 {len(platforms)} 个机器人消息平台...")
for platform in platforms:
if not platform.enable:
continue
-2
View File
@@ -167,8 +167,6 @@ class PluginManager():
plugin_path = os.path.join(self.plugin_store_path, root_dir_name)
metadata = self.load_plugin_metadata(plugin_path=plugin_path, plugin_obj=obj)
logger.info(f"插件 {metadata.plugin_name}({metadata.author}) 加载成功。")
if module_path not in registered_map:
cached_plugins.append(RegisteredPlugin(
+1 -2
View File
@@ -55,8 +55,7 @@ class ProviderOpenAIOfficial(Provider):
logger.info("正在载入分词器 cl100k_base...")
self.tokenizer = tiktoken.get_encoding("cl100k_base") # todo: 根据 model 切换分词器
logger.info("分词器载入完成。")
self.DEFAULT_PERSONALITY = {
"prompt": self.llm_config.default_personality,
"name": "default"
+1 -1
View File
@@ -278,7 +278,7 @@ CONFIG_METADATA_2 = {
"https_proxy": {"description": "HTTPS 代理", "type": "string", "hint": "启用后,会以添加环境变量的方式设置代理。格式为 `http://ip:port`"},
"http_proxy": {"description": "HTTP 代理", "type": "string", "hint": "启用后,会以添加环境变量的方式设置代理。格式为 `http://ip:port`"},
"dashboard": {
"description": "仪表盘配置",
"description": "管理面板配置",
"type": "object",
"items": {
"enable": {"description": "启用", "type": "bool"},
+1 -1
View File
@@ -56,7 +56,7 @@ class LogManager:
console_handler = logging.StreamHandler()
console_handler.setLevel(logging.DEBUG)
console_formatter = colorlog.ColoredFormatter(
fmt='%(log_color)s [%(asctime)s| %(levelname)s] [%(funcName)s|%(filename)s:%(lineno)d]: %(message)s %(reset)s',
fmt='%(log_color)s [%(asctime)s| %(levelname)s] [%(filename)s:%(lineno)d]: %(message)s %(reset)s',
datefmt='%H:%M:%S',
log_colors=log_color_config
)