alita-sdk 0.3.140b4__py3-none-any.whl → 0.3.140b5__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.
@@ -75,10 +75,20 @@ class AlitaClient:
75
75
  def mcp_tool_call(self, params: dict[str, Any]):
76
76
  if user_id := self._get_real_user_id():
77
77
  url = f"{self.mcp_tools_call}/{user_id}"
78
- data = requests.post(url, headers=self.headers, json=params, verify=False).json()
79
- return data
78
+ #
79
+ # This loop iterates over each key-value pair in the arguments dictionary,
80
+ # and if a value is a Pydantic object, it replaces it with its dictionary representation using .dict().
81
+ for arg_name, arg_value in params.get('params', {}).get('arguments', {}).items():
82
+ if hasattr(arg_value, "dict") and callable(arg_value.dict):
83
+ params['params']['arguments'][arg_name] = arg_value.dict()
84
+ #
85
+ response = requests.post(url, headers=self.headers, json=params, verify=False)
86
+ try:
87
+ return response.json()
88
+ except (ValueError, TypeError):
89
+ return response.text
80
90
  else:
81
- return f"Error: Could not determine user ID for MCP tool call: {e}"
91
+ return f"Error: Could not determine user ID for MCP tool call"
82
92
 
83
93
  def prompt(self, prompt_id, prompt_version_id, chat_history=None, return_tool=False):
84
94
  url = f"{self.prompt_versions}/{prompt_id}/{prompt_version_id}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alita_sdk
3
- Version: 0.3.140b4
3
+ Version: 0.3.140b5
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>
6
6
  Project-URL: Homepage, https://projectalita.ai
@@ -4,7 +4,7 @@ alita_sdk/agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
4
4
  alita_sdk/agents/llamaAgentParser.py,sha256=N_Nw6WJ8xrNX3fr_JFwjUIg_Urai9lLU3poMgZz0Cyk,1701
5
5
  alita_sdk/clients/__init__.py,sha256=5O_7WsZmvg5z5uZf_Jkx-f8j5C6yKIuSwQR6AQ-TM84,31
6
6
  alita_sdk/clients/artifact.py,sha256=W6oLlthtsUHfUWjhihaDdhLZdRVqj1D2j7oHHELxJfs,2639
7
- alita_sdk/clients/client.py,sha256=42g8Q7LosIxqGsxNRhNE0KF3VRPKCbVxkeQMVRnyP3Y,19562
7
+ alita_sdk/clients/client.py,sha256=70VkiVSgiUaj8JYI-qwQKTt0GNqHvPJ6_Uj-LRPl0Sg,20147
8
8
  alita_sdk/clients/datasource.py,sha256=HAZovoQN9jBg0_-lIlGBQzb4FJdczPhkHehAiVG3Wx0,1020
9
9
  alita_sdk/clients/prompt.py,sha256=li1RG9eBwgNK_Qf0qUaZ8QNTmsncFrAL2pv3kbxZRZg,1447
10
10
  alita_sdk/community/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -101,13 +101,13 @@ alita_sdk/utils/logging.py,sha256=hBE3qAzmcLMdamMp2YRXwOOK9P4lmNaNhM76kntVljs,31
101
101
  alita_sdk/utils/save_dataframe.py,sha256=tNwnaVCvN4_B0oi3F4Y3Z13elbIRtwKmdKHsMcj658g,1465
102
102
  alita_sdk/utils/streamlit.py,sha256=zp8owZwHI3HZplhcExJf6R3-APtWx-z6s5jznT2hY_k,29124
103
103
  alita_sdk/utils/utils.py,sha256=dM8whOJAuFJFe19qJ69-FLzrUp6d2G-G6L7d4ss2XqM,346
104
- alita_sdk-0.3.140b4.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
104
+ alita_sdk-0.3.140b5.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
105
105
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
106
106
  tests/test_ado_analysis.py,sha256=wsxB4B2Ycxoiykthh6YbPQ9hqsDbPFie8D9ZK1i_6kg,3311
107
107
  tests/test_github_analysis.py,sha256=ulR4CEGmiMRPydJuX7aQcglzvhC7kFOAtZRLLBB9F_M,3148
108
108
  tests/test_gitlab_analysis.py,sha256=J7Y2mNi5Sj8-rH2PMRmVbT3uwZ17YeR9pcs0MDIyNW4,3352
109
109
  tests/test_jira_analysis.py,sha256=6F3Elikt02L28N6sS_AKDy9lgqgD81_hr979NcdZeg4,3359
110
- alita_sdk-0.3.140b4.dist-info/METADATA,sha256=kPo52ujJYFCH8RFmRn2d8PW3fBsSfewCbqOwjFBhsqI,7078
111
- alita_sdk-0.3.140b4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
112
- alita_sdk-0.3.140b4.dist-info/top_level.txt,sha256=SWRhxB7Et3cOy3RkE5hR7OIRnHoo3K8EXzoiNlkfOmc,25
113
- alita_sdk-0.3.140b4.dist-info/RECORD,,
110
+ alita_sdk-0.3.140b5.dist-info/METADATA,sha256=3wK-7fWFZ78GdG91Rtfvn_ks_a0jfUyRsZegb0OuBTc,7078
111
+ alita_sdk-0.3.140b5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
112
+ alita_sdk-0.3.140b5.dist-info/top_level.txt,sha256=SWRhxB7Et3cOy3RkE5hR7OIRnHoo3K8EXzoiNlkfOmc,25
113
+ alita_sdk-0.3.140b5.dist-info/RECORD,,