tweek 0.4.0__py3-none-any.whl → 0.4.1__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.
- tweek/__init__.py +1 -1
- tweek/security/llm_reviewer.py +8 -6
- {tweek-0.4.0.dist-info → tweek-0.4.1.dist-info}/METADATA +1 -1
- {tweek-0.4.0.dist-info → tweek-0.4.1.dist-info}/RECORD +9 -9
- {tweek-0.4.0.dist-info → tweek-0.4.1.dist-info}/WHEEL +0 -0
- {tweek-0.4.0.dist-info → tweek-0.4.1.dist-info}/entry_points.txt +0 -0
- {tweek-0.4.0.dist-info → tweek-0.4.1.dist-info}/licenses/LICENSE +0 -0
- {tweek-0.4.0.dist-info → tweek-0.4.1.dist-info}/licenses/NOTICE +0 -0
- {tweek-0.4.0.dist-info → tweek-0.4.1.dist-info}/top_level.txt +0 -0
tweek/__init__.py
CHANGED
tweek/security/llm_reviewer.py
CHANGED
|
@@ -528,15 +528,17 @@ class GoogleReviewProvider(ReviewProvider):
|
|
|
528
528
|
self._model = model
|
|
529
529
|
self._api_key = api_key
|
|
530
530
|
self._timeout = timeout
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
531
|
+
self._configured = False
|
|
532
|
+
|
|
533
|
+
def _ensure_configured(self):
|
|
534
|
+
"""Lazily configure the SDK on first use (avoids blocking API calls at init)."""
|
|
535
|
+
if not self._configured:
|
|
536
|
+
genai.configure(api_key=self._api_key)
|
|
537
|
+
self._configured = True
|
|
536
538
|
|
|
537
539
|
def call(self, system_prompt: str, user_prompt: str, max_tokens: int = 256) -> str:
|
|
538
540
|
try:
|
|
539
|
-
|
|
541
|
+
self._ensure_configured()
|
|
540
542
|
model = genai.GenerativeModel(
|
|
541
543
|
model_name=self._model,
|
|
542
544
|
system_instruction=system_prompt,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
tweek/__init__.py,sha256=
|
|
1
|
+
tweek/__init__.py,sha256=Yok2ar0ngfNDc-NyYeDnL5rfwdj_htDZ0SX9sUqD1lY,359
|
|
2
2
|
tweek/_keygen.py,sha256=UapwIKNSwaRWdqHoJoF3hmKuiux6aIiFGe8WVskTbI8,1286
|
|
3
3
|
tweek/audit.py,sha256=AzjIpy6Jc-WzTrda9lb3nZbyaR_SDWUxo04pObJP2MQ,8868
|
|
4
4
|
tweek/cli.py,sha256=OOZrpcrwDGbmaHxIyvBw7MoVSlEdrFNAgIwWHI56p5M,2976
|
|
@@ -113,7 +113,7 @@ tweek/screening/context.py,sha256=iZeD6-Fm7dNs5wlIu15MlMbIPzeTX_Pe0DUkK5xHpQ0,30
|
|
|
113
113
|
tweek/security/__init__.py,sha256=2qkoxVHzWeHdVWYHRYZG479Qpfodl6jNCQu_Wc3i1vM,901
|
|
114
114
|
tweek/security/integrity.py,sha256=QMW5Zu5PaZHC5DLwumnIq7CUOw-iqs_7AMlijLonXj4,2689
|
|
115
115
|
tweek/security/language.py,sha256=690g63NoeKjwxPG0d38USa1w30QtsAohiT2SXBv-ON4,9128
|
|
116
|
-
tweek/security/llm_reviewer.py,sha256=
|
|
116
|
+
tweek/security/llm_reviewer.py,sha256=NnelRwC6ie_KzxV_2MYjuVPaWUVf61QN7ORuKSM5sVY,53335
|
|
117
117
|
tweek/security/local_model.py,sha256=fqWQOSiAcWVIM1zzy6SosXVh9hNHJbLRzTJPy9I3sFs,10451
|
|
118
118
|
tweek/security/local_reviewer.py,sha256=0BzFx8U42KucBL14rpUbXZ8zxsu9ALHGhVosVcj0uh0,6890
|
|
119
119
|
tweek/security/model_registry.py,sha256=zi0mYyTzWc6BL2W7Kd1gCLNti0N8OygKpwL94Re8Kzw,13795
|
|
@@ -136,11 +136,11 @@ tweek/skills/scanner.py,sha256=YlH-yg3_JuwmBvmnpqA4PVfWyNBHaPSjBo6d9Ncuh8k,27574
|
|
|
136
136
|
tweek/vault/__init__.py,sha256=L408fjdRYL8-VqLEsyyHSO9PkBDhd_2mPIbrCu53YhM,980
|
|
137
137
|
tweek/vault/cross_platform.py,sha256=D4UvX_7OpSo8iRx5sc2OUUWQIk8JHhgeFBYk1MbyIj4,8251
|
|
138
138
|
tweek/vault/keychain.py,sha256=XL18-SUj7HwuqxLXZDViuCH81--KMu68jN9Szn1aeyw,10624
|
|
139
|
-
tweek-0.4.
|
|
140
|
-
tweek-0.4.
|
|
139
|
+
tweek-0.4.1.dist-info/licenses/LICENSE,sha256=rjoDzr1vAf0bsqZglpIyekU5aewIkCk4jHZZDvVI2BE,15269
|
|
140
|
+
tweek-0.4.1.dist-info/licenses/NOTICE,sha256=taQokyDes5UTRNEC67G-13VmqvUyTOncrrT33pCcWL0,8729
|
|
141
141
|
tweek-openclaw-plugin/node_modules/flatted/python/flatted.py,sha256=UYburBDqkySaTfSpntPCUJRxiBGcplusJM7ECX8FEgA,3860
|
|
142
|
-
tweek-0.4.
|
|
143
|
-
tweek-0.4.
|
|
144
|
-
tweek-0.4.
|
|
145
|
-
tweek-0.4.
|
|
146
|
-
tweek-0.4.
|
|
142
|
+
tweek-0.4.1.dist-info/METADATA,sha256=0yNrHwETKn3gL-nzeTgoFJiDkbMJPNjp7IpJOUyqKWA,11992
|
|
143
|
+
tweek-0.4.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
144
|
+
tweek-0.4.1.dist-info/entry_points.txt,sha256=YXThD6UiF5XQXwqW33sphsvz-Bl4Zm6pm-xq-5wcCYE,1337
|
|
145
|
+
tweek-0.4.1.dist-info/top_level.txt,sha256=jtNcCxjoGXN8IBqEVL0F3LHDrZD_B0S-4XF9-Ur7Pbc,28
|
|
146
|
+
tweek-0.4.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|