Compare commits

...

7 Commits

Author SHA1 Message Date
Junyan Qin
bf279049c0 chore: bump version 4.3.2 2025-09-17 13:57:45 +08:00
Junyan Qin
05cc58f2d7 fix: bad plugin runtime ws url in migration 2025-09-17 13:55:59 +08:00
Junyan Qin
d887881ea0 chore: bump version 4.3.1 2025-09-17 09:52:07 +08:00
Junyan Qin
8bb2f3e745 fix: migration bug of plugin config 2025-09-16 17:04:44 +08:00
Junyan Qin
e7e6eeda61 feat: remove legacy plugin deps checking 2025-09-16 15:11:10 +08:00
Junyan Qin
b6ff2be4df chore: remove docker-compose.yaml in root dir 2025-09-16 15:00:43 +08:00
Junyan Qin
a2ea185602 chore: bump langbot_plugin to 0.1.1 2025-09-16 12:36:39 +08:00
7 changed files with 18 additions and 32 deletions

View File

@@ -1,17 +0,0 @@
# This file is deprecated, and will be replaced by docker/docker-compose.yaml in next version.
version: "3"
services:
langbot:
image: rockchin/langbot:latest
container_name: langbot
volumes:
- ./data:/app/data
- ./plugins:/app/plugins
restart: on-failure
environment:
- TZ=Asia/Shanghai
ports:
- 5300:5300 # 供 WebUI 使用
- 2280-2290:2280-2290 # 供消息平台适配器方向连接
# 根据具体环境配置网络

View File

@@ -18,7 +18,6 @@ asciiart = r"""
async def main_entry(loop: asyncio.AbstractEventLoop): async def main_entry(loop: asyncio.AbstractEventLoop):
parser = argparse.ArgumentParser(description='LangBot') parser = argparse.ArgumentParser(description='LangBot')
parser.add_argument('--skip-plugin-deps-check', action='store_true', help='跳过插件依赖项检查', default=False)
parser.add_argument('--standalone-runtime', action='store_true', help='使用独立插件运行时', default=False) parser.add_argument('--standalone-runtime', action='store_true', help='使用独立插件运行时', default=False)
args = parser.parse_args() args = parser.parse_args()
@@ -49,10 +48,6 @@ async def main_entry(loop: asyncio.AbstractEventLoop):
print('The missing dependencies have been installed automatically, please restart the program.') print('The missing dependencies have been installed automatically, please restart the program.')
sys.exit(0) sys.exit(0)
# check plugin deps
if not args.skip_plugin_deps_check:
await deps.precheck_plugin_deps()
# # 检查pydantic版本如果没有 pydantic.v1则把 pydantic 映射为 v1 # # 检查pydantic版本如果没有 pydantic.v1则把 pydantic 映射为 v1
# import pydantic.version # import pydantic.version

View File

@@ -14,10 +14,14 @@ class SystemRouterGroup(group.RouterGroup):
'version': constants.semantic_version, 'version': constants.semantic_version,
'debug': constants.debug_mode, 'debug': constants.debug_mode,
'enabled_platform_count': len(self.ap.platform_mgr.get_running_adapters()), 'enabled_platform_count': len(self.ap.platform_mgr.get_running_adapters()),
'enable_marketplace': self.ap.instance_config.data['plugin'].get('enable_marketplace', True), 'enable_marketplace': self.ap.instance_config.data.get('plugin', {}).get(
'enable_marketplace', True
),
'cloud_service_url': ( 'cloud_service_url': (
self.ap.instance_config.data['plugin']['cloud_service_url'] self.ap.instance_config.data.get('plugin', {}).get(
if 'cloud_service_url' in self.ap.instance_config.data['plugin'] 'cloud_service_url', 'https://space.langbot.app'
)
if 'cloud_service_url' in self.ap.instance_config.data.get('plugin', {})
else 'https://space.langbot.app' else 'https://space.langbot.app'
), ),
} }

View File

@@ -1,7 +1,7 @@
from .. import migration from .. import migration
@migration.migration_class(4) @migration.migration_class(8)
class DBMigratePluginConfig(migration.DBMigration): class DBMigratePluginConfig(migration.DBMigration):
"""插件配置""" """插件配置"""
@@ -10,7 +10,9 @@ class DBMigratePluginConfig(migration.DBMigration):
if 'plugin' not in self.ap.instance_config.data: if 'plugin' not in self.ap.instance_config.data:
self.ap.instance_config.data['plugin'] = { self.ap.instance_config.data['plugin'] = {
'runtime_ws_url': 'ws://localhost:5400/control/ws', 'runtime_ws_url': 'ws://langbot_plugin_runtime:5400/control/ws',
'enable_marketplace': True,
'cloud_service_url': 'https://space.langbot.app',
} }
await self.ap.instance_config.dump_config() await self.ap.instance_config.dump_config()

View File

@@ -73,7 +73,9 @@ class PluginRuntimeConnector:
if platform.get_platform() == 'docker' or platform.use_websocket_to_connect_plugin_runtime(): # use websocket if platform.get_platform() == 'docker' or platform.use_websocket_to_connect_plugin_runtime(): # use websocket
self.ap.logger.info('use websocket to connect to plugin runtime') self.ap.logger.info('use websocket to connect to plugin runtime')
ws_url = self.ap.instance_config.data['plugin']['runtime_ws_url'] ws_url = self.ap.instance_config.data.get('plugin', {}).get(
'runtime_ws_url', 'ws://langbot_plugin_runtime:5400/control/ws'
)
async def make_connection_failed_callback(ctrl: ws_client_controller.WebSocketClientController) -> None: async def make_connection_failed_callback(ctrl: ws_client_controller.WebSocketClientController) -> None:
self.ap.logger.error('Failed to connect to plugin runtime, trying to reconnect...') self.ap.logger.error('Failed to connect to plugin runtime, trying to reconnect...')

View File

@@ -1,6 +1,6 @@
semantic_version = 'v4.3.0' semantic_version = 'v4.3.2'
required_database_version = 7 required_database_version = 8
"""Tag the version of the database schema, used to check if the database needs to be migrated""" """Tag the version of the database schema, used to check if the database needs to be migrated"""
debug_mode = False debug_mode = False

View File

@@ -1,6 +1,6 @@
[project] [project]
name = "langbot" name = "langbot"
version = "4.3.0" version = "4.3.1"
description = "Easy-to-use global IM bot platform designed for LLM era" description = "Easy-to-use global IM bot platform designed for LLM era"
readme = "README.md" readme = "README.md"
requires-python = ">=3.10.1,<4.0" requires-python = ">=3.10.1,<4.0"
@@ -62,7 +62,7 @@ dependencies = [
"langchain>=0.2.0", "langchain>=0.2.0",
"chromadb>=0.4.24", "chromadb>=0.4.24",
"qdrant-client (>=1.15.1,<2.0.0)", "qdrant-client (>=1.15.1,<2.0.0)",
"langbot-plugin==0.1.1b8", "langbot-plugin==0.1.1",
"asyncpg>=0.30.0", "asyncpg>=0.30.0",
"line-bot-sdk>=3.19.0" "line-bot-sdk>=3.19.0"
] ]