agent-lab-sdk 0.1.28__py3-none-any.whl → 0.1.30__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 agent-lab-sdk might be problematic. Click here for more details.
- agent_lab_sdk/llm/throttled.py +12 -4
- {agent_lab_sdk-0.1.28.dist-info → agent_lab_sdk-0.1.30.dist-info}/METADATA +1 -1
- {agent_lab_sdk-0.1.28.dist-info → agent_lab_sdk-0.1.30.dist-info}/RECORD +6 -6
- {agent_lab_sdk-0.1.28.dist-info → agent_lab_sdk-0.1.30.dist-info}/WHEEL +0 -0
- {agent_lab_sdk-0.1.28.dist-info → agent_lab_sdk-0.1.30.dist-info}/licenses/LICENSE +0 -0
- {agent_lab_sdk-0.1.28.dist-info → agent_lab_sdk-0.1.30.dist-info}/top_level.txt +0 -0
agent_lab_sdk/llm/throttled.py
CHANGED
|
@@ -110,7 +110,7 @@ _semaphores = {
|
|
|
110
110
|
|
|
111
111
|
class ThrottledGigaChatEmbeddings(GigaChatEmbeddings):
|
|
112
112
|
_manage_access_token: bool = PrivateAttr(default=True)
|
|
113
|
-
_base_kwargs:
|
|
113
|
+
_base_kwargs: dict = PrivateAttr(default={})
|
|
114
114
|
|
|
115
115
|
def __init__(self, *args, manage_access_token=True, **kwargs):
|
|
116
116
|
print(self)
|
|
@@ -125,7 +125,7 @@ class ThrottledGigaChatEmbeddings(GigaChatEmbeddings):
|
|
|
125
125
|
|
|
126
126
|
def _fresh(self) -> GigaChatEmbeddings:
|
|
127
127
|
if self._manage_access_token:
|
|
128
|
-
return GigaChatEmbeddings(access_token=GigaChatTokenManager, **self._base_kwargs)
|
|
128
|
+
return GigaChatEmbeddings(access_token=GigaChatTokenManager.get_token(), **self._base_kwargs)
|
|
129
129
|
else:
|
|
130
130
|
return self
|
|
131
131
|
|
|
@@ -148,7 +148,7 @@ class ThrottledGigaChatEmbeddings(GigaChatEmbeddings):
|
|
|
148
148
|
|
|
149
149
|
class ThrottledGigaChat(GigaChat):
|
|
150
150
|
_manage_access_token: bool = PrivateAttr(default=True)
|
|
151
|
-
_base_kwargs:
|
|
151
|
+
_base_kwargs: dict = PrivateAttr(default={})
|
|
152
152
|
|
|
153
153
|
def __init__(self, *args, manage_access_token=True, **kwargs):
|
|
154
154
|
print(self)
|
|
@@ -163,7 +163,7 @@ class ThrottledGigaChat(GigaChat):
|
|
|
163
163
|
|
|
164
164
|
def _fresh(self) -> GigaChat:
|
|
165
165
|
if self._manage_access_token:
|
|
166
|
-
return GigaChat(access_token=GigaChatTokenManager, **self._base_kwargs)
|
|
166
|
+
return GigaChat(access_token=GigaChatTokenManager.get_token(), **self._base_kwargs)
|
|
167
167
|
else:
|
|
168
168
|
return self
|
|
169
169
|
|
|
@@ -197,6 +197,14 @@ class ThrottledGigaChat(GigaChat):
|
|
|
197
197
|
async def abatch(self, *args, **kwargs):
|
|
198
198
|
async with _semaphores["chat"]:
|
|
199
199
|
return await self._fresh().abatch(*args, **kwargs)
|
|
200
|
+
|
|
201
|
+
def upload_file(self, *args, **kwargs):
|
|
202
|
+
with _semaphores["chat"]:
|
|
203
|
+
return self._fresh().upload_file(*args, **kwargs)
|
|
204
|
+
|
|
205
|
+
async def aupload_file(self, *args, **kwargs):
|
|
206
|
+
async with _semaphores["chat"]:
|
|
207
|
+
return await self._fresh().aupload_file(*args, **kwargs)
|
|
200
208
|
|
|
201
209
|
def batch_as_completed(self, *args, **kwargs):
|
|
202
210
|
with _semaphores["chat"]:
|
|
@@ -5,7 +5,7 @@ agent_lab_sdk/llm/__init__.py,sha256=Yo9MbYdHS1iX05A9XiJGwWN1Hm4IARGav9mNFPrtDeA
|
|
|
5
5
|
agent_lab_sdk/llm/agw_token_manager.py,sha256=_bPPI8muaEa6H01P8hHQOJHiiivaLd8N_d3OT9UT_80,4787
|
|
6
6
|
agent_lab_sdk/llm/gigachat_token_manager.py,sha256=nlOxHcwJovsmM4cpI4fwMrYjoSeMjelDaHTipXsrUuA,8282
|
|
7
7
|
agent_lab_sdk/llm/llm.py,sha256=HIp97-rs8Xcxokgptgh6bCfkIx7UJUFOYdGbpi7SsSg,1949
|
|
8
|
-
agent_lab_sdk/llm/throttled.py,sha256=
|
|
8
|
+
agent_lab_sdk/llm/throttled.py,sha256=RkDbtCzemaQnQdq3S2obkJ8nSb1ubmcLeZk-0s5xzgc,7582
|
|
9
9
|
agent_lab_sdk/metrics/__init__.py,sha256=G4VSlzKwupPMM4c6vZaF1rnd0KusKarezDMjli9pVFw,57
|
|
10
10
|
agent_lab_sdk/metrics/metrics.py,sha256=_XTT9vMG7T0u_D2pL371wm8GoBU5fodJ45D2RACnBJw,3439
|
|
11
11
|
agent_lab_sdk/schema/__init__.py,sha256=bHSyXQYkcB9fWBlziWodXR_IzC5nKrdKzrCpyVWNY9o,521
|
|
@@ -13,8 +13,8 @@ agent_lab_sdk/schema/input_types.py,sha256=A8yRSFdCo-BSZM50sj-oXge8HdcVz1AkqbBWg
|
|
|
13
13
|
agent_lab_sdk/schema/log_message.py,sha256=nadi6lZGRuDSPmfbYs9QPpRJUT9Pfy8Y7pGCvyFF5Mw,638
|
|
14
14
|
agent_lab_sdk/storage/__init__.py,sha256=ik1_v1DMTwehvcAEXIYxuvLuCjJCa3y5qAuJqoQpuSA,81
|
|
15
15
|
agent_lab_sdk/storage/storage.py,sha256=ELpt7GRwFD-aWa6ctinfA_QwcvzWLvKS0Wz8FlxVqAs,2075
|
|
16
|
-
agent_lab_sdk-0.1.
|
|
17
|
-
agent_lab_sdk-0.1.
|
|
18
|
-
agent_lab_sdk-0.1.
|
|
19
|
-
agent_lab_sdk-0.1.
|
|
20
|
-
agent_lab_sdk-0.1.
|
|
16
|
+
agent_lab_sdk-0.1.30.dist-info/licenses/LICENSE,sha256=_TRXHkF3S9ilWBPdZcHLI_S-PRjK0L_SeOb2pcPAdV4,417
|
|
17
|
+
agent_lab_sdk-0.1.30.dist-info/METADATA,sha256=8wnIgMKSD-rLDmCdS-hApr7BwFTd8mkDqOT6XJsrozg,17884
|
|
18
|
+
agent_lab_sdk-0.1.30.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
19
|
+
agent_lab_sdk-0.1.30.dist-info/top_level.txt,sha256=E1efqkJ89KNmPBWdLzdMHeVtH0dYyCo4fhnSb81_15I,14
|
|
20
|
+
agent_lab_sdk-0.1.30.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|