github-haystack 1.2.0__py3-none-any.whl → 2.0.0__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.
- {github_haystack-1.2.0.dist-info → github_haystack-2.0.0.dist-info}/METADATA +3 -4
- {github_haystack-1.2.0.dist-info → github_haystack-2.0.0.dist-info}/RECORD +17 -17
- {github_haystack-1.2.0.dist-info → github_haystack-2.0.0.dist-info}/WHEEL +1 -1
- haystack_integrations/components/connectors/github/file_editor.py +18 -16
- haystack_integrations/components/connectors/github/issue_commenter.py +6 -4
- haystack_integrations/components/connectors/github/issue_viewer.py +8 -6
- haystack_integrations/components/connectors/github/pr_creator.py +8 -6
- haystack_integrations/components/connectors/github/repo_forker.py +7 -5
- haystack_integrations/components/connectors/github/repo_viewer.py +12 -10
- haystack_integrations/tools/github/file_editor_tool.py +11 -10
- haystack_integrations/tools/github/issue_commenter_tool.py +10 -9
- haystack_integrations/tools/github/issue_viewer_tool.py +11 -10
- haystack_integrations/tools/github/pr_creator_tool.py +10 -9
- haystack_integrations/tools/github/repo_forker_tool.py +10 -9
- haystack_integrations/tools/github/repo_viewer_tool.py +12 -11
- haystack_integrations/tools/github/utils.py +7 -6
- {github_haystack-1.2.0.dist-info → github_haystack-2.0.0.dist-info}/licenses/LICENSE.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: github-haystack
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: Haystack components for interacting with GitHub repositories
|
|
5
5
|
Project-URL: Source, https://github.com/deepset-ai/haystack-core-integrations/github
|
|
6
6
|
Project-URL: Documentation, https://github.com/deepset-ai/haystack-core-integrations/blob/main/integrations/github/README.md
|
|
@@ -11,15 +11,14 @@ License-File: LICENSE.txt
|
|
|
11
11
|
Classifier: Development Status :: 4 - Beta
|
|
12
12
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
13
|
Classifier: Programming Language :: Python
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.13
|
|
19
18
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
20
19
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
21
|
-
Requires-Python: >=3.
|
|
22
|
-
Requires-Dist: haystack-ai>=2.
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Requires-Dist: haystack-ai>=2.22.0
|
|
23
22
|
Description-Content-Type: text/markdown
|
|
24
23
|
|
|
25
24
|
# github-haystack
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
haystack_integrations/components/connectors/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
haystack_integrations/components/connectors/github/__init__.py,sha256=aRIkCcJ_ogsyt67cwjZQu8rqP7yIQu8jRzK6TAYRGx4,557
|
|
3
|
-
haystack_integrations/components/connectors/github/file_editor.py,sha256=
|
|
4
|
-
haystack_integrations/components/connectors/github/issue_commenter.py,sha256=
|
|
5
|
-
haystack_integrations/components/connectors/github/issue_viewer.py,sha256=
|
|
6
|
-
haystack_integrations/components/connectors/github/pr_creator.py,sha256=
|
|
7
|
-
haystack_integrations/components/connectors/github/repo_forker.py,sha256=
|
|
8
|
-
haystack_integrations/components/connectors/github/repo_viewer.py,sha256=
|
|
3
|
+
haystack_integrations/components/connectors/github/file_editor.py,sha256=4bRBaFIQO8MPWrrLr6_W11bDbaNRQC7-fcMJpWhO2Pw,11752
|
|
4
|
+
haystack_integrations/components/connectors/github/issue_commenter.py,sha256=G_jtdzNwOr5qEnRy-GR888qo25oKwX-_e6yQWNZTMH4,5682
|
|
5
|
+
haystack_integrations/components/connectors/github/issue_viewer.py,sha256=CJ3MFHpx_Ix0_p6ogCf5Lp8Si-HZxIKczstbk8uptzU,7413
|
|
6
|
+
haystack_integrations/components/connectors/github/pr_creator.py,sha256=m3jMxGBaiw6EoYhYSFeEFBwGvZTXUaO_tJh5Iw-7o3U,11479
|
|
7
|
+
haystack_integrations/components/connectors/github/repo_forker.py,sha256=DXw8GHRVXlvqs9s24XTW6Z0uAIuzhSb8lTKx-NgLi28,11573
|
|
8
|
+
haystack_integrations/components/connectors/github/repo_viewer.py,sha256=DK_zStASIt7p5xX_SRd8l8WypsL3R1v5FoNBcx1cakQ,9232
|
|
9
9
|
haystack_integrations/prompts/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
haystack_integrations/prompts/github/__init__.py,sha256=cs_w-7RycC2C9q35pN0jY-McAHWbTIM-j_O2S-AIM7Q,882
|
|
11
11
|
haystack_integrations/prompts/github/context_prompt.py,sha256=RSzISqtaBHaC7v6rcyyxt2vxmbBVp5OHsWR6Z2wp5pk,8783
|
|
@@ -18,14 +18,14 @@ haystack_integrations/prompts/github/repo_viewer_prompt.py,sha256=JkU2ODn06Vs_YQ
|
|
|
18
18
|
haystack_integrations/prompts/github/system_prompt.py,sha256=xiOEAbENJiLHL8M1qrgSdUxrfguAphI_6B0kqelxDok,4209
|
|
19
19
|
haystack_integrations/tools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
20
|
haystack_integrations/tools/github/__init__.py,sha256=ZJKLyVZRXcg5mU-AdH_Xk1rNLeiItlPqgmY6eTqFSTA,611
|
|
21
|
-
haystack_integrations/tools/github/file_editor_tool.py,sha256=
|
|
22
|
-
haystack_integrations/tools/github/issue_commenter_tool.py,sha256=
|
|
23
|
-
haystack_integrations/tools/github/issue_viewer_tool.py,sha256
|
|
24
|
-
haystack_integrations/tools/github/pr_creator_tool.py,sha256=
|
|
25
|
-
haystack_integrations/tools/github/repo_forker_tool.py,sha256=
|
|
26
|
-
haystack_integrations/tools/github/repo_viewer_tool.py,sha256=
|
|
27
|
-
haystack_integrations/tools/github/utils.py,sha256=
|
|
28
|
-
github_haystack-
|
|
29
|
-
github_haystack-
|
|
30
|
-
github_haystack-
|
|
31
|
-
github_haystack-
|
|
21
|
+
haystack_integrations/tools/github/file_editor_tool.py,sha256=BBc0a6gqoQLcsYXUnDwaoqvjFWagNmTpOP8hul99AZw,5149
|
|
22
|
+
haystack_integrations/tools/github/issue_commenter_tool.py,sha256=NDZCE3ZQlJ9qhyfStF8plbHy0jI8wsNtg3dmlPvwX3A,5099
|
|
23
|
+
haystack_integrations/tools/github/issue_viewer_tool.py,sha256=-CWpyX1hl4BREMOjOPnvX0skeHIupdyltHNCBE5PpLc,5036
|
|
24
|
+
haystack_integrations/tools/github/pr_creator_tool.py,sha256=Xx5HSswLuVorum5Hizlj_IW3_Wl9eXN3yb5J5ZMtirw,4798
|
|
25
|
+
haystack_integrations/tools/github/repo_forker_tool.py,sha256=3Lv9ukJnSSs-5rlw1iW82ftr407yuuSVTHtfQPv7d0I,4808
|
|
26
|
+
haystack_integrations/tools/github/repo_viewer_tool.py,sha256=YmyKqXQJLF1xU8-ZuFf03xcZfNILYnqVn_O_DQ1zOL0,5851
|
|
27
|
+
haystack_integrations/tools/github/utils.py,sha256=5j9AASDRg7lB01njb7Z7Y2Hlu6gVa5oYJoh1-6IG3TY,3292
|
|
28
|
+
github_haystack-2.0.0.dist-info/METADATA,sha256=lgM-n9sEIc7nXDc9LGWrU8KFf6hqchhx9qyrSqo_JO0,1722
|
|
29
|
+
github_haystack-2.0.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
30
|
+
github_haystack-2.0.0.dist-info/licenses/LICENSE.txt,sha256=B05uMshqTA74s-0ltyHKI6yoPfJ3zYgQbvcXfDVGFf8,10280
|
|
31
|
+
github_haystack-2.0.0.dist-info/RECORD,,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
from base64 import b64decode, b64encode
|
|
5
5
|
from enum import Enum
|
|
6
|
-
from typing import Any
|
|
6
|
+
from typing import Any
|
|
7
7
|
|
|
8
8
|
import requests
|
|
9
9
|
from haystack import component, default_from_dict, default_to_dict, logging
|
|
@@ -79,7 +79,7 @@ class GitHubFileEditor:
|
|
|
79
79
|
self,
|
|
80
80
|
*,
|
|
81
81
|
github_token: Secret = Secret.from_env_var("GITHUB_TOKEN"),
|
|
82
|
-
repo:
|
|
82
|
+
repo: str | None = None,
|
|
83
83
|
branch: str = "main",
|
|
84
84
|
raise_on_failure: bool = True,
|
|
85
85
|
):
|
|
@@ -115,7 +115,9 @@ class GitHubFileEditor:
|
|
|
115
115
|
"""
|
|
116
116
|
headers = self.base_headers.copy()
|
|
117
117
|
if self.github_token is not None:
|
|
118
|
-
|
|
118
|
+
token_value = self.github_token.resolve_value()
|
|
119
|
+
if token_value:
|
|
120
|
+
headers["Authorization"] = f"Bearer {token_value}"
|
|
119
121
|
return headers
|
|
120
122
|
|
|
121
123
|
def _get_file_content(self, owner: str, repo: str, path: str, branch: str) -> tuple[str, str]:
|
|
@@ -143,7 +145,7 @@ class GitHubFileEditor:
|
|
|
143
145
|
def _check_last_commit(self, owner: str, repo: str, branch: str) -> bool:
|
|
144
146
|
"""Check if last commit was made by the current token user."""
|
|
145
147
|
url = f"https://api.github.com/repos/{owner}/{repo}/commits"
|
|
146
|
-
params:
|
|
148
|
+
params: dict[str, str | int] = {"per_page": 1, "sha": branch}
|
|
147
149
|
response = requests.get(url, headers=self._get_request_headers(), params=params, timeout=10)
|
|
148
150
|
response.raise_for_status()
|
|
149
151
|
last_commit = response.json()[0]
|
|
@@ -156,7 +158,7 @@ class GitHubFileEditor:
|
|
|
156
158
|
|
|
157
159
|
return commit_author == current_user
|
|
158
160
|
|
|
159
|
-
def _edit_file(self, owner: str, repo: str, payload:
|
|
161
|
+
def _edit_file(self, owner: str, repo: str, payload: dict[str, str], branch: str) -> str:
|
|
160
162
|
"""Handle file editing."""
|
|
161
163
|
try:
|
|
162
164
|
content, sha = self._get_file_content(owner, repo, payload["path"], branch)
|
|
@@ -178,7 +180,7 @@ class GitHubFileEditor:
|
|
|
178
180
|
raise
|
|
179
181
|
return f"Error: {e!s}"
|
|
180
182
|
|
|
181
|
-
def _undo_changes(self, owner: str, repo: str, payload:
|
|
183
|
+
def _undo_changes(self, owner: str, repo: str, payload: dict[str, Any], branch: str) -> str:
|
|
182
184
|
"""Handle undoing changes."""
|
|
183
185
|
try:
|
|
184
186
|
if not self._check_last_commit(owner, repo, branch):
|
|
@@ -189,7 +191,7 @@ class GitHubFileEditor:
|
|
|
189
191
|
commits_url = f"https://api.github.com/repos/{owner}/{repo}/commits"
|
|
190
192
|
|
|
191
193
|
# Get the previous commit SHA
|
|
192
|
-
params:
|
|
194
|
+
params: dict[str, str | int] = {"per_page": 2, "sha": branch}
|
|
193
195
|
commits = requests.get(commits_url, headers=self._get_request_headers(), params=params, timeout=10).json()
|
|
194
196
|
previous_sha = commits[1]["sha"]
|
|
195
197
|
|
|
@@ -205,7 +207,7 @@ class GitHubFileEditor:
|
|
|
205
207
|
raise
|
|
206
208
|
return f"Error: {e!s}"
|
|
207
209
|
|
|
208
|
-
def _create_file(self, owner: str, repo: str, payload:
|
|
210
|
+
def _create_file(self, owner: str, repo: str, payload: dict[str, str], branch: str) -> str:
|
|
209
211
|
"""Handle file creation."""
|
|
210
212
|
try:
|
|
211
213
|
url = f"https://api.github.com/repos/{owner}/{repo}/contents/{payload['path']}"
|
|
@@ -222,7 +224,7 @@ class GitHubFileEditor:
|
|
|
222
224
|
raise
|
|
223
225
|
return f"Error: {e!s}"
|
|
224
226
|
|
|
225
|
-
def _delete_file(self, owner: str, repo: str, payload:
|
|
227
|
+
def _delete_file(self, owner: str, repo: str, payload: dict[str, str], branch: str) -> str:
|
|
226
228
|
"""Handle file deletion."""
|
|
227
229
|
try:
|
|
228
230
|
_, sha = self._get_file_content(owner, repo, payload["path"], branch)
|
|
@@ -242,11 +244,11 @@ class GitHubFileEditor:
|
|
|
242
244
|
@component.output_types(result=str)
|
|
243
245
|
def run(
|
|
244
246
|
self,
|
|
245
|
-
command:
|
|
246
|
-
payload:
|
|
247
|
-
repo:
|
|
248
|
-
branch:
|
|
249
|
-
) ->
|
|
247
|
+
command: Command | str,
|
|
248
|
+
payload: dict[str, Any],
|
|
249
|
+
repo: str | None = None,
|
|
250
|
+
branch: str | None = None,
|
|
251
|
+
) -> dict[str, str]:
|
|
250
252
|
"""
|
|
251
253
|
Process GitHub file operations.
|
|
252
254
|
|
|
@@ -285,7 +287,7 @@ class GitHubFileEditor:
|
|
|
285
287
|
result = command_handlers[command](owner, repo_name, payload, working_branch)
|
|
286
288
|
return {"result": result}
|
|
287
289
|
|
|
288
|
-
def to_dict(self) ->
|
|
290
|
+
def to_dict(self) -> dict[str, Any]:
|
|
289
291
|
"""Serialize the component to a dictionary."""
|
|
290
292
|
return default_to_dict(
|
|
291
293
|
self,
|
|
@@ -296,7 +298,7 @@ class GitHubFileEditor:
|
|
|
296
298
|
)
|
|
297
299
|
|
|
298
300
|
@classmethod
|
|
299
|
-
def from_dict(cls, data:
|
|
301
|
+
def from_dict(cls, data: dict[str, Any]) -> "GitHubFileEditor":
|
|
300
302
|
"""Deserialize the component from a dictionary."""
|
|
301
303
|
init_params = data["init_parameters"]
|
|
302
304
|
deserialize_secrets_inplace(init_params, keys=["github_token"])
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
#
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
import re
|
|
5
|
-
from typing import Any
|
|
5
|
+
from typing import Any
|
|
6
6
|
|
|
7
7
|
import requests
|
|
8
8
|
from haystack import component, default_from_dict, default_to_dict, logging
|
|
@@ -67,7 +67,9 @@ class GitHubIssueCommenter:
|
|
|
67
67
|
"""
|
|
68
68
|
headers = self.base_headers.copy()
|
|
69
69
|
if self.github_token is not None:
|
|
70
|
-
|
|
70
|
+
token_value = self.github_token.resolve_value()
|
|
71
|
+
if token_value:
|
|
72
|
+
headers["Authorization"] = f"Bearer {token_value}"
|
|
71
73
|
return headers
|
|
72
74
|
|
|
73
75
|
def _parse_github_url(self, url: str) -> tuple[str, str, int]:
|
|
@@ -113,7 +115,7 @@ class GitHubIssueCommenter:
|
|
|
113
115
|
|
|
114
116
|
return False
|
|
115
117
|
|
|
116
|
-
def to_dict(self) ->
|
|
118
|
+
def to_dict(self) -> dict[str, Any]:
|
|
117
119
|
"""
|
|
118
120
|
Serialize the component to a dictionary.
|
|
119
121
|
|
|
@@ -127,7 +129,7 @@ class GitHubIssueCommenter:
|
|
|
127
129
|
)
|
|
128
130
|
|
|
129
131
|
@classmethod
|
|
130
|
-
def from_dict(cls, data:
|
|
132
|
+
def from_dict(cls, data: dict[str, Any]) -> "GitHubIssueCommenter":
|
|
131
133
|
"""
|
|
132
134
|
Deserialize the component from a dictionary.
|
|
133
135
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
#
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
import re
|
|
5
|
-
from typing import Any
|
|
5
|
+
from typing import Any
|
|
6
6
|
|
|
7
7
|
import requests
|
|
8
8
|
from haystack import Document, component, default_from_dict, default_to_dict, logging
|
|
@@ -37,7 +37,7 @@ class GitHubIssueViewer:
|
|
|
37
37
|
def __init__(
|
|
38
38
|
self,
|
|
39
39
|
*,
|
|
40
|
-
github_token:
|
|
40
|
+
github_token: Secret | None = None,
|
|
41
41
|
raise_on_failure: bool = True,
|
|
42
42
|
retry_attempts: int = 2,
|
|
43
43
|
):
|
|
@@ -66,7 +66,9 @@ class GitHubIssueViewer:
|
|
|
66
66
|
"""
|
|
67
67
|
headers = self.base_headers.copy()
|
|
68
68
|
if self.github_token:
|
|
69
|
-
|
|
69
|
+
token_value = self.github_token.resolve_value()
|
|
70
|
+
if token_value:
|
|
71
|
+
headers["Authorization"] = f"Bearer {token_value}"
|
|
70
72
|
return headers
|
|
71
73
|
|
|
72
74
|
def _parse_github_url(self, url: str) -> tuple[str, str, int]:
|
|
@@ -152,7 +154,7 @@ class GitHubIssueViewer:
|
|
|
152
154
|
},
|
|
153
155
|
)
|
|
154
156
|
|
|
155
|
-
def to_dict(self) ->
|
|
157
|
+
def to_dict(self) -> dict[str, Any]:
|
|
156
158
|
"""
|
|
157
159
|
Serialize the component to a dictionary.
|
|
158
160
|
|
|
@@ -166,7 +168,7 @@ class GitHubIssueViewer:
|
|
|
166
168
|
)
|
|
167
169
|
|
|
168
170
|
@classmethod
|
|
169
|
-
def from_dict(cls, data:
|
|
171
|
+
def from_dict(cls, data: dict[str, Any]) -> "GitHubIssueViewer":
|
|
170
172
|
"""
|
|
171
173
|
Deserialize the component from a dictionary.
|
|
172
174
|
|
|
@@ -177,7 +179,7 @@ class GitHubIssueViewer:
|
|
|
177
179
|
deserialize_secrets_inplace(init_params, keys=["github_token"])
|
|
178
180
|
return default_from_dict(cls, data)
|
|
179
181
|
|
|
180
|
-
@component.output_types(documents=
|
|
182
|
+
@component.output_types(documents=list[Document])
|
|
181
183
|
def run(self, url: str) -> dict:
|
|
182
184
|
"""
|
|
183
185
|
Process a GitHub issue URL and return documents.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
#
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
import re
|
|
5
|
-
from typing import Any
|
|
5
|
+
from typing import Any
|
|
6
6
|
|
|
7
7
|
import requests
|
|
8
8
|
from haystack import component, default_from_dict, default_to_dict, logging
|
|
@@ -65,7 +65,9 @@ class GitHubPRCreator:
|
|
|
65
65
|
"""
|
|
66
66
|
headers = self.base_headers.copy()
|
|
67
67
|
if self.github_token is not None:
|
|
68
|
-
|
|
68
|
+
token_value = self.github_token.resolve_value()
|
|
69
|
+
if token_value:
|
|
70
|
+
headers["Authorization"] = f"Bearer {token_value}"
|
|
69
71
|
return headers
|
|
70
72
|
|
|
71
73
|
def _parse_issue_url(self, issue_url: str) -> tuple[str, str, str]:
|
|
@@ -100,7 +102,7 @@ class GitHubPRCreator:
|
|
|
100
102
|
except requests.RequestException:
|
|
101
103
|
return False
|
|
102
104
|
|
|
103
|
-
def _create_fork(self, owner: str, repo: str) ->
|
|
105
|
+
def _create_fork(self, owner: str, repo: str) -> str | None:
|
|
104
106
|
"""Create a fork of the repository."""
|
|
105
107
|
url = f"https://api.github.com/repos/{owner}/{repo}/forks"
|
|
106
108
|
try:
|
|
@@ -213,7 +215,7 @@ class GitHubPRCreator:
|
|
|
213
215
|
@component.output_types(result=str)
|
|
214
216
|
def run(
|
|
215
217
|
self, issue_url: str, title: str, branch: str, base: str, body: str = "", draft: bool = False
|
|
216
|
-
) ->
|
|
218
|
+
) -> dict[str, str]:
|
|
217
219
|
"""
|
|
218
220
|
Create a new pull request from your fork to the original repository, linked to the specified issue.
|
|
219
221
|
|
|
@@ -261,7 +263,7 @@ class GitHubPRCreator:
|
|
|
261
263
|
raise
|
|
262
264
|
return {"result": f"Error: {e!s}"}
|
|
263
265
|
|
|
264
|
-
def to_dict(self) ->
|
|
266
|
+
def to_dict(self) -> dict[str, Any]:
|
|
265
267
|
"""Serialize the component to a dictionary."""
|
|
266
268
|
return default_to_dict(
|
|
267
269
|
self,
|
|
@@ -270,7 +272,7 @@ class GitHubPRCreator:
|
|
|
270
272
|
)
|
|
271
273
|
|
|
272
274
|
@classmethod
|
|
273
|
-
def from_dict(cls, data:
|
|
275
|
+
def from_dict(cls, data: dict[str, Any]) -> "GitHubPRCreator":
|
|
274
276
|
"""Deserialize the component from a dictionary."""
|
|
275
277
|
init_params = data["init_parameters"]
|
|
276
278
|
deserialize_secrets_inplace(init_params, keys=["github_token"])
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
import re
|
|
5
5
|
import time
|
|
6
|
-
from typing import Any
|
|
6
|
+
from typing import Any
|
|
7
7
|
|
|
8
8
|
import requests
|
|
9
9
|
from haystack import component, default_from_dict, default_to_dict, logging
|
|
@@ -85,7 +85,9 @@ class GitHubRepoForker:
|
|
|
85
85
|
"""
|
|
86
86
|
headers = self.base_headers.copy()
|
|
87
87
|
if self.github_token is not None:
|
|
88
|
-
|
|
88
|
+
token_value = self.github_token.resolve_value()
|
|
89
|
+
if token_value:
|
|
90
|
+
headers["Authorization"] = f"Bearer {token_value}"
|
|
89
91
|
return headers
|
|
90
92
|
|
|
91
93
|
def _parse_github_url(self, url: str) -> tuple[str, str, str]:
|
|
@@ -135,7 +137,7 @@ class GitHubRepoForker:
|
|
|
135
137
|
response.raise_for_status()
|
|
136
138
|
return response.json()["login"]
|
|
137
139
|
|
|
138
|
-
def _get_existing_repository(self, repo_name: str) ->
|
|
140
|
+
def _get_existing_repository(self, repo_name: str) -> str | None:
|
|
139
141
|
"""
|
|
140
142
|
Check if a repository with the given name already exists in the authenticated user's account.
|
|
141
143
|
|
|
@@ -219,7 +221,7 @@ class GitHubRepoForker:
|
|
|
219
221
|
fork_data = response.json()
|
|
220
222
|
return f"{fork_data['owner']['login']}/{fork_data['name']}"
|
|
221
223
|
|
|
222
|
-
def to_dict(self) ->
|
|
224
|
+
def to_dict(self) -> dict[str, Any]:
|
|
223
225
|
"""
|
|
224
226
|
Serialize the component to a dictionary.
|
|
225
227
|
|
|
@@ -237,7 +239,7 @@ class GitHubRepoForker:
|
|
|
237
239
|
)
|
|
238
240
|
|
|
239
241
|
@classmethod
|
|
240
|
-
def from_dict(cls, data:
|
|
242
|
+
def from_dict(cls, data: dict[str, Any]) -> "GitHubRepoForker":
|
|
241
243
|
"""
|
|
242
244
|
Deserialize the component from a dictionary.
|
|
243
245
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
import base64
|
|
5
5
|
from dataclasses import dataclass
|
|
6
|
-
from typing import Any
|
|
6
|
+
from typing import Any
|
|
7
7
|
|
|
8
8
|
import requests
|
|
9
9
|
from haystack import Document, component, default_from_dict, default_to_dict, logging
|
|
@@ -21,7 +21,7 @@ class GitHubItem:
|
|
|
21
21
|
path: str
|
|
22
22
|
size: int
|
|
23
23
|
url: str
|
|
24
|
-
content:
|
|
24
|
+
content: str | None = None
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
@component
|
|
@@ -71,10 +71,10 @@ class GitHubRepoViewer:
|
|
|
71
71
|
def __init__(
|
|
72
72
|
self,
|
|
73
73
|
*,
|
|
74
|
-
github_token:
|
|
74
|
+
github_token: Secret | None = None,
|
|
75
75
|
raise_on_failure: bool = True,
|
|
76
76
|
max_file_size: int = 1_000_000, # 1MB default limit
|
|
77
|
-
repo:
|
|
77
|
+
repo: str | None = None,
|
|
78
78
|
branch: str = "main",
|
|
79
79
|
):
|
|
80
80
|
"""
|
|
@@ -109,10 +109,12 @@ class GitHubRepoViewer:
|
|
|
109
109
|
"""
|
|
110
110
|
headers = self.base_headers.copy()
|
|
111
111
|
if self.github_token is not None:
|
|
112
|
-
|
|
112
|
+
token_value = self.github_token.resolve_value()
|
|
113
|
+
if token_value:
|
|
114
|
+
headers["Authorization"] = f"Bearer {token_value}"
|
|
113
115
|
return headers
|
|
114
116
|
|
|
115
|
-
def to_dict(self) ->
|
|
117
|
+
def to_dict(self) -> dict[str, Any]:
|
|
116
118
|
"""
|
|
117
119
|
Serialize the component to a dictionary.
|
|
118
120
|
|
|
@@ -128,7 +130,7 @@ class GitHubRepoViewer:
|
|
|
128
130
|
)
|
|
129
131
|
|
|
130
132
|
@classmethod
|
|
131
|
-
def from_dict(cls, data:
|
|
133
|
+
def from_dict(cls, data: dict[str, Any]) -> "GitHubRepoViewer":
|
|
132
134
|
"""
|
|
133
135
|
Deserialize the component from a dictionary.
|
|
134
136
|
|
|
@@ -179,7 +181,7 @@ class GitHubRepoViewer:
|
|
|
179
181
|
},
|
|
180
182
|
)
|
|
181
183
|
|
|
182
|
-
def _create_directory_documents(self, items:
|
|
184
|
+
def _create_directory_documents(self, items: list[GitHubItem]) -> list[Document]:
|
|
183
185
|
"""Create a list of Documents from directory contents"""
|
|
184
186
|
return [
|
|
185
187
|
Document(
|
|
@@ -204,8 +206,8 @@ class GitHubRepoViewer:
|
|
|
204
206
|
},
|
|
205
207
|
)
|
|
206
208
|
|
|
207
|
-
@component.output_types(documents=
|
|
208
|
-
def run(self, path: str, repo:
|
|
209
|
+
@component.output_types(documents=list[Document])
|
|
210
|
+
def run(self, path: str, repo: str | None = None, branch: str | None = None) -> dict[str, list[Document]]:
|
|
209
211
|
"""
|
|
210
212
|
Process a GitHub repository path and return documents.
|
|
211
213
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# SPDX-FileCopyrightText: 2023-present deepset GmbH <info@deepset.ai>
|
|
2
2
|
#
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
from
|
|
4
|
+
from collections.abc import Callable
|
|
5
|
+
from typing import Any
|
|
5
6
|
|
|
6
7
|
from haystack.core.serialization import generate_qualified_class_name
|
|
7
8
|
from haystack.tools import ComponentTool
|
|
@@ -20,16 +21,16 @@ class GitHubFileEditorTool(ComponentTool):
|
|
|
20
21
|
def __init__(
|
|
21
22
|
self,
|
|
22
23
|
*,
|
|
23
|
-
name:
|
|
24
|
-
description:
|
|
25
|
-
parameters:
|
|
24
|
+
name: str | None = "file_editor",
|
|
25
|
+
description: str | None = FILE_EDITOR_PROMPT,
|
|
26
|
+
parameters: dict[str, Any] | None = FILE_EDITOR_SCHEMA,
|
|
26
27
|
github_token: Secret = Secret.from_env_var("GITHUB_TOKEN"),
|
|
27
|
-
repo:
|
|
28
|
+
repo: str | None = None,
|
|
28
29
|
branch: str = "main",
|
|
29
30
|
raise_on_failure: bool = True,
|
|
30
|
-
outputs_to_string:
|
|
31
|
-
inputs_from_state:
|
|
32
|
-
outputs_to_state:
|
|
31
|
+
outputs_to_string: dict[str, str | Callable[[Any], str]] | None = None,
|
|
32
|
+
inputs_from_state: dict[str, str] | None = None,
|
|
33
|
+
outputs_to_state: dict[str, dict[str, str | Callable]] | None = None,
|
|
33
34
|
):
|
|
34
35
|
"""
|
|
35
36
|
Initialize the GitHub file editor tool.
|
|
@@ -86,7 +87,7 @@ class GitHubFileEditorTool(ComponentTool):
|
|
|
86
87
|
outputs_to_state=outputs_to_state,
|
|
87
88
|
)
|
|
88
89
|
|
|
89
|
-
def to_dict(self) ->
|
|
90
|
+
def to_dict(self) -> dict[str, Any]:
|
|
90
91
|
"""
|
|
91
92
|
Serializes the tool to a dictionary.
|
|
92
93
|
|
|
@@ -110,7 +111,7 @@ class GitHubFileEditorTool(ComponentTool):
|
|
|
110
111
|
return {"type": generate_qualified_class_name(type(self)), "data": serialized}
|
|
111
112
|
|
|
112
113
|
@classmethod
|
|
113
|
-
def from_dict(cls, data:
|
|
114
|
+
def from_dict(cls, data: dict[str, Any]) -> "GitHubFileEditorTool":
|
|
114
115
|
"""
|
|
115
116
|
Deserializes the tool from a dictionary.
|
|
116
117
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# SPDX-FileCopyrightText: 2023-present deepset GmbH <info@deepset.ai>
|
|
2
2
|
#
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
from
|
|
4
|
+
from collections.abc import Callable
|
|
5
|
+
from typing import Any
|
|
5
6
|
|
|
6
7
|
from haystack.core.serialization import generate_qualified_class_name
|
|
7
8
|
from haystack.tools import ComponentTool
|
|
@@ -20,15 +21,15 @@ class GitHubIssueCommenterTool(ComponentTool):
|
|
|
20
21
|
def __init__(
|
|
21
22
|
self,
|
|
22
23
|
*,
|
|
23
|
-
name:
|
|
24
|
-
description:
|
|
25
|
-
parameters:
|
|
24
|
+
name: str | None = "issue_commenter",
|
|
25
|
+
description: str | None = ISSUE_COMMENTER_PROMPT,
|
|
26
|
+
parameters: dict[str, Any] | None = ISSUE_COMMENTER_SCHEMA,
|
|
26
27
|
github_token: Secret = Secret.from_env_var("GITHUB_TOKEN"),
|
|
27
28
|
raise_on_failure: bool = True,
|
|
28
29
|
retry_attempts: int = 2,
|
|
29
|
-
outputs_to_string:
|
|
30
|
-
inputs_from_state:
|
|
31
|
-
outputs_to_state:
|
|
30
|
+
outputs_to_string: dict[str, str | Callable[[Any], str]] | None = None,
|
|
31
|
+
inputs_from_state: dict[str, str] | None = None,
|
|
32
|
+
outputs_to_state: dict[str, dict[str, str | Callable]] | None = None,
|
|
32
33
|
):
|
|
33
34
|
"""
|
|
34
35
|
Initialize the GitHub issue commenter tool.
|
|
@@ -82,7 +83,7 @@ class GitHubIssueCommenterTool(ComponentTool):
|
|
|
82
83
|
outputs_to_state=outputs_to_state,
|
|
83
84
|
)
|
|
84
85
|
|
|
85
|
-
def to_dict(self) ->
|
|
86
|
+
def to_dict(self) -> dict[str, Any]:
|
|
86
87
|
"""
|
|
87
88
|
Serializes the tool to a dictionary.
|
|
88
89
|
|
|
@@ -105,7 +106,7 @@ class GitHubIssueCommenterTool(ComponentTool):
|
|
|
105
106
|
return {"type": generate_qualified_class_name(type(self)), "data": serialized}
|
|
106
107
|
|
|
107
108
|
@classmethod
|
|
108
|
-
def from_dict(cls, data:
|
|
109
|
+
def from_dict(cls, data: dict[str, Any]) -> "GitHubIssueCommenterTool":
|
|
109
110
|
"""
|
|
110
111
|
Deserializes the tool from a dictionary.
|
|
111
112
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# SPDX-FileCopyrightText: 2023-present deepset GmbH <info@deepset.ai>
|
|
2
2
|
#
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
from
|
|
4
|
+
from collections.abc import Callable
|
|
5
|
+
from typing import Any
|
|
5
6
|
|
|
6
7
|
from haystack.core.serialization import generate_qualified_class_name
|
|
7
8
|
from haystack.tools import ComponentTool
|
|
@@ -20,15 +21,15 @@ class GitHubIssueViewerTool(ComponentTool):
|
|
|
20
21
|
def __init__(
|
|
21
22
|
self,
|
|
22
23
|
*,
|
|
23
|
-
name:
|
|
24
|
-
description:
|
|
25
|
-
parameters:
|
|
26
|
-
github_token:
|
|
24
|
+
name: str | None = "issue_viewer",
|
|
25
|
+
description: str | None = ISSUE_VIEWER_PROMPT,
|
|
26
|
+
parameters: dict[str, Any] | None = ISSUE_VIEWER_SCHEMA,
|
|
27
|
+
github_token: Secret | None = None,
|
|
27
28
|
raise_on_failure: bool = True,
|
|
28
29
|
retry_attempts: int = 2,
|
|
29
|
-
outputs_to_string:
|
|
30
|
-
inputs_from_state:
|
|
31
|
-
outputs_to_state:
|
|
30
|
+
outputs_to_string: dict[str, str | Callable[[Any], str]] | None = None,
|
|
31
|
+
inputs_from_state: dict[str, str] | None = None,
|
|
32
|
+
outputs_to_state: dict[str, dict[str, str | Callable]] | None = None,
|
|
32
33
|
):
|
|
33
34
|
"""
|
|
34
35
|
Initialize the GitHub issue viewer tool.
|
|
@@ -82,7 +83,7 @@ class GitHubIssueViewerTool(ComponentTool):
|
|
|
82
83
|
outputs_to_state=outputs_to_state,
|
|
83
84
|
)
|
|
84
85
|
|
|
85
|
-
def to_dict(self) ->
|
|
86
|
+
def to_dict(self) -> dict[str, Any]:
|
|
86
87
|
"""
|
|
87
88
|
Serializes the tool to a dictionary.
|
|
88
89
|
|
|
@@ -105,7 +106,7 @@ class GitHubIssueViewerTool(ComponentTool):
|
|
|
105
106
|
return {"type": generate_qualified_class_name(type(self)), "data": serialized}
|
|
106
107
|
|
|
107
108
|
@classmethod
|
|
108
|
-
def from_dict(cls, data:
|
|
109
|
+
def from_dict(cls, data: dict[str, Any]) -> "GitHubIssueViewerTool":
|
|
109
110
|
"""
|
|
110
111
|
Deserializes the tool from a dictionary.
|
|
111
112
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# SPDX-FileCopyrightText: 2023-present deepset GmbH <info@deepset.ai>
|
|
2
2
|
#
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
from
|
|
4
|
+
from collections.abc import Callable
|
|
5
|
+
from typing import Any
|
|
5
6
|
|
|
6
7
|
from haystack.core.serialization import generate_qualified_class_name
|
|
7
8
|
from haystack.tools import ComponentTool
|
|
@@ -20,14 +21,14 @@ class GitHubPRCreatorTool(ComponentTool):
|
|
|
20
21
|
def __init__(
|
|
21
22
|
self,
|
|
22
23
|
*,
|
|
23
|
-
name:
|
|
24
|
-
description:
|
|
25
|
-
parameters:
|
|
24
|
+
name: str | None = "pr_creator",
|
|
25
|
+
description: str | None = PR_CREATOR_PROMPT,
|
|
26
|
+
parameters: dict[str, Any] | None = PR_CREATOR_SCHEMA,
|
|
26
27
|
github_token: Secret = Secret.from_env_var("GITHUB_TOKEN"),
|
|
27
28
|
raise_on_failure: bool = True,
|
|
28
|
-
outputs_to_string:
|
|
29
|
-
inputs_from_state:
|
|
30
|
-
outputs_to_state:
|
|
29
|
+
outputs_to_string: dict[str, str | Callable[[Any], str]] | None = None,
|
|
30
|
+
inputs_from_state: dict[str, str] | None = None,
|
|
31
|
+
outputs_to_state: dict[str, dict[str, str | Callable]] | None = None,
|
|
31
32
|
):
|
|
32
33
|
"""
|
|
33
34
|
Initialize the GitHub PR creator tool.
|
|
@@ -78,7 +79,7 @@ class GitHubPRCreatorTool(ComponentTool):
|
|
|
78
79
|
outputs_to_state=outputs_to_state,
|
|
79
80
|
)
|
|
80
81
|
|
|
81
|
-
def to_dict(self) ->
|
|
82
|
+
def to_dict(self) -> dict[str, Any]:
|
|
82
83
|
"""
|
|
83
84
|
Serializes the tool to a dictionary.
|
|
84
85
|
|
|
@@ -99,7 +100,7 @@ class GitHubPRCreatorTool(ComponentTool):
|
|
|
99
100
|
return {"type": generate_qualified_class_name(type(self)), "data": serialized}
|
|
100
101
|
|
|
101
102
|
@classmethod
|
|
102
|
-
def from_dict(cls, data:
|
|
103
|
+
def from_dict(cls, data: dict[str, Any]) -> "GitHubPRCreatorTool":
|
|
103
104
|
"""
|
|
104
105
|
Deserializes the tool from a dictionary.
|
|
105
106
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# SPDX-FileCopyrightText: 2023-present deepset GmbH <info@deepset.ai>
|
|
2
2
|
#
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
from
|
|
4
|
+
from collections.abc import Callable
|
|
5
|
+
from typing import Any
|
|
5
6
|
|
|
6
7
|
from haystack.core.serialization import generate_qualified_class_name
|
|
7
8
|
from haystack.tools import ComponentTool
|
|
@@ -20,14 +21,14 @@ class GitHubRepoForkerTool(ComponentTool):
|
|
|
20
21
|
def __init__(
|
|
21
22
|
self,
|
|
22
23
|
*,
|
|
23
|
-
name:
|
|
24
|
-
description:
|
|
25
|
-
parameters:
|
|
24
|
+
name: str | None = "repo_forker",
|
|
25
|
+
description: str | None = REPO_FORKER_PROMPT,
|
|
26
|
+
parameters: dict[str, Any] | None = REPO_FORKER_SCHEMA,
|
|
26
27
|
github_token: Secret = Secret.from_env_var("GITHUB_TOKEN"),
|
|
27
28
|
raise_on_failure: bool = True,
|
|
28
|
-
outputs_to_string:
|
|
29
|
-
inputs_from_state:
|
|
30
|
-
outputs_to_state:
|
|
29
|
+
outputs_to_string: dict[str, str | Callable[[Any], str]] | None = None,
|
|
30
|
+
inputs_from_state: dict[str, str] | None = None,
|
|
31
|
+
outputs_to_state: dict[str, dict[str, str | Callable]] | None = None,
|
|
31
32
|
):
|
|
32
33
|
"""
|
|
33
34
|
Initialize the GitHub Repo Forker tool.
|
|
@@ -79,7 +80,7 @@ class GitHubRepoForkerTool(ComponentTool):
|
|
|
79
80
|
outputs_to_state=self.outputs_to_state,
|
|
80
81
|
)
|
|
81
82
|
|
|
82
|
-
def to_dict(self) ->
|
|
83
|
+
def to_dict(self) -> dict[str, Any]:
|
|
83
84
|
"""
|
|
84
85
|
Serializes the tool to a dictionary.
|
|
85
86
|
|
|
@@ -101,7 +102,7 @@ class GitHubRepoForkerTool(ComponentTool):
|
|
|
101
102
|
return {"type": generate_qualified_class_name(type(self)), "data": serialized}
|
|
102
103
|
|
|
103
104
|
@classmethod
|
|
104
|
-
def from_dict(cls, data:
|
|
105
|
+
def from_dict(cls, data: dict[str, Any]) -> "GitHubRepoForkerTool":
|
|
105
106
|
"""
|
|
106
107
|
Deserializes the tool from a dictionary.
|
|
107
108
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# SPDX-FileCopyrightText: 2023-present deepset GmbH <info@deepset.ai>
|
|
2
2
|
#
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
from
|
|
4
|
+
from collections.abc import Callable
|
|
5
|
+
from typing import Any
|
|
5
6
|
|
|
6
7
|
from haystack.core.serialization import generate_qualified_class_name
|
|
7
8
|
from haystack.tools import ComponentTool
|
|
@@ -20,17 +21,17 @@ class GitHubRepoViewerTool(ComponentTool):
|
|
|
20
21
|
def __init__(
|
|
21
22
|
self,
|
|
22
23
|
*,
|
|
23
|
-
name:
|
|
24
|
-
description:
|
|
25
|
-
parameters:
|
|
26
|
-
github_token:
|
|
27
|
-
repo:
|
|
24
|
+
name: str | None = "repo_viewer",
|
|
25
|
+
description: str | None = REPO_VIEWER_PROMPT,
|
|
26
|
+
parameters: dict[str, Any] | None = REPO_VIEWER_SCHEMA,
|
|
27
|
+
github_token: Secret | None = None,
|
|
28
|
+
repo: str | None = None,
|
|
28
29
|
branch: str = "main",
|
|
29
30
|
raise_on_failure: bool = True,
|
|
30
31
|
max_file_size: int = 1_000_000, # 1MB default limit
|
|
31
|
-
outputs_to_string:
|
|
32
|
-
inputs_from_state:
|
|
33
|
-
outputs_to_state:
|
|
32
|
+
outputs_to_string: dict[str, str | Callable[[Any], str]] | None = None,
|
|
33
|
+
inputs_from_state: dict[str, str] | None = None,
|
|
34
|
+
outputs_to_state: dict[str, dict[str, str | Callable]] | None = None,
|
|
34
35
|
):
|
|
35
36
|
"""
|
|
36
37
|
Initialize the GitHub repository viewer tool.
|
|
@@ -95,7 +96,7 @@ class GitHubRepoViewerTool(ComponentTool):
|
|
|
95
96
|
outputs_to_state=self.outputs_to_state,
|
|
96
97
|
)
|
|
97
98
|
|
|
98
|
-
def to_dict(self) ->
|
|
99
|
+
def to_dict(self) -> dict[str, Any]:
|
|
99
100
|
"""
|
|
100
101
|
Serializes the tool to a dictionary.
|
|
101
102
|
|
|
@@ -120,7 +121,7 @@ class GitHubRepoViewerTool(ComponentTool):
|
|
|
120
121
|
return {"type": generate_qualified_class_name(type(self)), "data": serialized}
|
|
121
122
|
|
|
122
123
|
@classmethod
|
|
123
|
-
def from_dict(cls, data:
|
|
124
|
+
def from_dict(cls, data: dict[str, Any]) -> "GitHubRepoViewerTool":
|
|
124
125
|
"""
|
|
125
126
|
Deserializes the tool from a dictionary.
|
|
126
127
|
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
#
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
|
|
5
|
-
from
|
|
5
|
+
from collections.abc import Callable
|
|
6
|
+
from typing import Any
|
|
6
7
|
|
|
7
8
|
from haystack import Document
|
|
8
9
|
from haystack.utils.callable_serialization import deserialize_callable, serialize_callable
|
|
9
10
|
|
|
10
11
|
|
|
11
|
-
def message_handler(documents:
|
|
12
|
+
def message_handler(documents: list[Document], max_length: int = 150_000) -> str:
|
|
12
13
|
"""
|
|
13
14
|
Handles the tool output before conversion to ChatMessage.
|
|
14
15
|
|
|
@@ -32,9 +33,9 @@ def message_handler(documents: List[Document], max_length: int = 150_000) -> str
|
|
|
32
33
|
|
|
33
34
|
|
|
34
35
|
def serialize_handlers(
|
|
35
|
-
serialized:
|
|
36
|
-
outputs_to_state:
|
|
37
|
-
outputs_to_string:
|
|
36
|
+
serialized: dict[str, Any],
|
|
37
|
+
outputs_to_state: dict[str, dict[str, str | Callable]] | None,
|
|
38
|
+
outputs_to_string: dict[str, str | Callable[[Any], str]] | None,
|
|
38
39
|
) -> None:
|
|
39
40
|
"""
|
|
40
41
|
Serializes callable handlers in outputs_to_state and outputs_to_string.
|
|
@@ -64,7 +65,7 @@ def serialize_handlers(
|
|
|
64
65
|
serialized["outputs_to_string"] = serialized_string
|
|
65
66
|
|
|
66
67
|
|
|
67
|
-
def deserialize_handlers(data:
|
|
68
|
+
def deserialize_handlers(data: dict[str, Any]) -> None:
|
|
68
69
|
"""
|
|
69
70
|
Deserializes callable handlers in outputs_to_state and outputs_to_string.
|
|
70
71
|
|
|
File without changes
|