alita-sdk 0.3.352__py3-none-any.whl → 0.3.354__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 alita-sdk might be problematic. Click here for more details.
- alita_sdk/runtime/tools/router.py +6 -1
- alita_sdk/tools/utils/content_parser.py +2 -1
- {alita_sdk-0.3.352.dist-info → alita_sdk-0.3.354.dist-info}/METADATA +1 -1
- {alita_sdk-0.3.352.dist-info → alita_sdk-0.3.354.dist-info}/RECORD +7 -7
- {alita_sdk-0.3.352.dist-info → alita_sdk-0.3.354.dist-info}/WHEEL +0 -0
- {alita_sdk-0.3.352.dist-info → alita_sdk-0.3.354.dist-info}/licenses/LICENSE +0 -0
- {alita_sdk-0.3.352.dist-info → alita_sdk-0.3.354.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import logging
|
|
2
|
+
import re
|
|
2
3
|
from typing import Any, Optional, Union, List
|
|
3
4
|
from langchain_core.runnables import RunnableConfig
|
|
4
5
|
from langchain_core.tools import BaseTool
|
|
@@ -7,6 +8,10 @@ from ..utils.utils import clean_string
|
|
|
7
8
|
|
|
8
9
|
logger = logging.getLogger(__name__)
|
|
9
10
|
|
|
11
|
+
def clean_node_str(s: str)-> str:
|
|
12
|
+
cleaned_string = re.sub(r'[^\w\s]', '', s)
|
|
13
|
+
return cleaned_string
|
|
14
|
+
|
|
10
15
|
class RouterNode(BaseTool):
|
|
11
16
|
name: str = 'RouterNode'
|
|
12
17
|
description: str = 'A router node that evaluates a condition and routes accordingly.'
|
|
@@ -22,7 +27,7 @@ class RouterNode(BaseTool):
|
|
|
22
27
|
template = EvaluateTemplate(self.condition, input_data)
|
|
23
28
|
result = template.evaluate()
|
|
24
29
|
logger.info(f"RouterNode evaluated condition '{self.condition}' with input {input_data} => {result}")
|
|
25
|
-
result =
|
|
30
|
+
result = clean_node_str(str(result))
|
|
26
31
|
if result in self.routes:
|
|
27
32
|
# If the result is one of the routes, return it
|
|
28
33
|
return {"router_output": result}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from copy import deepcopy
|
|
1
2
|
import os
|
|
2
3
|
import re
|
|
3
4
|
import tempfile
|
|
@@ -126,7 +127,7 @@ def load_file_docs(file_name=None, file_content=None, is_capture_image: bool = F
|
|
|
126
127
|
|
|
127
128
|
def get_loader_kwargs(loader_object, file_name=None, file_content=None, is_capture_image: bool = False, page_number: int = None,
|
|
128
129
|
sheet_name: str = None, llm=None, file_path: str = None, excel_by_sheets: bool = False, prompt=None):
|
|
129
|
-
loader_kwargs = loader_object['kwargs']
|
|
130
|
+
loader_kwargs = deepcopy(loader_object['kwargs'])
|
|
130
131
|
loader_kwargs.update({
|
|
131
132
|
"file_path": file_path,
|
|
132
133
|
"file_content": file_content,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: alita_sdk
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.354
|
|
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
|
|
@@ -118,7 +118,7 @@ alita_sdk/runtime/tools/loop_output.py,sha256=U4hO9PCQgWlXwOq6jdmCGbegtAxGAPXObS
|
|
|
118
118
|
alita_sdk/runtime/tools/mcp_server_tool.py,sha256=MhLxZJ44LYrB_0GrojmkyqKoDRaqIHkEQAsg718ipog,4277
|
|
119
119
|
alita_sdk/runtime/tools/pgvector_search.py,sha256=NN2BGAnq4SsDHIhUcFZ8d_dbEOM8QwB0UwpsWCYruXU,11692
|
|
120
120
|
alita_sdk/runtime/tools/prompt.py,sha256=nJafb_e5aOM1Rr3qGFCR-SKziU9uCsiP2okIMs9PppM,741
|
|
121
|
-
alita_sdk/runtime/tools/router.py,sha256=
|
|
121
|
+
alita_sdk/runtime/tools/router.py,sha256=P6IGvb5t8f3_lU8gUi31_CGNdTeetTFKvlmG4u-40uw,1645
|
|
122
122
|
alita_sdk/runtime/tools/sandbox.py,sha256=WNz-aUMtkGCPg84dDy_0BPkyp-6YjoYB-xjIEFFrtKw,11601
|
|
123
123
|
alita_sdk/runtime/tools/tool.py,sha256=lE1hGi6qOAXG7qxtqxarD_XMQqTghdywf261DZawwno,5631
|
|
124
124
|
alita_sdk/runtime/tools/vectorstore.py,sha256=8vRhi1lGFEs3unvnflEi2p59U2MfV32lStpEizpDms0,34467
|
|
@@ -328,7 +328,7 @@ alita_sdk/tools/testrail/__init__.py,sha256=Xg4nVjULL_D8JpIXLYXppnwUfGF4-lguFwKH
|
|
|
328
328
|
alita_sdk/tools/testrail/api_wrapper.py,sha256=tQcGlFJmftvs5ZiO4tsP19fCo4CrJeq_UEvQR1liVfE,39891
|
|
329
329
|
alita_sdk/tools/utils/__init__.py,sha256=W9rCCUPtHCP5nGAbWp0n5jaNA84572aiRoqKneBnaS4,3330
|
|
330
330
|
alita_sdk/tools/utils/available_tools_decorator.py,sha256=IbrdfeQkswxUFgvvN7-dyLMZMyXLiwvX7kgi3phciCk,273
|
|
331
|
-
alita_sdk/tools/utils/content_parser.py,sha256=
|
|
331
|
+
alita_sdk/tools/utils/content_parser.py,sha256=eBqUI1HSgZYfPQgnDrz7dnhjKvpgPv9kqrbb_LWTh08,14473
|
|
332
332
|
alita_sdk/tools/vector_adapters/VectorStoreAdapter.py,sha256=ypBEAkFRGHv5edW0N9rdo1yKurNGQ4pRVEWtrN_7SeA,17656
|
|
333
333
|
alita_sdk/tools/vector_adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
334
334
|
alita_sdk/tools/xray/__init__.py,sha256=eOMWP8VamFbbJgt1xrGpGPqB9ByOTA0Cd3LCaETzGk4,4376
|
|
@@ -350,8 +350,8 @@ alita_sdk/tools/zephyr_scale/api_wrapper.py,sha256=kT0TbmMvuKhDUZc0i7KO18O38JM9S
|
|
|
350
350
|
alita_sdk/tools/zephyr_squad/__init__.py,sha256=0ne8XLJEQSLOWfzd2HdnqOYmQlUliKHbBED5kW_Vias,2895
|
|
351
351
|
alita_sdk/tools/zephyr_squad/api_wrapper.py,sha256=kmw_xol8YIYFplBLWTqP_VKPRhL_1ItDD0_vXTe_UuI,14906
|
|
352
352
|
alita_sdk/tools/zephyr_squad/zephyr_squad_cloud_client.py,sha256=R371waHsms4sllHCbijKYs90C-9Yu0sSR3N4SUfQOgU,5066
|
|
353
|
-
alita_sdk-0.3.
|
|
354
|
-
alita_sdk-0.3.
|
|
355
|
-
alita_sdk-0.3.
|
|
356
|
-
alita_sdk-0.3.
|
|
357
|
-
alita_sdk-0.3.
|
|
353
|
+
alita_sdk-0.3.354.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
354
|
+
alita_sdk-0.3.354.dist-info/METADATA,sha256=Xug_UZxh4RE5PZGCbNgcZ4I8ThviJRdOrYiNi46RWLg,19071
|
|
355
|
+
alita_sdk-0.3.354.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
356
|
+
alita_sdk-0.3.354.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
|
|
357
|
+
alita_sdk-0.3.354.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|