alita-sdk 0.3.282__py3-none-any.whl → 0.3.283__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.
@@ -576,6 +576,10 @@ class BaseCodeToolApiWrapper(BaseVectorStoreToolApiWrapper):
576
576
  raise ValueError("Expected a list of strings")
577
577
  return _files
578
578
 
579
+ def __get_branch(self, branch):
580
+ return (branch or getattr(self, 'active_branch', None)
581
+ or getattr(self, '_active_branch', None) or getattr(self, 'branch', None))
582
+
579
583
  def loader(self,
580
584
  branch: Optional[str] = None,
581
585
  whitelist: Optional[List[str]] = None,
@@ -601,7 +605,7 @@ class BaseCodeToolApiWrapper(BaseVectorStoreToolApiWrapper):
601
605
  """
602
606
  from .chunkers.code.codeparser import parse_code_files_for_db
603
607
 
604
- _files = self.__handle_get_files("", branch or self.active_branch or self._active_branch)
608
+ _files = self.__handle_get_files("", self.__get_branch(branch))
605
609
  self._log_tool_event(message="Listing files in branch", tool_name="loader")
606
610
  logger.info(f"Files in branch: {_files}")
607
611
 
@@ -624,7 +628,7 @@ class BaseCodeToolApiWrapper(BaseVectorStoreToolApiWrapper):
624
628
  for idx, file in enumerate(_files, 1):
625
629
  if is_whitelisted(file) and not is_blacklisted(file):
626
630
  # read file ONLY if it matches whitelist and does not match blacklist
627
- file_content = self._read_file(file, branch=branch or self.active_branch or self._active_branch)
631
+ file_content = self._read_file(file, self.__get_branch(branch))
628
632
  if not file_content:
629
633
  # empty file, skip
630
634
  continue
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alita_sdk
3
- Version: 0.3.282
3
+ Version: 0.3.283
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
@@ -132,7 +132,7 @@ alita_sdk/runtime/utils/toolkit_utils.py,sha256=I9QFqnaqfVgN26LUr6s3XlBlG6y0CoHU
132
132
  alita_sdk/runtime/utils/utils.py,sha256=VXNLsdeTmf6snn9EtUyobv4yL-xzLhUcH8P_ORMifYc,675
133
133
  alita_sdk/tools/__init__.py,sha256=8oFahbggsv8h7hEqqeQ4iF6g2m85Ki17iSeknviCNis,10613
134
134
  alita_sdk/tools/base_indexer_toolkit.py,sha256=h3KnF4_tgAkxWUjW8djPUyNEKpI24kU6LDjCnJtxE-o,19322
135
- alita_sdk/tools/elitea_base.py,sha256=aoh4fjNHIem8jzPPqtvxD4PtkGgN3KBQwrMqb9f6k00,32991
135
+ alita_sdk/tools/elitea_base.py,sha256=EBCgrqfaHwyhq510svtDEB0i5pizazeIPHKD1acsKAk,33121
136
136
  alita_sdk/tools/non_code_indexer_toolkit.py,sha256=v9uq1POE1fQKCd152mbqDtF-HSe0qoDj83k4E5LAkMI,1080
137
137
  alita_sdk/tools/ado/__init__.py,sha256=u2tdDgufGuDb-7lIgKKQlqgStL9Wd1gzNmRNYems2c0,1267
138
138
  alita_sdk/tools/ado/utils.py,sha256=PTCludvaQmPLakF2EbCGy66Mro4-rjDtavVP-xcB2Wc,1252
@@ -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.282.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
351
- alita_sdk-0.3.282.dist-info/METADATA,sha256=hfPjY5I-dvK_iVEukdJdK4zKc8hZz8hOBvMm9ZD0TWs,18897
352
- alita_sdk-0.3.282.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
353
- alita_sdk-0.3.282.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
354
- alita_sdk-0.3.282.dist-info/RECORD,,
350
+ alita_sdk-0.3.283.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
351
+ alita_sdk-0.3.283.dist-info/METADATA,sha256=jF2tQYE5PI_sWr9ES9-MjSQD0yNhlZ-R5K7xTiOCdpI,18897
352
+ alita_sdk-0.3.283.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
353
+ alita_sdk-0.3.283.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
354
+ alita_sdk-0.3.283.dist-info/RECORD,,