alita-sdk 0.3.285__py3-none-any.whl → 0.3.286__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/tools/testrail/api_wrapper.py +9 -4
- {alita_sdk-0.3.285.dist-info → alita_sdk-0.3.286.dist-info}/METADATA +1 -1
- {alita_sdk-0.3.285.dist-info → alita_sdk-0.3.286.dist-info}/RECORD +6 -6
- {alita_sdk-0.3.285.dist-info → alita_sdk-0.3.286.dist-info}/WHEEL +0 -0
- {alita_sdk-0.3.285.dist-info → alita_sdk-0.3.286.dist-info}/licenses/LICENSE +0 -0
- {alita_sdk-0.3.285.dist-info → alita_sdk-0.3.286.dist-info}/top_level.txt +0 -0
@@ -599,7 +599,7 @@ class TestrailAPIWrapper(NonCodeIndexerToolkit):
|
|
599
599
|
return
|
600
600
|
|
601
601
|
# get base data from the document required to extract attachments and other metadata
|
602
|
-
base_data =
|
602
|
+
base_data = document.metadata
|
603
603
|
case_id = base_data.get("id")
|
604
604
|
|
605
605
|
# get a list of attachments for the case
|
@@ -616,6 +616,7 @@ class TestrailAPIWrapper(NonCodeIndexerToolkit):
|
|
616
616
|
yield Document(page_content="",
|
617
617
|
metadata={
|
618
618
|
'project_id': base_data.get('project_id', ''),
|
619
|
+
'updated_on': base_data.get('updated_on', ''),
|
619
620
|
'id': str(attachment_id),
|
620
621
|
'filename': attachment['filename'],
|
621
622
|
'filetype': attachment['filetype'],
|
@@ -639,17 +640,21 @@ class TestrailAPIWrapper(NonCodeIndexerToolkit):
|
|
639
640
|
str: string description of the attachment.
|
640
641
|
"""
|
641
642
|
|
642
|
-
page_content = "This filetype is not supported."
|
643
643
|
if attachment['filetype'] == 'txt' :
|
644
|
-
|
644
|
+
response = self._client.get(endpoint=f"get_attachment/{attachment['id']}")
|
645
|
+
if hasattr(response, "content"):
|
646
|
+
return attachment['filename'], response.content
|
647
|
+
elif isinstance(response, str):
|
648
|
+
return attachment['filename'], response.encode("utf-8")
|
645
649
|
else:
|
646
650
|
try:
|
647
651
|
attachment_path = self._client.attachments.get_attachment(attachment_id=attachment['id'], path=f"./{attachment['filename']}")
|
652
|
+
return attachment['filename'], attachment_path.read_bytes()
|
648
653
|
except BadRequestError as ai_e:
|
649
654
|
logger.error(f"Unable to parse page's content with type: {attachment['filetype']} due to AI service issues: {ai_e}")
|
650
655
|
except Exception as e:
|
651
656
|
logger.error(f"Unable to parse page's content with type: {attachment['filetype']}: {e}")
|
652
|
-
return
|
657
|
+
return attachment['filename'], b"This filetype is not supported."
|
653
658
|
|
654
659
|
def _index_tool_params(self):
|
655
660
|
return {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: alita_sdk
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.286
|
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 <lifedjik@gmail.com>, Artem Dubrovskiy <ad13box@gmail.com>
|
6
6
|
License-Expression: Apache-2.0
|
@@ -322,7 +322,7 @@ alita_sdk/tools/sql/models.py,sha256=AKJgSl_kEEz4fZfw3kbvdGHXaRZ-yiaqfJOB6YOj3i0
|
|
322
322
|
alita_sdk/tools/testio/__init__.py,sha256=-4pEdEv0xfXml5bn8Nij28D5o9Y8hDllYoXfPeJ6os4,2699
|
323
323
|
alita_sdk/tools/testio/api_wrapper.py,sha256=BvmL5h634BzG6p7ajnQLmj-uoAw1gjWnd4FHHu1h--Q,21638
|
324
324
|
alita_sdk/tools/testrail/__init__.py,sha256=0kETjWKLU7R6mugBWsjwEUsh10pipbAeNSGJAO0FBh0,4634
|
325
|
-
alita_sdk/tools/testrail/api_wrapper.py,sha256=
|
325
|
+
alita_sdk/tools/testrail/api_wrapper.py,sha256=xKQbjwL602J55KZiAdMcMtsuzK2jky0DUcrrdsazj0A,32981
|
326
326
|
alita_sdk/tools/utils/__init__.py,sha256=155xepXPr4OEzs2Mz5YnjXcBpxSv1X2eznRUVoPtyK0,3268
|
327
327
|
alita_sdk/tools/utils/available_tools_decorator.py,sha256=IbrdfeQkswxUFgvvN7-dyLMZMyXLiwvX7kgi3phciCk,273
|
328
328
|
alita_sdk/tools/utils/content_parser.py,sha256=KM6K37VLAAvzwvoHFpJBoRB5d7w6z3mZC-u01n0IpDQ,12036
|
@@ -347,8 +347,8 @@ alita_sdk/tools/zephyr_scale/api_wrapper.py,sha256=HOt9ShtJI_1tVPcwd3Rwk-VS0SMLq
|
|
347
347
|
alita_sdk/tools/zephyr_squad/__init__.py,sha256=0AI_j27xVO5Gk5HQMFrqPTd4uvuVTpiZUicBrdfEpKg,2796
|
348
348
|
alita_sdk/tools/zephyr_squad/api_wrapper.py,sha256=kmw_xol8YIYFplBLWTqP_VKPRhL_1ItDD0_vXTe_UuI,14906
|
349
349
|
alita_sdk/tools/zephyr_squad/zephyr_squad_cloud_client.py,sha256=R371waHsms4sllHCbijKYs90C-9Yu0sSR3N4SUfQOgU,5066
|
350
|
-
alita_sdk-0.3.
|
351
|
-
alita_sdk-0.3.
|
352
|
-
alita_sdk-0.3.
|
353
|
-
alita_sdk-0.3.
|
354
|
-
alita_sdk-0.3.
|
350
|
+
alita_sdk-0.3.286.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
351
|
+
alita_sdk-0.3.286.dist-info/METADATA,sha256=b__uoODWVeCvH86q0fXrT3qQpp8Q5-xisgU7QaxEXW4,18897
|
352
|
+
alita_sdk-0.3.286.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
353
|
+
alita_sdk-0.3.286.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
|
354
|
+
alita_sdk-0.3.286.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|