alita-sdk 0.3.428b2__py3-none-any.whl → 0.3.428.post2__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.
- alita_sdk/runtime/clients/client.py +31 -12
- alita_sdk/tools/figma/__init__.py +49 -3
- alita_sdk/tools/figma/api_wrapper.py +1157 -123
- alita_sdk/tools/figma/figma_client.py +73 -0
- alita_sdk/tools/figma/toon_tools.py +2748 -0
- alita_sdk/tools/qtest/api_wrapper.py +1168 -117
- alita_sdk/tools/utils/content_parser.py +36 -1
- {alita_sdk-0.3.428b2.dist-info → alita_sdk-0.3.428.post2.dist-info}/METADATA +1 -1
- {alita_sdk-0.3.428b2.dist-info → alita_sdk-0.3.428.post2.dist-info}/RECORD +12 -10
- {alita_sdk-0.3.428b2.dist-info → alita_sdk-0.3.428.post2.dist-info}/WHEEL +0 -0
- {alita_sdk-0.3.428b2.dist-info → alita_sdk-0.3.428.post2.dist-info}/licenses/LICENSE +0 -0
- {alita_sdk-0.3.428b2.dist-info → alita_sdk-0.3.428.post2.dist-info}/top_level.txt +0 -0
|
@@ -212,6 +212,41 @@ def load_content_from_bytes(file_content: bytes, extension: str = None, loader_e
|
|
|
212
212
|
if temp_file_path and os.path.exists(temp_file_path):
|
|
213
213
|
os.remove(temp_file_path)
|
|
214
214
|
|
|
215
|
+
|
|
216
|
+
def _load_content_from_bytes_with_prompt(file_content: bytes, extension: str = None, loader_extra_config: dict = None, llm = None, prompt: str = image_processing_prompt) -> str:
|
|
217
|
+
"""Internal helper that behaves like load_content_from_bytes but also propagates prompt.
|
|
218
|
+
|
|
219
|
+
This keeps the public load_content_from_bytes API unchanged while allowing newer
|
|
220
|
+
code paths to pass an explicit prompt through to the loader.
|
|
221
|
+
"""
|
|
222
|
+
temp_file_path = None
|
|
223
|
+
try:
|
|
224
|
+
with tempfile.NamedTemporaryFile(mode='w+b', delete=False, suffix=extension or '') as temp_file:
|
|
225
|
+
temp_file.write(file_content)
|
|
226
|
+
temp_file.flush()
|
|
227
|
+
temp_file_path = temp_file.name
|
|
228
|
+
|
|
229
|
+
# Use prepare_loader so that prompt and other kwargs are handled consistently
|
|
230
|
+
loader = prepare_loader(
|
|
231
|
+
file_name=None,
|
|
232
|
+
file_content=None,
|
|
233
|
+
is_capture_image=loader_extra_config.get('extract_images') if loader_extra_config else False,
|
|
234
|
+
page_number=loader_extra_config.get('page_number') if loader_extra_config else None,
|
|
235
|
+
sheet_name=loader_extra_config.get('sheet_name') if loader_extra_config else None,
|
|
236
|
+
llm=llm or (loader_extra_config.get('llm') if loader_extra_config else None),
|
|
237
|
+
file_path=temp_file_path,
|
|
238
|
+
excel_by_sheets=loader_extra_config.get('excel_by_sheets') if loader_extra_config else False,
|
|
239
|
+
prompt=prompt or (loader_extra_config.get('prompt') if loader_extra_config else image_processing_prompt),
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
documents = loader.load()
|
|
243
|
+
page_contents = [doc.page_content for doc in documents]
|
|
244
|
+
return "\n".join(page_contents)
|
|
245
|
+
finally:
|
|
246
|
+
if temp_file_path and os.path.exists(temp_file_path):
|
|
247
|
+
os.remove(temp_file_path)
|
|
248
|
+
|
|
249
|
+
|
|
215
250
|
def process_document_by_type(content, extension_source: str, document: Document = None, llm = None, chunking_config=None) \
|
|
216
251
|
-> Generator[Document, None, None]:
|
|
217
252
|
"""Process the content of a file based on its type using a configured loader cosidering the origin document."""
|
|
@@ -338,4 +373,4 @@ def file_extension_by_chunker(chunker_name: str) -> str | None:
|
|
|
338
373
|
return ".xml"
|
|
339
374
|
if name == "csv":
|
|
340
375
|
return ".csv"
|
|
341
|
-
return None
|
|
376
|
+
return None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: alita_sdk
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.428.post2
|
|
4
4
|
Summary: SDK for building langchain agents using resources from Alita
|
|
5
5
|
Author-email: Artem Rozumenko <artyom.rozumenko@gmail.com>, Mikalai Biazruchka <mikalai_biazruchka@epam.com>, Roman Mitusov <roman_mitusov@epam.com>, Ivan Krakhmaliuk <lifedj27@gmail.com>, Artem Dubrovskiy <ad13box@gmail.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -36,7 +36,7 @@ alita_sdk/configurations/zephyr_essential.py,sha256=TiZedsBlfIDroflipvoqxjJeEWPo
|
|
|
36
36
|
alita_sdk/runtime/__init__.py,sha256=4W0UF-nl3QF2bvET5lnah4o24CoTwSoKXhuN0YnwvEE,828
|
|
37
37
|
alita_sdk/runtime/clients/__init__.py,sha256=BdehU5GBztN1Qi1Wul0cqlU46FxUfMnI6Vq2Zd_oq1M,296
|
|
38
38
|
alita_sdk/runtime/clients/artifact.py,sha256=b7hVuGRROt6qUcT11uAZqzJqslzmlgW-Y6oGsiwNmjI,4029
|
|
39
|
-
alita_sdk/runtime/clients/client.py,sha256=
|
|
39
|
+
alita_sdk/runtime/clients/client.py,sha256=0g26eeBGJ37AIRgE8bpDwvJ0PkID_L3ceZ2rU1O0y9Y,46588
|
|
40
40
|
alita_sdk/runtime/clients/datasource.py,sha256=HAZovoQN9jBg0_-lIlGBQzb4FJdczPhkHehAiVG3Wx0,1020
|
|
41
41
|
alita_sdk/runtime/clients/prompt.py,sha256=li1RG9eBwgNK_Qf0qUaZ8QNTmsncFrAL2pv3kbxZRZg,1447
|
|
42
42
|
alita_sdk/runtime/clients/sandbox_client.py,sha256=kGOGfm3OAFmYeTM4bIuKbhRsOiOhF0M1q8takBe-sWY,16637
|
|
@@ -238,8 +238,10 @@ alita_sdk/tools/custom_open_api/__init__.py,sha256=9aT5SPNPWcJC6jMZEM-3rUCXVULj_
|
|
|
238
238
|
alita_sdk/tools/custom_open_api/api_wrapper.py,sha256=sDSFpvEqpSvXHGiBISdQQcUecfO3md-_F8hAi6p2dvg,4340
|
|
239
239
|
alita_sdk/tools/elastic/__init__.py,sha256=iwnSRppRpzvJ1da2K3Glu8Uu41MhBDCYbguboLkEbW0,2818
|
|
240
240
|
alita_sdk/tools/elastic/api_wrapper.py,sha256=pl8CqQxteJAGwyOhMcld-ZgtOTFwwbv42OITQVe8rM0,1948
|
|
241
|
-
alita_sdk/tools/figma/__init__.py,sha256=
|
|
242
|
-
alita_sdk/tools/figma/api_wrapper.py,sha256=
|
|
241
|
+
alita_sdk/tools/figma/__init__.py,sha256=IFYtZWbUevSVG50uM1iXnsTSHgnnxrNFKhck3hSZyAs,6753
|
|
242
|
+
alita_sdk/tools/figma/api_wrapper.py,sha256=rYTXhsRLqqdYWvH0usF1bAw7oMZNyrat0D8hdgb02dw,78272
|
|
243
|
+
alita_sdk/tools/figma/figma_client.py,sha256=SQwZIFMrDk09Hqp-kbjECpwTIJyHmXDkTAj51F6Su4s,2863
|
|
244
|
+
alita_sdk/tools/figma/toon_tools.py,sha256=AWpdqHk3cKdVXPVLkjpwAG6HoaKWSySIsM1sXai4JnE,103563
|
|
243
245
|
alita_sdk/tools/github/__init__.py,sha256=2rHu0zZyZGnLC5CkHgDIhe14N9yCyaEfrrt7ydH8478,5191
|
|
244
246
|
alita_sdk/tools/github/api_wrapper.py,sha256=mX23Rro6xnRa35tpeWhKYcRCJx0cDTzIe32pZAKDYno,7986
|
|
245
247
|
alita_sdk/tools/github/github_client.py,sha256=0YkpD6Zm4X46jMNN57ZIypo2YObtgxCGQokJAF-laFs,86597
|
|
@@ -303,7 +305,7 @@ alita_sdk/tools/postman/postman_analysis.py,sha256=ckc2BfKEop0xnmLPksVRE_Y94ixuq
|
|
|
303
305
|
alita_sdk/tools/pptx/__init__.py,sha256=vVUrWnj7KWJgEk9oxGSsCAQ2SMSXrp_SFOdUHYQKcAo,3444
|
|
304
306
|
alita_sdk/tools/pptx/pptx_wrapper.py,sha256=yyCYcTlIY976kJ4VfPo4dyxj4yeii9j9TWP6W8ZIpN8,29195
|
|
305
307
|
alita_sdk/tools/qtest/__init__.py,sha256=Jf0xo5S_4clXR2TfCbJbB1sFgCbcFQRM-YYX2ltWBzo,4461
|
|
306
|
-
alita_sdk/tools/qtest/api_wrapper.py,sha256=
|
|
308
|
+
alita_sdk/tools/qtest/api_wrapper.py,sha256=bpEgLFdwZ4HNdFTXdWz4VrOpO_A5X9zwDUWAwGohzMg,98362
|
|
307
309
|
alita_sdk/tools/qtest/tool.py,sha256=kKzNPS4fUC76WQQttQ6kdVANViHEvKE8Kf174MQiNYU,562
|
|
308
310
|
alita_sdk/tools/rally/__init__.py,sha256=2BPPXJxAOKgfmaxVFVvxndfK0JxOXDLkoRmzu2dUwOE,3512
|
|
309
311
|
alita_sdk/tools/rally/api_wrapper.py,sha256=mouzU6g0KML4UNapdk0k6Q0pU3MpJuWnNo71n9PSEHM,11752
|
|
@@ -331,7 +333,7 @@ alita_sdk/tools/testrail/__init__.py,sha256=Xg4nVjULL_D8JpIXLYXppnwUfGF4-lguFwKH
|
|
|
331
333
|
alita_sdk/tools/testrail/api_wrapper.py,sha256=tQcGlFJmftvs5ZiO4tsP19fCo4CrJeq_UEvQR1liVfE,39891
|
|
332
334
|
alita_sdk/tools/utils/__init__.py,sha256=xB9OQgW65DftadrSpoAAitnEIbIXZKBOCji0NDe7FRM,3923
|
|
333
335
|
alita_sdk/tools/utils/available_tools_decorator.py,sha256=IbrdfeQkswxUFgvvN7-dyLMZMyXLiwvX7kgi3phciCk,273
|
|
334
|
-
alita_sdk/tools/utils/content_parser.py,sha256=
|
|
336
|
+
alita_sdk/tools/utils/content_parser.py,sha256=ekfKXhla5PKq7enThawN0DV8wuRSrgZemHSp8Bj6_fI,17662
|
|
335
337
|
alita_sdk/tools/vector_adapters/VectorStoreAdapter.py,sha256=-9ByRh8bVRraTcJPS7SE-2l3en6A4UkKGS9iAd9fa3w,19722
|
|
336
338
|
alita_sdk/tools/vector_adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
337
339
|
alita_sdk/tools/xray/__init__.py,sha256=eOMWP8VamFbbJgt1xrGpGPqB9ByOTA0Cd3LCaETzGk4,4376
|
|
@@ -353,8 +355,8 @@ alita_sdk/tools/zephyr_scale/api_wrapper.py,sha256=kT0TbmMvuKhDUZc0i7KO18O38JM9S
|
|
|
353
355
|
alita_sdk/tools/zephyr_squad/__init__.py,sha256=0ne8XLJEQSLOWfzd2HdnqOYmQlUliKHbBED5kW_Vias,2895
|
|
354
356
|
alita_sdk/tools/zephyr_squad/api_wrapper.py,sha256=kmw_xol8YIYFplBLWTqP_VKPRhL_1ItDD0_vXTe_UuI,14906
|
|
355
357
|
alita_sdk/tools/zephyr_squad/zephyr_squad_cloud_client.py,sha256=R371waHsms4sllHCbijKYs90C-9Yu0sSR3N4SUfQOgU,5066
|
|
356
|
-
alita_sdk-0.3.
|
|
357
|
-
alita_sdk-0.3.
|
|
358
|
-
alita_sdk-0.3.
|
|
359
|
-
alita_sdk-0.3.
|
|
360
|
-
alita_sdk-0.3.
|
|
358
|
+
alita_sdk-0.3.428.post2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
359
|
+
alita_sdk-0.3.428.post2.dist-info/METADATA,sha256=Xx_tavJYygMpCXsLvHUsjD_hGlIgo4N_Cm91hj8lxEQ,19077
|
|
360
|
+
alita_sdk-0.3.428.post2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
361
|
+
alita_sdk-0.3.428.post2.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
|
|
362
|
+
alita_sdk-0.3.428.post2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|