sycommon-python-lib 0.2.6a9__py3-none-any.whl → 0.2.6a10__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.
- sycommon/config/Config.py +15 -0
- sycommon/database/async_database_service.py +0 -15
- {sycommon_python_lib-0.2.6a9.dist-info → sycommon_python_lib-0.2.6a10.dist-info}/METADATA +7 -7
- {sycommon_python_lib-0.2.6a9.dist-info → sycommon_python_lib-0.2.6a10.dist-info}/RECORD +7 -7
- {sycommon_python_lib-0.2.6a9.dist-info → sycommon_python_lib-0.2.6a10.dist-info}/WHEEL +0 -0
- {sycommon_python_lib-0.2.6a9.dist-info → sycommon_python_lib-0.2.6a10.dist-info}/entry_points.txt +0 -0
- {sycommon_python_lib-0.2.6a9.dist-info → sycommon_python_lib-0.2.6a10.dist-info}/top_level.txt +0 -0
sycommon/config/Config.py
CHANGED
|
@@ -170,6 +170,21 @@ class Config(metaclass=SingletonMeta):
|
|
|
170
170
|
logger.warning("Invalid Elasticsearch configuration: %s", e)
|
|
171
171
|
|
|
172
172
|
def set_attr(self, share_configs: dict):
|
|
173
|
+
# Merge order:
|
|
174
|
+
# 1. self.config — local app.yaml
|
|
175
|
+
# 2. share_configs['llm'] — shared LLM defaults (expanded to top-level)
|
|
176
|
+
# 3. share_configs — all shared configs (keyed by dataId)
|
|
173
177
|
self.config = {**self.config, **
|
|
174
178
|
share_configs.get('llm', {}), **share_configs}
|
|
179
|
+
|
|
180
|
+
# Project-specific override: if the Nacos config whose dataId matches
|
|
181
|
+
# the application Name contains LLMConfig/EmbeddingConfig/RerankerConfig,
|
|
182
|
+
# those entries take priority (full override) over the shared llm defaults.
|
|
183
|
+
app_name = self.config.get('Name', '')
|
|
184
|
+
project_cfg = share_configs.get(app_name, {})
|
|
185
|
+
override_keys = ['LLMConfig', 'EmbeddingConfig', 'RerankerConfig']
|
|
186
|
+
for k in override_keys:
|
|
187
|
+
if k in project_cfg:
|
|
188
|
+
self.config[k] = project_cfg[k]
|
|
189
|
+
|
|
175
190
|
self._process_config()
|
|
@@ -1,21 +1,6 @@
|
|
|
1
1
|
from sqlalchemy.ext.asyncio import create_async_engine, AsyncSession
|
|
2
2
|
from sqlalchemy import text, event
|
|
3
3
|
|
|
4
|
-
# Fix: aiomysql's AsyncAdapt ping() requires 'reconnect' positional arg,
|
|
5
|
-
# but SQLAlchemy's pymysql dialect calls ping() without it.
|
|
6
|
-
# aiomysql asserts reconnect must be False (async reconnection is handled by pool).
|
|
7
|
-
from sqlalchemy.dialects.mysql.pymysql import MySQLDialect_pymysql
|
|
8
|
-
|
|
9
|
-
_original_do_ping = MySQLDialect_pymysql.do_ping
|
|
10
|
-
|
|
11
|
-
def _patched_do_ping(self, dbapi_connection):
|
|
12
|
-
try:
|
|
13
|
-
return _original_do_ping(self, dbapi_connection)
|
|
14
|
-
except TypeError:
|
|
15
|
-
dbapi_connection.ping(reconnect=False)
|
|
16
|
-
|
|
17
|
-
MySQLDialect_pymysql.do_ping = _patched_do_ping
|
|
18
|
-
|
|
19
4
|
from sycommon.config.Config import SingletonMeta
|
|
20
5
|
from sycommon.config.DatabaseConfig import DatabaseConfig, convert_dict_keys
|
|
21
6
|
from sycommon.logging.kafka_log import SYLogger
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sycommon-python-lib
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6a10
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -9,16 +9,16 @@ Requires-Dist: aiohttp==3.14.1
|
|
|
9
9
|
Requires-Dist: aiomysql==0.3.2
|
|
10
10
|
Requires-Dist: anyio==4.13.0
|
|
11
11
|
Requires-Dist: decorator==5.3.1
|
|
12
|
-
Requires-Dist: deepagents==0.6.
|
|
12
|
+
Requires-Dist: deepagents==0.6.10
|
|
13
13
|
Requires-Dist: elasticsearch==9.4.1
|
|
14
14
|
Requires-Dist: fastapi==0.136.3
|
|
15
15
|
Requires-Dist: jinja2==3.1.6
|
|
16
16
|
Requires-Dist: kafka-python==3.0.0
|
|
17
|
-
Requires-Dist: langchain==1.3.
|
|
18
|
-
Requires-Dist: langchain-core==1.4.
|
|
19
|
-
Requires-Dist: langchain-openai==1.3.
|
|
17
|
+
Requires-Dist: langchain==1.3.9
|
|
18
|
+
Requires-Dist: langchain-core==1.4.7
|
|
19
|
+
Requires-Dist: langchain-openai==1.3.2
|
|
20
20
|
Requires-Dist: langfuse==4.7.1
|
|
21
|
-
Requires-Dist: langgraph==1.2.
|
|
21
|
+
Requires-Dist: langgraph==1.2.5
|
|
22
22
|
Requires-Dist: langgraph-checkpoint-postgres==3.1.0
|
|
23
23
|
Requires-Dist: langgraph-checkpoint-redis==0.4.1
|
|
24
24
|
Requires-Dist: ldap3==2.9.1
|
|
@@ -34,7 +34,7 @@ Requires-Dist: pyyaml==6.0.3
|
|
|
34
34
|
Requires-Dist: redis==7.4.0
|
|
35
35
|
Requires-Dist: sentry-sdk[fastapi]==2.62.0
|
|
36
36
|
Requires-Dist: sqlalchemy[asyncio]==2.0.50
|
|
37
|
-
Requires-Dist: starlette[full]==1.3.
|
|
37
|
+
Requires-Dist: starlette[full]==1.3.1
|
|
38
38
|
Requires-Dist: tiktoken==0.13.0
|
|
39
39
|
Requires-Dist: uvicorn==0.49.0
|
|
40
40
|
Requires-Dist: wecom-aibot-python-sdk==1.0.2
|
|
@@ -155,7 +155,7 @@ sycommon/auth/oa_cache.py,sha256=u673y-mK-xo24pSqvfjL68_YFASO2zoxd_iAQ0HetCo,349
|
|
|
155
155
|
sycommon/auth/oa_crypto.py,sha256=xpY1R1Bj3KLENXB0TuThB6Eku1E9PYjcoSpOdgDmCgc,1898
|
|
156
156
|
sycommon/auth/oa_service.py,sha256=kLepV9zgqpZoaB73DRPpMA5tJJQjoaDtQPdzBcGXeak,6235
|
|
157
157
|
sycommon/auth/wecom_ldap_service.py,sha256=8mCOClbdlvky58ISXmV4UfSfUF0aWmPWykACNgjgfTg,30488
|
|
158
|
-
sycommon/config/Config.py,sha256=
|
|
158
|
+
sycommon/config/Config.py,sha256=URfJr58jaML5FNWsb2h35-Os-c6Ex4VmKGipE0k_noE,7559
|
|
159
159
|
sycommon/config/DatabaseConfig.py,sha256=ILiUuYT9_xJZE2W-RYuC3JCt_YLKc1sbH13-MHIOPhg,804
|
|
160
160
|
sycommon/config/ElasticsearchConfig.py,sha256=fO9ZPMgJxSg1-UyDJ90wO6UvYy-jscwPJsSkXgx9qTU,2308
|
|
161
161
|
sycommon/config/EmbeddingConfig.py,sha256=gPKwiDYbeu1GpdIZXMmgqM7JqBIzCXi0yYuGRLZooMI,362
|
|
@@ -169,7 +169,7 @@ sycommon/config/SentryConfig.py,sha256=OsLb3G9lTsCSZ7tWkcXWJHmvfILQopBxje5pjnkFJ
|
|
|
169
169
|
sycommon/config/XxlJobConfig.py,sha256=VSG6dn9ysfUVunOs7PqugyZUGJWmX_cEePz2ZCfqHtU,392
|
|
170
170
|
sycommon/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
171
171
|
sycommon/database/async_base_db_service.py,sha256=yo3hhz4UlKtYBY3DoyJjqXfDJPNfhNdGivvzPkW2S_I,4469
|
|
172
|
-
sycommon/database/async_database_service.py,sha256=
|
|
172
|
+
sycommon/database/async_database_service.py,sha256=pwegaNtZs0T2fz1RN6RSJpnfvFfbysb-1OV_-F_-oFU,4814
|
|
173
173
|
sycommon/database/base_db_service.py,sha256=urdAibaCUt3hxwwKzEMBceWkIwsw3ja_WDJ1QKc8nLU,4116
|
|
174
174
|
sycommon/database/database_service.py,sha256=rbbII50EI4VTTkwrFiw9PnvW6LgR5yQvN8aJblUu1Oc,4352
|
|
175
175
|
sycommon/database/elasticsearch_service.py,sha256=qm490GRlxZlYsQgyfyclSbARRP1-Tc4Lwav3lbPINvQ,3092
|
|
@@ -290,8 +290,8 @@ sycommon/tools/syemail.py,sha256=BDFhgf7WDOQeTcjxJEQdu0dQhnHFPO_p3eI0-Ni3LhQ,561
|
|
|
290
290
|
sycommon/tools/timing.py,sha256=OiiE7P07lRoMzX9kzb8sZU9cDb0zNnqIlY5pWqHcnkY,2064
|
|
291
291
|
sycommon/xxljob/__init__.py,sha256=7eoBlQxv-B39IfRSCY2bkqdGYs1QRe1umAWd88VMEEM,86
|
|
292
292
|
sycommon/xxljob/xxljob_service.py,sha256=JIEJaGXhqrTLcyxlyynSrsHg9bBnDNzX-D4qIWLRPUE,6815
|
|
293
|
-
sycommon_python_lib-0.2.
|
|
294
|
-
sycommon_python_lib-0.2.
|
|
295
|
-
sycommon_python_lib-0.2.
|
|
296
|
-
sycommon_python_lib-0.2.
|
|
297
|
-
sycommon_python_lib-0.2.
|
|
293
|
+
sycommon_python_lib-0.2.6a10.dist-info/METADATA,sha256=I-Uv2JZedmmgMZCHcwSRmN2dFK7MvDKaQd0pvzJm5XM,7945
|
|
294
|
+
sycommon_python_lib-0.2.6a10.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
295
|
+
sycommon_python_lib-0.2.6a10.dist-info/entry_points.txt,sha256=gsR4SssKxDWjRU8ggidzNcdMXDPRSKRS7UaGyNP84Qg,92
|
|
296
|
+
sycommon_python_lib-0.2.6a10.dist-info/top_level.txt,sha256=RgphKrg7nJyZ7irJqbxFr-5H2LUYTvI7ivoWZH2hcD0,29
|
|
297
|
+
sycommon_python_lib-0.2.6a10.dist-info/RECORD,,
|
|
File without changes
|
{sycommon_python_lib-0.2.6a9.dist-info → sycommon_python_lib-0.2.6a10.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{sycommon_python_lib-0.2.6a9.dist-info → sycommon_python_lib-0.2.6a10.dist-info}/top_level.txt
RENAMED
|
File without changes
|