alita-sdk 0.3.260__py3-none-any.whl → 0.3.261__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/assistant.py +10 -9
- alita_sdk/tools/utils/content_parser.py +1 -1
- {alita_sdk-0.3.260.dist-info → alita_sdk-0.3.261.dist-info}/METADATA +1 -1
- {alita_sdk-0.3.260.dist-info → alita_sdk-0.3.261.dist-info}/RECORD +7 -7
- {alita_sdk-0.3.260.dist-info → alita_sdk-0.3.261.dist-info}/WHEEL +0 -0
- {alita_sdk-0.3.260.dist-info → alita_sdk-0.3.261.dist-info}/licenses/LICENSE +0 -0
- {alita_sdk-0.3.260.dist-info → alita_sdk-0.3.261.dist-info}/top_level.txt +0 -0
@@ -5,6 +5,7 @@ from typing import Any, Optional
|
|
5
5
|
from langchain.agents import (
|
6
6
|
AgentExecutor, create_openai_tools_agent,
|
7
7
|
create_json_chat_agent)
|
8
|
+
from langgraph.graph.state import CompiledStateGraph
|
8
9
|
from langgraph.store.base import BaseStore
|
9
10
|
from .agents.xml_chat import create_xml_chat_agent
|
10
11
|
from .langraph_agent import create_graph
|
@@ -61,11 +62,11 @@ class Assistant:
|
|
61
62
|
# )
|
62
63
|
# self.client = target_cls(**model_params)
|
63
64
|
# validate agents compatibility: non-pipeline agents cannot have pipelines as toolkits
|
64
|
-
if app_type not in ["pipeline", "predict"]:
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
65
|
+
# if app_type not in ["pipeline", "predict"]:
|
66
|
+
# tools_to_check = data.get('tools', [])
|
67
|
+
# if any(tool['agent_type'] == 'pipeline' for tool in tools_to_check):
|
68
|
+
# raise ToolException("Non-pipeline agents cannot have pipelines as a toolkits. "
|
69
|
+
# "Review toolkits configuration or use pipeline as master agent.")
|
69
70
|
|
70
71
|
# configure memory store if memory tool is defined (not needed for predict agents)
|
71
72
|
if app_type != "predict":
|
@@ -148,20 +149,20 @@ class Assistant:
|
|
148
149
|
|
149
150
|
def getAgentExecutor(self):
|
150
151
|
# Exclude compiled graph runnables from simple tool agents
|
151
|
-
simple_tools = [t for t in self.tools if isinstance(t, BaseTool)]
|
152
|
+
simple_tools = [t for t in self.tools if isinstance(t, (BaseTool, CompiledStateGraph))]
|
152
153
|
agent = create_json_chat_agent(llm=self.client, tools=simple_tools, prompt=self.prompt)
|
153
154
|
return self._agent_executor(agent)
|
154
155
|
|
155
156
|
|
156
157
|
def getXMLAgentExecutor(self):
|
157
158
|
# Exclude compiled graph runnables from simple tool agents
|
158
|
-
simple_tools = [t for t in self.tools if isinstance(t, BaseTool)]
|
159
|
+
simple_tools = [t for t in self.tools if isinstance(t, (BaseTool, CompiledStateGraph))]
|
159
160
|
agent = create_xml_chat_agent(llm=self.client, tools=simple_tools, prompt=self.prompt)
|
160
161
|
return self._agent_executor(agent)
|
161
162
|
|
162
163
|
def getOpenAIToolsAgentExecutor(self):
|
163
164
|
# Exclude compiled graph runnables from simple tool agents
|
164
|
-
simple_tools = [t for t in self.tools if isinstance(t, BaseTool)]
|
165
|
+
simple_tools = [t for t in self.tools if isinstance(t, (BaseTool, CompiledStateGraph))]
|
165
166
|
agent = create_openai_tools_agent(llm=self.client, tools=simple_tools, prompt=self.prompt)
|
166
167
|
return self._agent_executor(agent)
|
167
168
|
|
@@ -171,7 +172,7 @@ class Assistant:
|
|
171
172
|
This creates a proper LangGraphAgentRunnable with modern tool support.
|
172
173
|
"""
|
173
174
|
# Exclude compiled graph runnables from simple tool agents
|
174
|
-
simple_tools = [t for t in self.tools if isinstance(t, BaseTool)]
|
175
|
+
simple_tools = [t for t in self.tools if isinstance(t, (BaseTool, CompiledStateGraph))]
|
175
176
|
|
176
177
|
# Set up memory/checkpointer if available
|
177
178
|
checkpointer = None
|
@@ -142,7 +142,7 @@ def load_content(file_path: str, extension: str = None, loader_extra_config: dic
|
|
142
142
|
if "file_path" in loader_kwargs:
|
143
143
|
del loader_kwargs["file_path"]
|
144
144
|
|
145
|
-
loader = loader_cls(file_path, **loader_kwargs)
|
145
|
+
loader = loader_cls(file_path=file_path, **loader_kwargs)
|
146
146
|
documents = loader.load()
|
147
147
|
|
148
148
|
page_contents = [doc.page_content for doc in documents]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: alita_sdk
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.261
|
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
|
@@ -30,7 +30,7 @@ alita_sdk/runtime/clients/client.py,sha256=ZkXP3-e785EyYoJLNowAGV3bRqv3fs1XqD_iu
|
|
30
30
|
alita_sdk/runtime/clients/datasource.py,sha256=HAZovoQN9jBg0_-lIlGBQzb4FJdczPhkHehAiVG3Wx0,1020
|
31
31
|
alita_sdk/runtime/clients/prompt.py,sha256=li1RG9eBwgNK_Qf0qUaZ8QNTmsncFrAL2pv3kbxZRZg,1447
|
32
32
|
alita_sdk/runtime/langchain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
33
|
-
alita_sdk/runtime/langchain/assistant.py,sha256=
|
33
|
+
alita_sdk/runtime/langchain/assistant.py,sha256=suBFEt24t9bLyBHMzkR3Mkgd9HIrGBq_bzcMiENiEr4,13539
|
34
34
|
alita_sdk/runtime/langchain/chat_message_template.py,sha256=kPz8W2BG6IMyITFDA5oeb5BxVRkHEVZhuiGl4MBZKdc,2176
|
35
35
|
alita_sdk/runtime/langchain/constants.py,sha256=eHVJ_beJNTf1WJo4yq7KMK64fxsRvs3lKc34QCXSbpk,3319
|
36
36
|
alita_sdk/runtime/langchain/indexer.py,sha256=0ENHy5EOhThnAiYFc7QAsaTNp9rr8hDV_hTK8ahbatk,37592
|
@@ -314,7 +314,7 @@ alita_sdk/tools/testrail/__init__.py,sha256=0kETjWKLU7R6mugBWsjwEUsh10pipbAeNSGJ
|
|
314
314
|
alita_sdk/tools/testrail/api_wrapper.py,sha256=5T-QyTzt-J0rI32xc_E684lCdgyWeHSyeTYiwQwtGyg,32275
|
315
315
|
alita_sdk/tools/utils/__init__.py,sha256=155xepXPr4OEzs2Mz5YnjXcBpxSv1X2eznRUVoPtyK0,3268
|
316
316
|
alita_sdk/tools/utils/available_tools_decorator.py,sha256=IbrdfeQkswxUFgvvN7-dyLMZMyXLiwvX7kgi3phciCk,273
|
317
|
-
alita_sdk/tools/utils/content_parser.py,sha256=
|
317
|
+
alita_sdk/tools/utils/content_parser.py,sha256=a8m5kSpEuI4d3YIJlBqSrHtEc-igAnOUDI_uRyo4Sls,9878
|
318
318
|
alita_sdk/tools/vector_adapters/VectorStoreAdapter.py,sha256=a6FAsiix_EvATIKUf5YT6vHh5LDyJ5uSP3LJqoxFo04,17367
|
319
319
|
alita_sdk/tools/vector_adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
320
320
|
alita_sdk/tools/xray/__init__.py,sha256=BnG2StSfX44CUMtrjHTcSCDWxxse5tCZqwyaZSkBKIc,4230
|
@@ -336,8 +336,8 @@ alita_sdk/tools/zephyr_scale/api_wrapper.py,sha256=HOt9ShtJI_1tVPcwd3Rwk-VS0SMLq
|
|
336
336
|
alita_sdk/tools/zephyr_squad/__init__.py,sha256=0AI_j27xVO5Gk5HQMFrqPTd4uvuVTpiZUicBrdfEpKg,2796
|
337
337
|
alita_sdk/tools/zephyr_squad/api_wrapper.py,sha256=kmw_xol8YIYFplBLWTqP_VKPRhL_1ItDD0_vXTe_UuI,14906
|
338
338
|
alita_sdk/tools/zephyr_squad/zephyr_squad_cloud_client.py,sha256=R371waHsms4sllHCbijKYs90C-9Yu0sSR3N4SUfQOgU,5066
|
339
|
-
alita_sdk-0.3.
|
340
|
-
alita_sdk-0.3.
|
341
|
-
alita_sdk-0.3.
|
342
|
-
alita_sdk-0.3.
|
343
|
-
alita_sdk-0.3.
|
339
|
+
alita_sdk-0.3.261.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
340
|
+
alita_sdk-0.3.261.dist-info/METADATA,sha256=KP19GSFOTQCGJttWSdZpq2fXIUzKu8Qq9hJFObVsNAY,18897
|
341
|
+
alita_sdk-0.3.261.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
342
|
+
alita_sdk-0.3.261.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
|
343
|
+
alita_sdk-0.3.261.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|