Commit
·
d6836a4
1
Parent(s):
4b1ab89
Fix the lint issue
Browse files- examples/lightrag_zhipu_postgres_demo.py +0 -10
- lightrag/kg/postgres_impl.py +1 -1
- lightrag/kg/postgres_impl_test.py +3 -6
- requirements.txt +22 -13
examples/lightrag_zhipu_postgres_demo.py
CHANGED
@@ -104,13 +104,3 @@ async def main():
|
|
104 |
|
105 |
if __name__ == "__main__":
|
106 |
asyncio.run(main())
|
107 |
-
|
108 |
-
|
109 |
-
async def print_stream(stream):
|
110 |
-
async for chunk in stream:
|
111 |
-
print(chunk, end="", flush=True)
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
|
|
104 |
|
105 |
if __name__ == "__main__":
|
106 |
asyncio.run(main())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lightrag/kg/postgres_impl.py
CHANGED
@@ -1137,4 +1137,4 @@ SQL_TEMPLATES = {
|
|
1137 |
FROM LIGHTRAG_DOC_CHUNKS where workspace=$1)
|
1138 |
WHERE distance>$2 ORDER BY distance DESC LIMIT $3
|
1139 |
"""
|
1140 |
-
}
|
|
|
1137 |
FROM LIGHTRAG_DOC_CHUNKS where workspace=$1)
|
1138 |
WHERE distance>$2 ORDER BY distance DESC LIMIT $3
|
1139 |
"""
|
1140 |
+
}
|
lightrag/kg/postgres_impl_test.py
CHANGED
@@ -20,10 +20,9 @@ if sys.platform.startswith("win"):
|
|
20 |
async def get_pool():
|
21 |
return await asyncpg.create_pool(
|
22 |
f"postgres://{USER}:{PASSWORD}@{HOST}:{PORT}/{DB}",
|
23 |
-
min_size=10,
|
24 |
-
max_size=10,
|
25 |
-
max_queries=5000,
|
26 |
-
# 最大不活跃时间, 默认 300.0, 超过这个时间的连接就会被关闭, 传入 0 的话则永不关闭
|
27 |
max_inactive_connection_lifetime=300.0
|
28 |
)
|
29 |
|
@@ -118,5 +117,3 @@ async def main():
|
|
118 |
|
119 |
if __name__ == '__main__':
|
120 |
asyncio.run(query_with_age())
|
121 |
-
|
122 |
-
|
|
|
20 |
async def get_pool():
|
21 |
return await asyncpg.create_pool(
|
22 |
f"postgres://{USER}:{PASSWORD}@{HOST}:{PORT}/{DB}",
|
23 |
+
min_size=10,
|
24 |
+
max_size=10,
|
25 |
+
max_queries=5000,
|
|
|
26 |
max_inactive_connection_lifetime=300.0
|
27 |
)
|
28 |
|
|
|
117 |
|
118 |
if __name__ == '__main__':
|
119 |
asyncio.run(query_with_age())
|
|
|
|
requirements.txt
CHANGED
@@ -1,29 +1,38 @@
|
|
1 |
accelerate
|
2 |
-
aioboto3
|
3 |
-
aiohttp
|
4 |
|
5 |
# database packages
|
6 |
graspologic
|
7 |
gremlinpython
|
8 |
hnswlib
|
9 |
nano-vectordb
|
10 |
-
neo4j
|
11 |
-
networkx
|
12 |
-
ollama
|
13 |
-
openai
|
14 |
oracledb
|
15 |
-
psycopg[binary,pool]
|
16 |
pymilvus
|
17 |
pymongo
|
18 |
pymysql
|
19 |
-
pyvis
|
20 |
# lmdeploy[all]
|
21 |
-
sqlalchemy
|
22 |
-
tenacity
|
23 |
|
24 |
|
25 |
# LLM packages
|
26 |
-
tiktoken
|
27 |
-
torch
|
28 |
-
transformers
|
29 |
xxhash
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
accelerate
|
2 |
+
aioboto3~=13.3.0
|
3 |
+
aiohttp~=3.11.11
|
4 |
|
5 |
# database packages
|
6 |
graspologic
|
7 |
gremlinpython
|
8 |
hnswlib
|
9 |
nano-vectordb
|
10 |
+
neo4j~=5.27.0
|
11 |
+
networkx~=3.2.1
|
12 |
+
ollama~=0.4.4
|
13 |
+
openai~=1.58.1
|
14 |
oracledb
|
15 |
+
psycopg[binary,pool]~=3.2.3
|
16 |
pymilvus
|
17 |
pymongo
|
18 |
pymysql
|
19 |
+
pyvis~=0.3.2
|
20 |
# lmdeploy[all]
|
21 |
+
sqlalchemy~=2.0.36
|
22 |
+
tenacity~=9.0.0
|
23 |
|
24 |
|
25 |
# LLM packages
|
26 |
+
tiktoken~=0.8.0
|
27 |
+
torch~=2.5.1+cu121
|
28 |
+
transformers~=4.47.1
|
29 |
xxhash
|
30 |
+
|
31 |
+
numpy~=2.2.0
|
32 |
+
aiofiles~=24.1.0
|
33 |
+
pydantic~=2.10.4
|
34 |
+
python-dotenv~=1.0.1
|
35 |
+
psycopg-pool~=3.2.4
|
36 |
+
tqdm~=4.67.1
|
37 |
+
asyncpg~=0.30.0
|
38 |
+
setuptools~=70.0.0
|