@@ -26,3 +26,5 @@ venv/*
|
||||
packages/python_interpreter/workplace
|
||||
.venv/*
|
||||
.conda/
|
||||
.idea/
|
||||
pytest.ini
|
||||
|
||||
@@ -150,8 +150,9 @@ class LLMRequestSubStage(Stage):
|
||||
# text completion
|
||||
if llm_response.result_chain:
|
||||
event.set_result(
|
||||
MessageEventResult(chain=llm_response.result_chain.chain)
|
||||
.set_result_content_type(ResultContentType.LLM_RESULT)
|
||||
MessageEventResult(
|
||||
chain=llm_response.result_chain.chain
|
||||
).set_result_content_type(ResultContentType.LLM_RESULT)
|
||||
)
|
||||
else:
|
||||
event.set_result(
|
||||
|
||||
@@ -96,7 +96,9 @@ class QQOfficialWebhook:
|
||||
return {"opcode": 12}
|
||||
|
||||
async def start_polling(self):
|
||||
logger.info(f"将在 {self.callback_server_host}:{self.port} 端口启动 QQ 官方机器人 webhook 适配器。")
|
||||
logger.info(
|
||||
f"将在 {self.callback_server_host}:{self.port} 端口启动 QQ 官方机器人 webhook 适配器。"
|
||||
)
|
||||
await self.server.run_task(
|
||||
host=self.callback_server_host,
|
||||
port=self.port,
|
||||
|
||||
@@ -87,7 +87,9 @@ class WecomServer:
|
||||
return "success"
|
||||
|
||||
async def start_polling(self):
|
||||
logger.info(f"将在 {self.callback_server_host}:{self.port} 端口启动 企业微信 适配器。")
|
||||
logger.info(
|
||||
f"将在 {self.callback_server_host}:{self.port} 端口启动 企业微信 适配器。"
|
||||
)
|
||||
await self.server.run_task(
|
||||
host=self.callback_server_host,
|
||||
port=self.port,
|
||||
|
||||
@@ -73,7 +73,7 @@ class FuncCall:
|
||||
handler=handler,
|
||||
)
|
||||
self.func_list.append(_func)
|
||||
logger.info(f"添加了函数调用工具({len(self.func_list)}): {name} - {desc}")
|
||||
logger.info(f"添加函数调用工具: {name}")
|
||||
|
||||
def remove_func(self, name: str) -> None:
|
||||
"""
|
||||
|
||||
@@ -358,7 +358,9 @@ def register_llm_tool(name: str = None):
|
||||
}
|
||||
)
|
||||
md = get_handler_or_create(awaitable, EventType.OnCallingFuncToolEvent)
|
||||
llm_tools.add_func(llm_tool_name, args, docstring.description, md.handler)
|
||||
llm_tools.add_func(
|
||||
llm_tool_name, args, docstring.description.strip(), md.handler
|
||||
)
|
||||
return awaitable
|
||||
|
||||
return decorator
|
||||
|
||||
@@ -151,7 +151,9 @@ class AstrBotDashboard:
|
||||
display += " ➜ 默认用户名和密码: astrbot\n ✨✨✨\n"
|
||||
|
||||
if not ip_addr:
|
||||
display += "可在 data/cmd_config.json 中配置 dashboard.host 以便远程访问。\n"
|
||||
display += (
|
||||
"可在 data/cmd_config.json 中配置 dashboard.host 以便远程访问。\n"
|
||||
)
|
||||
|
||||
logger.info(display)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user