Fix the lint issue

This commit is contained in:
Samuel Chan
2025-01-04 18:34:35 +08:00
parent db663114a9
commit e053223ef0
4 changed files with 26 additions and 30 deletions

View File

@@ -104,13 +104,3 @@ async def main():
if __name__ == "__main__": if __name__ == "__main__":
asyncio.run(main()) asyncio.run(main())
async def print_stream(stream):
async for chunk in stream:
print(chunk, end="", flush=True)

View File

@@ -1137,4 +1137,4 @@ SQL_TEMPLATES = {
FROM LIGHTRAG_DOC_CHUNKS where workspace=$1) FROM LIGHTRAG_DOC_CHUNKS where workspace=$1)
WHERE distance>$2 ORDER BY distance DESC LIMIT $3 WHERE distance>$2 ORDER BY distance DESC LIMIT $3
""" """
} }

View File

@@ -20,10 +20,9 @@ if sys.platform.startswith("win"):
async def get_pool(): async def get_pool():
return await asyncpg.create_pool( return await asyncpg.create_pool(
f"postgres://{USER}:{PASSWORD}@{HOST}:{PORT}/{DB}", f"postgres://{USER}:{PASSWORD}@{HOST}:{PORT}/{DB}",
min_size=10, # 连接池初始化时默认的最小连接数, 默认为1 0 min_size=10,
max_size=10, # 连接池的最大连接数, 默认为 10 max_size=10,
max_queries=5000, # 每个链接最大查询数量, 超过了就换新的连接, 默认 5000 max_queries=5000,
# 最大不活跃时间, 默认 300.0, 超过这个时间的连接就会被关闭, 传入 0 的话则永不关闭
max_inactive_connection_lifetime=300.0 max_inactive_connection_lifetime=300.0
) )
@@ -118,5 +117,3 @@ async def main():
if __name__ == '__main__': if __name__ == '__main__':
asyncio.run(query_with_age()) asyncio.run(query_with_age())

View File

@@ -1,29 +1,38 @@
accelerate accelerate
aioboto3 aioboto3~=13.3.0
aiohttp aiohttp~=3.11.11
# database packages # database packages
graspologic graspologic
gremlinpython gremlinpython
hnswlib hnswlib
nano-vectordb nano-vectordb
neo4j neo4j~=5.27.0
networkx networkx~=3.2.1
ollama ollama~=0.4.4
openai openai~=1.58.1
oracledb oracledb
psycopg[binary,pool] psycopg[binary,pool]~=3.2.3
pymilvus pymilvus
pymongo pymongo
pymysql pymysql
pyvis pyvis~=0.3.2
# lmdeploy[all] # lmdeploy[all]
sqlalchemy sqlalchemy~=2.0.36
tenacity tenacity~=9.0.0
# LLM packages # LLM packages
tiktoken tiktoken~=0.8.0
torch torch~=2.5.1+cu121
transformers transformers~=4.47.1
xxhash xxhash
numpy~=2.2.0
aiofiles~=24.1.0
pydantic~=2.10.4
python-dotenv~=1.0.1
psycopg-pool~=3.2.4
tqdm~=4.67.1
asyncpg~=0.30.0
setuptools~=70.0.0