fix(agents): 为aiosqlite连接添加is_alive方法补丁

build: 在Makefile中添加etcd镜像拉取
This commit is contained in:
Wenjie Zhang 2025-12-15 10:04:30 +08:00
parent a2e2756f5d
commit ff75c2dfb3
2 changed files with 6 additions and 1 deletions

View File

@ -12,6 +12,7 @@ pull:
bash docker/pull_image.sh minio/minio:RELEASE.2023-03-20T20-16-18Z
bash docker/pull_image.sh ghcr.io/astral-sh/uv:0.7.2
bash docker/pull_image.sh nginx:alpine
bash docker/pull_image.sh quay.io/coreos/etcd:v3.5.5
start:
@if [ ! -f .env ]; then \

View File

@ -156,7 +156,11 @@ class BaseAgent:
async def get_async_conn(self) -> aiosqlite.Connection:
"""获取异步数据库连接"""
return await aiosqlite.connect(os.path.join(self.workdir, "aio_history.db"))
conn = await aiosqlite.connect(os.path.join(self.workdir, "aio_history.db"))
# Patch: langgraph's AsyncSqliteSaver expects is_alive() method which aiosqlite may not have
if not hasattr(conn, "is_alive"):
conn.is_alive = lambda: True
return conn
async def get_aio_memory(self) -> AsyncSqliteSaver:
"""获取异步存储实例"""