alita-sdk 0.3.422__py3-none-any.whl → 0.3.424__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/langchain/constants.py +1 -0
- alita_sdk/runtime/langchain/langraph_agent.py +10 -9
- {alita_sdk-0.3.422.dist-info → alita_sdk-0.3.424.dist-info}/METADATA +1 -1
- {alita_sdk-0.3.422.dist-info → alita_sdk-0.3.424.dist-info}/RECORD +7 -7
- {alita_sdk-0.3.422.dist-info → alita_sdk-0.3.424.dist-info}/WHEEL +0 -0
- {alita_sdk-0.3.422.dist-info → alita_sdk-0.3.424.dist-info}/licenses/LICENSE +0 -0
- {alita_sdk-0.3.422.dist-info → alita_sdk-0.3.424.dist-info}/top_level.txt +0 -0
|
@@ -19,7 +19,7 @@ from langgraph.managed.base import is_managed_value
|
|
|
19
19
|
from langgraph.prebuilt import InjectedStore
|
|
20
20
|
from langgraph.store.base import BaseStore
|
|
21
21
|
|
|
22
|
-
from .constants import PRINTER_NODE_RS
|
|
22
|
+
from .constants import PRINTER_NODE_RS, PRINTER
|
|
23
23
|
from .mixedAgentRenderes import convert_message_to_json
|
|
24
24
|
from .utils import create_state, propagate_the_input_mapping, safe_format
|
|
25
25
|
from ..tools.function import FunctionTool
|
|
@@ -236,15 +236,17 @@ class StateDefaultNode(Runnable):
|
|
|
236
236
|
class PrinterNode(Runnable):
|
|
237
237
|
name = "PrinterNode"
|
|
238
238
|
|
|
239
|
-
def __init__(self,
|
|
240
|
-
self.
|
|
241
|
-
self.formatting_enabled = formatting_enabled
|
|
239
|
+
def __init__(self, input_mapping: Optional[dict[str, dict]]):
|
|
240
|
+
self.input_mapping = input_mapping
|
|
242
241
|
|
|
243
242
|
def invoke(self, state: BaseStore, config: Optional[RunnableConfig] = None) -> dict:
|
|
244
243
|
logger.info(f"Printer Node - Current state variables: {state}")
|
|
245
244
|
result = {}
|
|
246
|
-
logger.debug(f"Initial text pattern: {self.
|
|
247
|
-
|
|
245
|
+
logger.debug(f"Initial text pattern: {self.input_mapping}")
|
|
246
|
+
mapping = propagate_the_input_mapping(self.input_mapping, [], state)
|
|
247
|
+
if mapping.get(PRINTER) is None:
|
|
248
|
+
raise ToolException(f"PrinterNode requires '{PRINTER}' field in input mapping")
|
|
249
|
+
formatted_output = mapping[PRINTER]
|
|
248
250
|
logger.debug(f"Formatted output: {formatted_output}")
|
|
249
251
|
result[PRINTER_NODE_RS] = formatted_output
|
|
250
252
|
return result
|
|
@@ -647,8 +649,7 @@ def create_graph(
|
|
|
647
649
|
))
|
|
648
650
|
elif node_type == 'printer':
|
|
649
651
|
lg_builder.add_node(node_id, PrinterNode(
|
|
650
|
-
|
|
651
|
-
formatting_enabled=node.get('formatting_enabled', True)
|
|
652
|
+
input_mapping=node.get('input_mapping', {'printer': {'type': 'fixed', 'value': ''}}),
|
|
652
653
|
))
|
|
653
654
|
|
|
654
655
|
# add interrupts after printer node if specified
|
|
@@ -657,7 +658,7 @@ def create_graph(
|
|
|
657
658
|
# reset printer output variable to avoid carrying over
|
|
658
659
|
reset_node_id = f"{node_id}_reset"
|
|
659
660
|
lg_builder.add_node(reset_node_id, PrinterNode(
|
|
660
|
-
|
|
661
|
+
input_mapping={'printer': {'type': 'fixed', 'value': ''}}
|
|
661
662
|
))
|
|
662
663
|
lg_builder.add_edge(node_id, reset_node_id)
|
|
663
664
|
lg_builder.add_conditional_edges(reset_node_id, TransitionalEdge(clean_string(node['transition'])))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: alita_sdk
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.424
|
|
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
|
|
@@ -43,9 +43,9 @@ alita_sdk/runtime/clients/sandbox_client.py,sha256=kGOGfm3OAFmYeTM4bIuKbhRsOiOhF
|
|
|
43
43
|
alita_sdk/runtime/langchain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
44
44
|
alita_sdk/runtime/langchain/assistant.py,sha256=qKoEjbGuUnX-OZDHmSaK3plb1jON9unzEwAjxBT9DY8,16044
|
|
45
45
|
alita_sdk/runtime/langchain/chat_message_template.py,sha256=kPz8W2BG6IMyITFDA5oeb5BxVRkHEVZhuiGl4MBZKdc,2176
|
|
46
|
-
alita_sdk/runtime/langchain/constants.py,sha256=
|
|
46
|
+
alita_sdk/runtime/langchain/constants.py,sha256=I3dwexVp_Qq3MueRA2ClLgFDEhk4BkJhgR6m7V0gVPc,3404
|
|
47
47
|
alita_sdk/runtime/langchain/indexer.py,sha256=0ENHy5EOhThnAiYFc7QAsaTNp9rr8hDV_hTK8ahbatk,37592
|
|
48
|
-
alita_sdk/runtime/langchain/langraph_agent.py,sha256=
|
|
48
|
+
alita_sdk/runtime/langchain/langraph_agent.py,sha256=sAdDojp7lOC2jyaBPS3MP8hV_EhjsZuyOqUT3abf2Wk,51647
|
|
49
49
|
alita_sdk/runtime/langchain/mixedAgentParser.py,sha256=M256lvtsL3YtYflBCEp-rWKrKtcY1dJIyRGVv7KW9ME,2611
|
|
50
50
|
alita_sdk/runtime/langchain/mixedAgentRenderes.py,sha256=asBtKqm88QhZRILditjYICwFVKF5KfO38hu2O-WrSWE,5964
|
|
51
51
|
alita_sdk/runtime/langchain/store_manager.py,sha256=i8Fl11IXJhrBXq1F1ukEVln57B1IBe-tqSUvfUmBV4A,2218
|
|
@@ -353,8 +353,8 @@ alita_sdk/tools/zephyr_scale/api_wrapper.py,sha256=kT0TbmMvuKhDUZc0i7KO18O38JM9S
|
|
|
353
353
|
alita_sdk/tools/zephyr_squad/__init__.py,sha256=0ne8XLJEQSLOWfzd2HdnqOYmQlUliKHbBED5kW_Vias,2895
|
|
354
354
|
alita_sdk/tools/zephyr_squad/api_wrapper.py,sha256=kmw_xol8YIYFplBLWTqP_VKPRhL_1ItDD0_vXTe_UuI,14906
|
|
355
355
|
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.
|
|
356
|
+
alita_sdk-0.3.424.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
357
|
+
alita_sdk-0.3.424.dist-info/METADATA,sha256=tdVnnVJp4PuGYlO1a5x4EV3TFVzntxX9ngHLACfaclM,19071
|
|
358
|
+
alita_sdk-0.3.424.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
359
|
+
alita_sdk-0.3.424.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
|
|
360
|
+
alita_sdk-0.3.424.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|