alita-sdk 0.3.248__py3-none-any.whl → 0.3.249__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/configurations/__init__.py +1 -0
- alita_sdk/runtime/tools/vectorstore.py +2 -1
- alita_sdk/tools/elitea_base.py +25 -16
- {alita_sdk-0.3.248.dist-info → alita_sdk-0.3.249.dist-info}/METADATA +1 -1
- {alita_sdk-0.3.248.dist-info → alita_sdk-0.3.249.dist-info}/RECORD +8 -8
- {alita_sdk-0.3.248.dist-info → alita_sdk-0.3.249.dist-info}/WHEEL +0 -0
- {alita_sdk-0.3.248.dist-info → alita_sdk-0.3.249.dist-info}/licenses/LICENSE +0 -0
- {alita_sdk-0.3.248.dist-info → alita_sdk-0.3.249.dist-info}/top_level.txt +0 -0
@@ -40,6 +40,7 @@ _safe_import_configuration('delta_lake', 'delta_lake', 'DeltaLakeConfiguration')
|
|
40
40
|
_safe_import_configuration('bigquery', 'bigquery', 'BigQueryConfiguration')
|
41
41
|
_safe_import_configuration('xray', 'xray', 'XrayConfiguration')
|
42
42
|
_safe_import_configuration('zephyr', 'zephyr', 'ZephyrConfiguration')
|
43
|
+
_safe_import_configuration('zephyr_enterprise', 'zephyr_enterprise', 'ZephyrEnterpriseConfiguration')
|
43
44
|
_safe_import_configuration('figma', 'figma', 'FigmaConfiguration')
|
44
45
|
_safe_import_configuration('rally', 'rally', 'RallyConfiguration')
|
45
46
|
|
@@ -585,7 +585,8 @@ class VectorStoreWrapper(BaseToolApiWrapper):
|
|
585
585
|
|
586
586
|
# Apply cutoff filter
|
587
587
|
if cut_off:
|
588
|
-
|
588
|
+
# Filter out items above the cutoff score (since the lower the score, the better)
|
589
|
+
combined_items = [item for item in combined_items if abs(item[1]) <= cut_off]
|
589
590
|
|
590
591
|
# Sort by score and limit results
|
591
592
|
# DISABLED: for chroma we want ascending order (lower score is better), for others descending
|
alita_sdk/tools/elitea_base.py
CHANGED
@@ -369,6 +369,16 @@ class BaseVectorStoreToolApiWrapper(BaseToolApiWrapper):
|
|
369
369
|
vectorstore_wrapper = self._init_vector_store()
|
370
370
|
return vectorstore_wrapper.list_collections()
|
371
371
|
|
372
|
+
def _build_collection_filter(self, filter: dict | str, collection_suffix: str = "") -> dict:
|
373
|
+
"""Builds a filter for the collection based on the provided suffix."""
|
374
|
+
|
375
|
+
filter = filter if isinstance(filter, dict) else json.loads(filter)
|
376
|
+
if collection_suffix:
|
377
|
+
filter.update({"collection": {
|
378
|
+
"$eq": collection_suffix.strip()
|
379
|
+
}})
|
380
|
+
return filter
|
381
|
+
|
372
382
|
def search_index(self,
|
373
383
|
query: str,
|
374
384
|
collection_suffix: str = "",
|
@@ -380,13 +390,7 @@ class BaseVectorStoreToolApiWrapper(BaseToolApiWrapper):
|
|
380
390
|
**kwargs):
|
381
391
|
""" Searches indexed documents in the vector store."""
|
382
392
|
vectorstore = self._init_vector_store()
|
383
|
-
|
384
|
-
filter = filter if isinstance(filter, dict) else json.loads(filter)
|
385
|
-
if collection_suffix:
|
386
|
-
filter.update({"collection": {
|
387
|
-
"$eq": collection_suffix.strip()
|
388
|
-
}})
|
389
|
-
|
393
|
+
filter = self._build_collection_filter(filter, collection_suffix)
|
390
394
|
found_docs = vectorstore.search_documents(
|
391
395
|
query,
|
392
396
|
doctype=self.doctype,
|
@@ -411,6 +415,8 @@ class BaseVectorStoreToolApiWrapper(BaseToolApiWrapper):
|
|
411
415
|
extended_search: Optional[List[str]] = None,
|
412
416
|
**kwargs):
|
413
417
|
""" Searches indexed documents in the vector store."""
|
418
|
+
|
419
|
+
filter = self._build_collection_filter(filter, collection_suffix)
|
414
420
|
vectorstore = self._init_vector_store()
|
415
421
|
found_docs = vectorstore.stepback_search(
|
416
422
|
query,
|
@@ -423,7 +429,7 @@ class BaseVectorStoreToolApiWrapper(BaseToolApiWrapper):
|
|
423
429
|
reranking_config=reranking_config,
|
424
430
|
extended_search=extended_search
|
425
431
|
)
|
426
|
-
return
|
432
|
+
return found_docs if found_docs else f"No documents found by query '{query}' and filter '{filter}'"
|
427
433
|
|
428
434
|
def stepback_summary_index(self,
|
429
435
|
query: str,
|
@@ -437,17 +443,20 @@ class BaseVectorStoreToolApiWrapper(BaseToolApiWrapper):
|
|
437
443
|
**kwargs):
|
438
444
|
""" Generates a summary of indexed documents using stepback technique."""
|
439
445
|
vectorstore = self._init_vector_store()
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
+
filter = self._build_collection_filter(filter, collection_suffix)
|
447
|
+
|
448
|
+
found_docs = vectorstore.stepback_summary(
|
449
|
+
query,
|
450
|
+
messages,
|
451
|
+
self.doctype,
|
452
|
+
filter=filter,
|
453
|
+
cut_off=cut_off,
|
446
454
|
search_top=search_top,
|
447
|
-
full_text_search=full_text_search,
|
448
|
-
reranking_config=reranking_config,
|
455
|
+
full_text_search=full_text_search,
|
456
|
+
reranking_config=reranking_config,
|
449
457
|
extended_search=extended_search
|
450
458
|
)
|
459
|
+
return found_docs if found_docs else f"No documents found by query '{query}' and filter '{filter}'"
|
451
460
|
|
452
461
|
def _get_vector_search_tools(self):
|
453
462
|
"""
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: alita_sdk
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.249
|
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
|
@@ -1,7 +1,7 @@
|
|
1
1
|
alita_sdk/__init__.py,sha256=fxeNiqiVpIFAJls31Oomifyrtd5gT9iPUTdkWjDOB2Y,656
|
2
2
|
alita_sdk/community/__init__.py,sha256=8N7wWwPhoyOq3p8wlV3-pb3l3nJCR8TUrtV9iIPLU88,2523
|
3
3
|
alita_sdk/community/utils.py,sha256=lvuCJaNqVPHOORJV6kIPcXJcdprVW_TJvERtYAEgpjM,249
|
4
|
-
alita_sdk/configurations/__init__.py,sha256=
|
4
|
+
alita_sdk/configurations/__init__.py,sha256=684m4eHUoe4uyhSuLZsYKGVBW6zW0rpyqkShCHssqQU,3196
|
5
5
|
alita_sdk/configurations/ado.py,sha256=sP6eDLhEqr_u6CXm8Scx45rcn1wf-J_Y2fjkp5n582k,1189
|
6
6
|
alita_sdk/configurations/azure_search.py,sha256=PV2wMeNZI9XTN1nbrT0Li3xDAV7x8S9SJBoEKJqn_KY,809
|
7
7
|
alita_sdk/configurations/bigquery.py,sha256=-hG5HnNKhxeQKRy85V6cunTmQNUobbACNOg4Z1KPc-g,920
|
@@ -105,7 +105,7 @@ alita_sdk/runtime/tools/pgvector_search.py,sha256=NN2BGAnq4SsDHIhUcFZ8d_dbEOM8Qw
|
|
105
105
|
alita_sdk/runtime/tools/prompt.py,sha256=nJafb_e5aOM1Rr3qGFCR-SKziU9uCsiP2okIMs9PppM,741
|
106
106
|
alita_sdk/runtime/tools/router.py,sha256=wCvZjVkdXK9dMMeEerrgKf5M790RudH68pDortnHSz0,1517
|
107
107
|
alita_sdk/runtime/tools/tool.py,sha256=lE1hGi6qOAXG7qxtqxarD_XMQqTghdywf261DZawwno,5631
|
108
|
-
alita_sdk/runtime/tools/vectorstore.py,sha256=
|
108
|
+
alita_sdk/runtime/tools/vectorstore.py,sha256=l5wfovwMNvS_RgW-ZHXCh8Cm8gauunRzP0NPkzmshcQ,33852
|
109
109
|
alita_sdk/runtime/utils/AlitaCallback.py,sha256=E4LlSBuCHWiUq6W7IZExERHZY0qcmdjzc_rJlF2iQIw,7356
|
110
110
|
alita_sdk/runtime/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
111
111
|
alita_sdk/runtime/utils/constants.py,sha256=Xntx1b_uxUzT4clwqHA_U6K8y5bBqf_4lSQwXdcWrp4,13586
|
@@ -117,7 +117,7 @@ alita_sdk/runtime/utils/toolkit_runtime.py,sha256=MU63Fpxj0b5_r1IUUc0Q3-PN9VwL7r
|
|
117
117
|
alita_sdk/runtime/utils/toolkit_utils.py,sha256=I9QFqnaqfVgN26LUr6s3XlBlG6y0CoHURnCzG7XcwVs,5311
|
118
118
|
alita_sdk/runtime/utils/utils.py,sha256=CpEl3LCeLbhzQySz08lkKPm7Auac6IiLF7WB8wmArMI,589
|
119
119
|
alita_sdk/tools/__init__.py,sha256=ko5TToGYZFmBrho26DRAVvrkHWxQ2sfs8gVAASinYp8,10611
|
120
|
-
alita_sdk/tools/elitea_base.py,sha256=
|
120
|
+
alita_sdk/tools/elitea_base.py,sha256=A88HXZUMdoE_YtYVY3JwhgpKWaA_LIFTu54Ms2pj_Fs,30688
|
121
121
|
alita_sdk/tools/ado/__init__.py,sha256=bArTObt5cqG1SkijKevWGbsIILHBA3aCStg8Q1jd69k,1243
|
122
122
|
alita_sdk/tools/ado/utils.py,sha256=PTCludvaQmPLakF2EbCGy66Mro4-rjDtavVP-xcB2Wc,1252
|
123
123
|
alita_sdk/tools/ado/repos/__init__.py,sha256=_vjU3yHRXmLg6BDNmJsLiM9qDYRE_JmX5kXI_irMmQQ,5789
|
@@ -330,8 +330,8 @@ alita_sdk/tools/zephyr_scale/api_wrapper.py,sha256=JAeWf-RXohsxheUpT0iMDClc_izj-
|
|
330
330
|
alita_sdk/tools/zephyr_squad/__init__.py,sha256=0AI_j27xVO5Gk5HQMFrqPTd4uvuVTpiZUicBrdfEpKg,2796
|
331
331
|
alita_sdk/tools/zephyr_squad/api_wrapper.py,sha256=kmw_xol8YIYFplBLWTqP_VKPRhL_1ItDD0_vXTe_UuI,14906
|
332
332
|
alita_sdk/tools/zephyr_squad/zephyr_squad_cloud_client.py,sha256=R371waHsms4sllHCbijKYs90C-9Yu0sSR3N4SUfQOgU,5066
|
333
|
-
alita_sdk-0.3.
|
334
|
-
alita_sdk-0.3.
|
335
|
-
alita_sdk-0.3.
|
336
|
-
alita_sdk-0.3.
|
337
|
-
alita_sdk-0.3.
|
333
|
+
alita_sdk-0.3.249.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
334
|
+
alita_sdk-0.3.249.dist-info/METADATA,sha256=dDaElnaGjY8jmdfIQ3k8wXejBDlZUVR7A1U_kA6rwEs,18897
|
335
|
+
alita_sdk-0.3.249.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
336
|
+
alita_sdk-0.3.249.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
|
337
|
+
alita_sdk-0.3.249.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|