intentkit 0.6.7.dev8__py3-none-any.whl → 0.6.7.dev9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of intentkit might be problematic. Click here for more details.
- intentkit/__init__.py +1 -1
- intentkit/config/config.py +1 -0
- intentkit/models/db.py +8 -4
- {intentkit-0.6.7.dev8.dist-info → intentkit-0.6.7.dev9.dist-info}/METADATA +1 -1
- {intentkit-0.6.7.dev8.dist-info → intentkit-0.6.7.dev9.dist-info}/RECORD +7 -7
- {intentkit-0.6.7.dev8.dist-info → intentkit-0.6.7.dev9.dist-info}/WHEEL +0 -0
- {intentkit-0.6.7.dev8.dist-info → intentkit-0.6.7.dev9.dist-info}/licenses/LICENSE +0 -0
intentkit/__init__.py
CHANGED
intentkit/config/config.py
CHANGED
|
@@ -59,6 +59,7 @@ class Config:
|
|
|
59
59
|
}
|
|
60
60
|
# ==== this part can be load from env or aws secrets manager
|
|
61
61
|
self.db["auto_migrate"] = self.load("DB_AUTO_MIGRATE", "true") == "true"
|
|
62
|
+
self.db["pool_size"] = int(self.load("DB_POOL_SIZE", "3"))
|
|
62
63
|
self.debug = self.load("DEBUG") == "true"
|
|
63
64
|
self.debug_checkpoint = (
|
|
64
65
|
self.load("DEBUG_CHECKPOINT", "false") == "true"
|
intentkit/models/db.py
CHANGED
|
@@ -23,6 +23,9 @@ async def init_db(
|
|
|
23
23
|
auto_migrate: Annotated[
|
|
24
24
|
bool, Field(default=True, description="Whether to run migrations automatically")
|
|
25
25
|
],
|
|
26
|
+
pool_size: Annotated[
|
|
27
|
+
int, Field(default=3, description="Database connection pool size")
|
|
28
|
+
] = 3,
|
|
26
29
|
) -> None:
|
|
27
30
|
"""Initialize the database and handle schema updates.
|
|
28
31
|
|
|
@@ -33,6 +36,7 @@ async def init_db(
|
|
|
33
36
|
dbname: Database name
|
|
34
37
|
port: Database port (default: 5432)
|
|
35
38
|
auto_migrate: Whether to run migrations automatically (default: True)
|
|
39
|
+
pool_size: Database connection pool size (default: 3)
|
|
36
40
|
"""
|
|
37
41
|
global engine, _langgraph_checkpointer
|
|
38
42
|
# Initialize psycopg pool and AsyncPostgresSaver if not already initialized
|
|
@@ -43,8 +47,8 @@ async def init_db(
|
|
|
43
47
|
)
|
|
44
48
|
pool = AsyncConnectionPool(
|
|
45
49
|
conninfo=conn_string,
|
|
46
|
-
min_size=
|
|
47
|
-
max_size=
|
|
50
|
+
min_size=pool_size,
|
|
51
|
+
max_size=pool_size * 2,
|
|
48
52
|
timeout=60,
|
|
49
53
|
max_idle=30 * 60,
|
|
50
54
|
)
|
|
@@ -60,8 +64,8 @@ async def init_db(
|
|
|
60
64
|
if host:
|
|
61
65
|
engine = create_async_engine(
|
|
62
66
|
f"postgresql+asyncpg://{username}:{quote_plus(password)}@{host}:{port}/{dbname}",
|
|
63
|
-
pool_size=
|
|
64
|
-
max_overflow=
|
|
67
|
+
pool_size=pool_size,
|
|
68
|
+
max_overflow=pool_size * 2, # Set overflow to 2x pool size
|
|
65
69
|
pool_timeout=60, # Increase timeout
|
|
66
70
|
pool_pre_ping=True, # Enable connection health checks
|
|
67
71
|
pool_recycle=3600, # Recycle connections after 1 hour
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: intentkit
|
|
3
|
-
Version: 0.6.7.
|
|
3
|
+
Version: 0.6.7.dev9
|
|
4
4
|
Summary: Intent-based AI Agent Platform - Core Package
|
|
5
5
|
Project-URL: Homepage, https://github.com/crestal-network/intentkit
|
|
6
6
|
Project-URL: Repository, https://github.com/crestal-network/intentkit
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
intentkit/__init__.py,sha256
|
|
1
|
+
intentkit/__init__.py,sha256=-3WRnUVdb-jXEFtpgFOsHbzT6OUk70NGOPL2cCdTc3A,383
|
|
2
2
|
intentkit/abstracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
intentkit/abstracts/agent.py,sha256=108gb5W8Q1Sy4G55F2_ZFv2-_CnY76qrBtpIr0Oxxqk,1489
|
|
4
4
|
intentkit/abstracts/api.py,sha256=ZUc24vaQvQVbbjznx7bV0lbbQxdQPfEV8ZxM2R6wZWo,166
|
|
@@ -11,7 +11,7 @@ intentkit/clients/__init__.py,sha256=sQ_6_bRC2MPWLPH-skQ3qsEe8ce-dUGL7i8VJOautHg
|
|
|
11
11
|
intentkit/clients/cdp.py,sha256=_CkvnBkzdq7-sFMGct4lz85FpaOoHxOGstWubhClzrA,5921
|
|
12
12
|
intentkit/clients/twitter.py,sha256=Lfa7srHOFnY96SXcElW0jfg7XKS_WliWnXjPZEe6SQc,18976
|
|
13
13
|
intentkit/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
-
intentkit/config/config.py,sha256=
|
|
14
|
+
intentkit/config/config.py,sha256=npQqWffhc2RZ3ECEOQXHp1DP-15aQqQ-xooIBkxDiM0,7576
|
|
15
15
|
intentkit/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
intentkit/core/agent.py,sha256=GIKDn1dTenIHWMRxe-ud7hd1cQaHzbTDdypy5IAgPfU,16658
|
|
17
17
|
intentkit/core/api.py,sha256=3GIMJpwduLUSbVPNW6mQVxZncYHH3OlLwdiqFtYtEAE,1208
|
|
@@ -29,7 +29,7 @@ intentkit/models/base.py,sha256=o-zRjVrak-f5Jokdvj8BjLm8gcC3yYiYMCTLegwT2lA,185
|
|
|
29
29
|
intentkit/models/chat.py,sha256=O-7qmFh9Qag-gY2xXR6tpLJ1i-D0wQzzZ1hXnrt0BA0,19052
|
|
30
30
|
intentkit/models/conversation.py,sha256=nrbDIw-3GK5BYi_xkI15FLdx4a6SNrFK8wfAGLCsrqk,9032
|
|
31
31
|
intentkit/models/credit.py,sha256=bcasHyrCwforLGrH8ZWEvN6y6ml7NeAFrGl8cfqvqbI,42956
|
|
32
|
-
intentkit/models/db.py,sha256=
|
|
32
|
+
intentkit/models/db.py,sha256=nuDX6NEtnfD5YLr2iVpAAXsgHbSpG5diqfLC-PkHsA4,4406
|
|
33
33
|
intentkit/models/db_mig.py,sha256=vT6Tanm-BHC2T7dTztuB1UG494EFBAlHADKsNzR6xaQ,3577
|
|
34
34
|
intentkit/models/generator.py,sha256=lyZu9U9rZUGkqd_QT5SAhay9DY358JJY8EhDSpN8I1M,10298
|
|
35
35
|
intentkit/models/llm.py,sha256=f_F11cjeXACu5qDB1JaCltWqS_uVb8GqOSmPTq1LYo8,25123
|
|
@@ -395,7 +395,7 @@ intentkit/utils/random.py,sha256=DymMxu9g0kuQLgJUqalvgksnIeLdS-v0aRk5nQU0mLI,452
|
|
|
395
395
|
intentkit/utils/s3.py,sha256=9trQNkKQ5VgxWsewVsV8Y0q_pXzGRvsCYP8xauyUYkg,8549
|
|
396
396
|
intentkit/utils/slack_alert.py,sha256=s7UpRgyzLW7Pbmt8cKzTJgMA9bm4EP-1rQ5KXayHu6E,2264
|
|
397
397
|
intentkit/utils/tx.py,sha256=2yLLGuhvfBEY5n_GJ8wmIWLCzn0FsYKv5kRNzw_sLUI,1454
|
|
398
|
-
intentkit-0.6.7.
|
|
399
|
-
intentkit-0.6.7.
|
|
400
|
-
intentkit-0.6.7.
|
|
401
|
-
intentkit-0.6.7.
|
|
398
|
+
intentkit-0.6.7.dev9.dist-info/METADATA,sha256=tnopKAtx8PE3Or0PaqQCwtlZipwsI5z-UhUPyq7Qdyk,6321
|
|
399
|
+
intentkit-0.6.7.dev9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
400
|
+
intentkit-0.6.7.dev9.dist-info/licenses/LICENSE,sha256=Bln6DhK-LtcO4aXy-PBcdZv2f24MlJFm_qn222biJtE,1071
|
|
401
|
+
intentkit-0.6.7.dev9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|