alita-sdk 0.3.319__py3-none-any.whl → 0.3.321__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/runtime/langchain/langraph_agent.py +23 -8
- alita_sdk/tools/figma/api_wrapper.py +4 -0
- alita_sdk/tools/utils/content_parser.py +4 -4
- {alita_sdk-0.3.319.dist-info → alita_sdk-0.3.321.dist-info}/METADATA +1 -1
- {alita_sdk-0.3.319.dist-info → alita_sdk-0.3.321.dist-info}/RECORD +8 -8
- {alita_sdk-0.3.319.dist-info → alita_sdk-0.3.321.dist-info}/WHEEL +0 -0
- {alita_sdk-0.3.319.dist-info → alita_sdk-0.3.321.dist-info}/licenses/LICENSE +0 -0
- {alita_sdk-0.3.319.dist-info → alita_sdk-0.3.321.dist-info}/top_level.txt +0 -0
@@ -584,14 +584,11 @@ def create_graph(
|
|
584
584
|
entry_point = clean_string(schema['entry_point'])
|
585
585
|
except KeyError:
|
586
586
|
raise ToolException("Entry point is not defined in the schema. Please define 'entry_point' in the schema.")
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
lg_builder.set_entry_point(state_default_node.name)
|
593
|
-
lg_builder.add_conditional_edges(state_default_node.name, TransitionalEdge(entry_point))
|
594
|
-
break
|
587
|
+
if state.items():
|
588
|
+
state_default_node = StateDefaultNode(default_vars=set_defaults(state))
|
589
|
+
lg_builder.add_node(state_default_node.name, state_default_node)
|
590
|
+
lg_builder.set_entry_point(state_default_node.name)
|
591
|
+
lg_builder.add_conditional_edges(state_default_node.name, TransitionalEdge(entry_point))
|
595
592
|
else:
|
596
593
|
# if no state variables are defined, set the entry point directly
|
597
594
|
lg_builder.set_entry_point(entry_point)
|
@@ -633,6 +630,24 @@ def create_graph(
|
|
633
630
|
)
|
634
631
|
return compiled.validate()
|
635
632
|
|
633
|
+
def set_defaults(d):
|
634
|
+
"""Set default values for dictionary entries based on their type."""
|
635
|
+
type_defaults = {
|
636
|
+
'str': '',
|
637
|
+
'list': [],
|
638
|
+
'int': 0,
|
639
|
+
'float': 0.0,
|
640
|
+
'bool': False,
|
641
|
+
# add more types as needed
|
642
|
+
}
|
643
|
+
for k, v in d.items():
|
644
|
+
# Skip 'input' key as it is not a state initial variable
|
645
|
+
if k == 'input':
|
646
|
+
continue
|
647
|
+
# set value or default if type is defined
|
648
|
+
if 'value' not in v:
|
649
|
+
v['value'] = type_defaults.get(v['type'], None)
|
650
|
+
return d
|
636
651
|
|
637
652
|
def convert_dict_to_message(msg_dict):
|
638
653
|
"""Convert a dictionary message to a LangChain message object."""
|
@@ -320,6 +320,10 @@ class FigmaApiWrapper(NonCodeIndexerToolkit):
|
|
320
320
|
)
|
321
321
|
]
|
322
322
|
|
323
|
+
if not node_ids:
|
324
|
+
yield from ()
|
325
|
+
return
|
326
|
+
|
323
327
|
images = self._client.get_file_images(file_key, node_ids).images or {}
|
324
328
|
total_images = len(images)
|
325
329
|
if total_images == 0:
|
@@ -207,7 +207,7 @@ def process_document_by_type(content, extension_source: str, document: Document
|
|
207
207
|
try:
|
208
208
|
chunks = process_content_by_type(content, extension_source, llm, chunking_config)
|
209
209
|
except Exception as e:
|
210
|
-
msg = f"Error during content for file {extension_source}:\n{e}"
|
210
|
+
msg = f"Error during content parsing for file {extension_source}:\n{e}"
|
211
211
|
logger.warning(msg)
|
212
212
|
yield Document(
|
213
213
|
page_content=msg,
|
@@ -218,7 +218,7 @@ def process_document_by_type(content, extension_source: str, document: Document
|
|
218
218
|
yield Document(
|
219
219
|
page_content=sanitize_for_postgres(chunk.page_content),
|
220
220
|
metadata={**document.metadata, **chunk.metadata}
|
221
|
-
|
221
|
+
)
|
222
222
|
|
223
223
|
|
224
224
|
def process_content_by_type(content, filename: str, llm=None, chunking_config=None) -> \
|
@@ -233,7 +233,7 @@ def process_content_by_type(content, filename: str, llm=None, chunking_config=No
|
|
233
233
|
if content is None:
|
234
234
|
logger.warning(
|
235
235
|
f"'{IndexerKeywords.CONTENT_IN_BYTES.value}' ie expected but not found in document metadata.")
|
236
|
-
return
|
236
|
+
return []
|
237
237
|
|
238
238
|
temp_file.write(content)
|
239
239
|
temp_file.flush()
|
@@ -241,7 +241,7 @@ def process_content_by_type(content, filename: str, llm=None, chunking_config=No
|
|
241
241
|
loader_config = loaders_map.get(extension)
|
242
242
|
if not loader_config:
|
243
243
|
logger.warning(f"No loader found for file extension: {extension}. File: {temp_file_path}")
|
244
|
-
return
|
244
|
+
return []
|
245
245
|
|
246
246
|
loader_cls = loader_config['class']
|
247
247
|
loader_kwargs = loader_config['kwargs']
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: alita_sdk
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.321
|
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
|
@@ -44,7 +44,7 @@ alita_sdk/runtime/langchain/assistant.py,sha256=0Cv30SJULxlrvD3hzWmTnxZyzqPEaSgp
|
|
44
44
|
alita_sdk/runtime/langchain/chat_message_template.py,sha256=kPz8W2BG6IMyITFDA5oeb5BxVRkHEVZhuiGl4MBZKdc,2176
|
45
45
|
alita_sdk/runtime/langchain/constants.py,sha256=eHVJ_beJNTf1WJo4yq7KMK64fxsRvs3lKc34QCXSbpk,3319
|
46
46
|
alita_sdk/runtime/langchain/indexer.py,sha256=0ENHy5EOhThnAiYFc7QAsaTNp9rr8hDV_hTK8ahbatk,37592
|
47
|
-
alita_sdk/runtime/langchain/langraph_agent.py,sha256=
|
47
|
+
alita_sdk/runtime/langchain/langraph_agent.py,sha256=5fTT2FyRFSLIbQxm8KkxT_-bkoABmZzZA_V3-9nPse0,44296
|
48
48
|
alita_sdk/runtime/langchain/mixedAgentParser.py,sha256=M256lvtsL3YtYflBCEp-rWKrKtcY1dJIyRGVv7KW9ME,2611
|
49
49
|
alita_sdk/runtime/langchain/mixedAgentRenderes.py,sha256=asBtKqm88QhZRILditjYICwFVKF5KfO38hu2O-WrSWE,5964
|
50
50
|
alita_sdk/runtime/langchain/store_manager.py,sha256=i8Fl11IXJhrBXq1F1ukEVln57B1IBe-tqSUvfUmBV4A,2218
|
@@ -235,7 +235,7 @@ alita_sdk/tools/custom_open_api/api_wrapper.py,sha256=sDSFpvEqpSvXHGiBISdQQcUecf
|
|
235
235
|
alita_sdk/tools/elastic/__init__.py,sha256=iwnSRppRpzvJ1da2K3Glu8Uu41MhBDCYbguboLkEbW0,2818
|
236
236
|
alita_sdk/tools/elastic/api_wrapper.py,sha256=pl8CqQxteJAGwyOhMcld-ZgtOTFwwbv42OITQVe8rM0,1948
|
237
237
|
alita_sdk/tools/figma/__init__.py,sha256=W6vIMMkZI2Lmpg6_CRRV3oadaIbVI-qTLmKUh6enqWs,4509
|
238
|
-
alita_sdk/tools/figma/api_wrapper.py,sha256=
|
238
|
+
alita_sdk/tools/figma/api_wrapper.py,sha256=SjTKCq8FrW1nCP1uFuRw8A2WVKnzEyRmKEr8e3W4QjE,26174
|
239
239
|
alita_sdk/tools/github/__init__.py,sha256=2rHu0zZyZGnLC5CkHgDIhe14N9yCyaEfrrt7ydH8478,5191
|
240
240
|
alita_sdk/tools/github/api_wrapper.py,sha256=uDwYckdnpYRJtb0uZnDkaz2udvdDLVxuCh1tSwspsiU,8411
|
241
241
|
alita_sdk/tools/github/github_client.py,sha256=nxnSXsDul2PPbWvYZS8TmAFFmR-5ALyakNoV5LN2D4U,86617
|
@@ -327,7 +327,7 @@ alita_sdk/tools/testrail/__init__.py,sha256=Xg4nVjULL_D8JpIXLYXppnwUfGF4-lguFwKH
|
|
327
327
|
alita_sdk/tools/testrail/api_wrapper.py,sha256=PKhtf04C6PFDexGCAJm-hjA9Gpu4crx6EXKT5K-b_Pk,32985
|
328
328
|
alita_sdk/tools/utils/__init__.py,sha256=155xepXPr4OEzs2Mz5YnjXcBpxSv1X2eznRUVoPtyK0,3268
|
329
329
|
alita_sdk/tools/utils/available_tools_decorator.py,sha256=IbrdfeQkswxUFgvvN7-dyLMZMyXLiwvX7kgi3phciCk,273
|
330
|
-
alita_sdk/tools/utils/content_parser.py,sha256=
|
330
|
+
alita_sdk/tools/utils/content_parser.py,sha256=7k5Ddv3Nzp3UoocgslwwSXi1G9ZR7sXzj6593IDeOcM,14063
|
331
331
|
alita_sdk/tools/vector_adapters/VectorStoreAdapter.py,sha256=ypBEAkFRGHv5edW0N9rdo1yKurNGQ4pRVEWtrN_7SeA,17656
|
332
332
|
alita_sdk/tools/vector_adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
333
333
|
alita_sdk/tools/xray/__init__.py,sha256=eOMWP8VamFbbJgt1xrGpGPqB9ByOTA0Cd3LCaETzGk4,4376
|
@@ -349,8 +349,8 @@ alita_sdk/tools/zephyr_scale/api_wrapper.py,sha256=kT0TbmMvuKhDUZc0i7KO18O38JM9S
|
|
349
349
|
alita_sdk/tools/zephyr_squad/__init__.py,sha256=0ne8XLJEQSLOWfzd2HdnqOYmQlUliKHbBED5kW_Vias,2895
|
350
350
|
alita_sdk/tools/zephyr_squad/api_wrapper.py,sha256=kmw_xol8YIYFplBLWTqP_VKPRhL_1ItDD0_vXTe_UuI,14906
|
351
351
|
alita_sdk/tools/zephyr_squad/zephyr_squad_cloud_client.py,sha256=R371waHsms4sllHCbijKYs90C-9Yu0sSR3N4SUfQOgU,5066
|
352
|
-
alita_sdk-0.3.
|
353
|
-
alita_sdk-0.3.
|
354
|
-
alita_sdk-0.3.
|
355
|
-
alita_sdk-0.3.
|
356
|
-
alita_sdk-0.3.
|
352
|
+
alita_sdk-0.3.321.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
353
|
+
alita_sdk-0.3.321.dist-info/METADATA,sha256=NYftgHbUR29AEwXHSYD4vDsVk94-TYbo4ijPAl7FeJQ,18897
|
354
|
+
alita_sdk-0.3.321.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
355
|
+
alita_sdk-0.3.321.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
|
356
|
+
alita_sdk-0.3.321.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|