alita-sdk 0.3.289__py3-none-any.whl → 0.3.291__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/configurations/github.py +65 -1
- alita_sdk/configurations/zephyr_essential.py +3 -1
- alita_sdk/runtime/langchain/document_loaders/AlitaMarkdownLoader.py +66 -0
- alita_sdk/runtime/langchain/document_loaders/AlitaPDFLoader.py +5 -2
- alita_sdk/runtime/langchain/document_loaders/constants.py +2 -1
- alita_sdk/tools/ado/repos/repos_wrapper.py +1 -0
- alita_sdk/tools/jira/api_wrapper.py +12 -10
- alita_sdk/tools/utils/content_parser.py +20 -3
- alita_sdk/tools/xray/api_wrapper.py +8 -14
- alita_sdk/tools/zephyr_enterprise/api_wrapper.py +8 -1
- alita_sdk/tools/zephyr_essential/api_wrapper.py +7 -1
- alita_sdk/tools/zephyr_scale/api_wrapper.py +7 -1
- {alita_sdk-0.3.289.dist-info → alita_sdk-0.3.291.dist-info}/METADATA +3 -1
- {alita_sdk-0.3.289.dist-info → alita_sdk-0.3.291.dist-info}/RECORD +17 -16
- {alita_sdk-0.3.289.dist-info → alita_sdk-0.3.291.dist-info}/WHEEL +0 -0
- {alita_sdk-0.3.289.dist-info → alita_sdk-0.3.291.dist-info}/licenses/LICENSE +0 -0
- {alita_sdk-0.3.289.dist-info → alita_sdk-0.3.291.dist-info}/top_level.txt +0 -0
@@ -84,4 +84,68 @@ class GithubConfiguration(BaseModel):
|
|
84
84
|
"Authentication is misconfigured: provide either Token (access_token), "
|
85
85
|
"Password (username + password), App private key (app_id + app_private_key), "
|
86
86
|
"or leave all blank for anonymous access."
|
87
|
-
)
|
87
|
+
)
|
88
|
+
|
89
|
+
@staticmethod
|
90
|
+
def check_connection(settings: dict) -> str | None:
|
91
|
+
"""
|
92
|
+
Check GitHub connection using provided settings.
|
93
|
+
Returns None if connection is successful, error message otherwise.
|
94
|
+
"""
|
95
|
+
import requests
|
96
|
+
from requests.auth import HTTPBasicAuth
|
97
|
+
import jwt
|
98
|
+
import time
|
99
|
+
|
100
|
+
base_url = settings.get('base_url', 'https://api.github.com')
|
101
|
+
access_token = settings.get('access_token')
|
102
|
+
username = settings.get('username')
|
103
|
+
password = settings.get('password')
|
104
|
+
app_id = settings.get('app_id')
|
105
|
+
app_private_key = settings.get('app_private_key')
|
106
|
+
|
107
|
+
# if all auth methods are None or empty, allow anonymous access
|
108
|
+
if not any([access_token, (username and password), (app_id and app_private_key)]):
|
109
|
+
return None
|
110
|
+
|
111
|
+
headers = {'Accept': 'application/vnd.github.v3+json'}
|
112
|
+
auth = None
|
113
|
+
|
114
|
+
try:
|
115
|
+
# Determine authentication method
|
116
|
+
if access_token:
|
117
|
+
headers['Authorization'] = f'token {access_token}'
|
118
|
+
elif username and password:
|
119
|
+
auth = HTTPBasicAuth(username, password)
|
120
|
+
elif app_id and app_private_key:
|
121
|
+
# Generate JWT for GitHub App authentication
|
122
|
+
payload = {
|
123
|
+
'iat': int(time.time()),
|
124
|
+
'exp': int(time.time()) + 600, # 10 minutes
|
125
|
+
'iss': app_id
|
126
|
+
}
|
127
|
+
jwt_token = jwt.encode(payload, app_private_key, algorithm='RS256')
|
128
|
+
headers['Authorization'] = f'Bearer {jwt_token}'
|
129
|
+
|
130
|
+
# Test connection with user endpoint
|
131
|
+
response = requests.get(f'{base_url}/user', headers=headers, auth=auth, timeout=10)
|
132
|
+
|
133
|
+
if response.status_code == 200:
|
134
|
+
return None
|
135
|
+
elif response.status_code == 401:
|
136
|
+
return "Authentication failed: Invalid credentials"
|
137
|
+
elif response.status_code == 403:
|
138
|
+
return "Access forbidden: Check your permissions"
|
139
|
+
elif response.status_code == 404:
|
140
|
+
return "GitHub API endpoint not found"
|
141
|
+
else:
|
142
|
+
return f"Connection failed with status {response.status_code}: {response.text}"
|
143
|
+
|
144
|
+
except requests.exceptions.ConnectionError:
|
145
|
+
return "Connection error: Unable to reach GitHub API"
|
146
|
+
except requests.exceptions.Timeout:
|
147
|
+
return "Connection timeout: GitHub API did not respond in time"
|
148
|
+
except jwt.InvalidKeyError:
|
149
|
+
return "Invalid private key format for GitHub App authentication"
|
150
|
+
except Exception as e:
|
151
|
+
return f"Unexpected error: {str(e)}"
|
@@ -1,3 +1,5 @@
|
|
1
|
+
from typing import Optional
|
2
|
+
|
1
3
|
from pydantic import BaseModel, ConfigDict, Field, SecretStr
|
2
4
|
|
3
5
|
|
@@ -14,5 +16,5 @@ class ZephyrEssentialConfiguration(BaseModel):
|
|
14
16
|
}
|
15
17
|
}
|
16
18
|
)
|
17
|
-
base_url: str = Field(description="Zephyr Essential Base URL")
|
19
|
+
base_url: Optional[str] = Field(description="Zephyr Essential API Base URL", default=None)
|
18
20
|
token: SecretStr = Field(description="Zephyr Essential API Token")
|
@@ -0,0 +1,66 @@
|
|
1
|
+
from pathlib import Path
|
2
|
+
from typing import Any, List, Union, Generator, Iterator
|
3
|
+
from langchain_core.documents import Document
|
4
|
+
|
5
|
+
from langchain_community.document_loaders.unstructured import (
|
6
|
+
UnstructuredFileLoader,
|
7
|
+
validate_unstructured_version,
|
8
|
+
)
|
9
|
+
|
10
|
+
class AlitaMarkdownLoader(UnstructuredFileLoader):
|
11
|
+
|
12
|
+
def __init__(
|
13
|
+
self,
|
14
|
+
file_path: Union[str, Path],
|
15
|
+
mode: str = "elements",
|
16
|
+
chunker_config: dict = None,
|
17
|
+
**unstructured_kwargs: Any,
|
18
|
+
):
|
19
|
+
"""
|
20
|
+
Args:
|
21
|
+
file_path: The path to the Markdown file to load.
|
22
|
+
mode: The mode to use when loading the file. Can be one of "single",
|
23
|
+
"multi", or "all". Default is "single".
|
24
|
+
chunker_config: Configuration dictionary for the markdown chunker.
|
25
|
+
**unstructured_kwargs: Any kwargs to pass to the unstructured.
|
26
|
+
"""
|
27
|
+
file_path = str(file_path)
|
28
|
+
validate_unstructured_version("0.4.16")
|
29
|
+
self.chunker_config = chunker_config or {
|
30
|
+
"strip_header": False,
|
31
|
+
"return_each_line": False,
|
32
|
+
"headers_to_split_on": [],
|
33
|
+
"max_tokens": 512,
|
34
|
+
"token_overlap": 10,
|
35
|
+
}
|
36
|
+
super().__init__(file_path=file_path, mode=mode, **unstructured_kwargs)
|
37
|
+
|
38
|
+
def _file_content_generator(self) -> Generator[Document, None, None]:
|
39
|
+
"""
|
40
|
+
Creates a generator that yields a single Document object
|
41
|
+
representing the entire content of the Markdown file.
|
42
|
+
"""
|
43
|
+
with open(self.file_path, "r", encoding="utf-8") as file:
|
44
|
+
content = file.read()
|
45
|
+
yield Document(page_content=content, metadata={"source": self.file_path})
|
46
|
+
|
47
|
+
def _get_elements(self) -> List[Document]:
|
48
|
+
"""
|
49
|
+
Processes the Markdown file using the markdown_chunker and returns the chunks.
|
50
|
+
"""
|
51
|
+
from alita_sdk.tools.chunkers.sematic.markdown_chunker import markdown_chunker
|
52
|
+
|
53
|
+
# Create a generator for the file content
|
54
|
+
file_content_generator = self._file_content_generator()
|
55
|
+
|
56
|
+
# Use the markdown_chunker to process the content
|
57
|
+
chunks = markdown_chunker(file_content_generator, config=self.chunker_config)
|
58
|
+
|
59
|
+
# Convert the generator to a list of Document objects
|
60
|
+
return list(chunks)
|
61
|
+
|
62
|
+
def lazy_load(self) -> Iterator[Document]:
|
63
|
+
"""Load file."""
|
64
|
+
elements = self._get_elements()
|
65
|
+
self._post_process_elements(elements)
|
66
|
+
yield from elements
|
@@ -67,10 +67,13 @@ class AlitaPDFLoader:
|
|
67
67
|
return self._load_docs()
|
68
68
|
|
69
69
|
def _load_docs(self):
|
70
|
-
|
70
|
+
docs = PyPDFLoader(file_path=self.file_path,
|
71
71
|
password=self.password,
|
72
72
|
headers=self.headers,
|
73
73
|
extract_images=self.extract_images,
|
74
74
|
extraction_mode=self.extraction_mode,
|
75
75
|
images_parser=ImageParser(llm=self.llm, prompt=self.prompt),
|
76
|
-
extraction_kwargs=self.extraction_kwargs).load()
|
76
|
+
extraction_kwargs=self.extraction_kwargs).load()
|
77
|
+
for doc in docs:
|
78
|
+
doc.metadata['chunk_id'] = doc.metadata['page']
|
79
|
+
return docs
|
@@ -25,6 +25,7 @@ from .AlitaJSONLoader import AlitaJSONLoader
|
|
25
25
|
from .AlitaPDFLoader import AlitaPDFLoader
|
26
26
|
from .AlitaPowerPointLoader import AlitaPowerPointLoader
|
27
27
|
from .AlitaTextLoader import AlitaTextLoader
|
28
|
+
from .AlitaMarkdownLoader import AlitaMarkdownLoader
|
28
29
|
|
29
30
|
loaders_map = {
|
30
31
|
'.png': {
|
@@ -96,7 +97,7 @@ loaders_map = {
|
|
96
97
|
'allowed_to_override': ['max_tokens']
|
97
98
|
},
|
98
99
|
'.md': {
|
99
|
-
'class':
|
100
|
+
'class': AlitaMarkdownLoader,
|
100
101
|
'is_multimodal_processing': False,
|
101
102
|
'kwargs': {},
|
102
103
|
'allowed_to_override': ['max_tokens']
|
@@ -159,6 +159,7 @@ class ArgsSchema(Enum):
|
|
159
159
|
Field(
|
160
160
|
description="""List of comments, where each comment is a dictionary specifying details about the comment,
|
161
161
|
e.g. [{'file_path': 'src/main.py', 'comment_text': 'Logic needs improvement', 'right_line': 20}]""",
|
162
|
+
default=None,
|
162
163
|
examples=[
|
163
164
|
{
|
164
165
|
"file_path": "src/main.py",
|
@@ -18,7 +18,7 @@ from ..llm.img_utils import ImageDescriptionCache
|
|
18
18
|
from ..non_code_indexer_toolkit import NonCodeIndexerToolkit
|
19
19
|
from ..utils import is_cookie_token, parse_cookie_string
|
20
20
|
from ..utils.available_tools_decorator import extend_with_parent_available_tools
|
21
|
-
from ..utils.content_parser import
|
21
|
+
from ..utils.content_parser import file_extension_by_chunker
|
22
22
|
from ...runtime.utils.utils import IndexerKeywords
|
23
23
|
|
24
24
|
logger = logging.getLogger(__name__)
|
@@ -1262,6 +1262,7 @@ class JiraApiWrapper(NonCodeIndexerToolkit):
|
|
1262
1262
|
self._include_attachments = kwargs.get('include_attachments', False)
|
1263
1263
|
self._included_fields = fields_to_extract.copy() if fields_to_extract else []
|
1264
1264
|
self._include_comments = kwargs.get('include_comments', True)
|
1265
|
+
self._chunking_tool = kwargs.get('chunking_tool', None)
|
1265
1266
|
|
1266
1267
|
try:
|
1267
1268
|
# Prepare fields to extract
|
@@ -1313,7 +1314,8 @@ class JiraApiWrapper(NonCodeIndexerToolkit):
|
|
1313
1314
|
doc.page_content,
|
1314
1315
|
attachment_resolver),
|
1315
1316
|
doc.page_content)
|
1316
|
-
doc.
|
1317
|
+
doc.metadata[IndexerKeywords.CONTENT_IN_BYTES.value] = processed_content.encode('utf-8')
|
1318
|
+
doc.metadata[IndexerKeywords.CONTENT_FILE_NAME.value] = f"base_doc{file_extension_by_chunker(self._chunking_tool)}"
|
1317
1319
|
yield doc
|
1318
1320
|
|
1319
1321
|
def _process_document(self, base_document: Document) -> Generator[Document, None, None]:
|
@@ -1337,13 +1339,11 @@ class JiraApiWrapper(NonCodeIndexerToolkit):
|
|
1337
1339
|
except Exception as e:
|
1338
1340
|
logger.error(f"Failed to download attachment {attachment['filename']} for issue {issue_key}: {str(e)}")
|
1339
1341
|
attachment_content = self._client.get(path=f"secure/attachment/{attachment['id']}/{attachment['filename']}", not_json_response=True)
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1344
|
-
|
1345
|
-
metadata={
|
1346
|
-
**doc.metadata,
|
1342
|
+
|
1343
|
+
yield Document(page_content='',
|
1344
|
+
metadata={
|
1345
|
+
IndexerKeywords.CONTENT_IN_BYTES.value: attachment_content,
|
1346
|
+
IndexerKeywords.CONTENT_FILE_NAME.value: attachment['filename'],
|
1347
1347
|
'id': attachment_id,
|
1348
1348
|
'issue_key': issue_key,
|
1349
1349
|
'source': f"{self.base_url}/browse/{issue_key}",
|
@@ -1358,8 +1358,10 @@ class JiraApiWrapper(NonCodeIndexerToolkit):
|
|
1358
1358
|
comments = self.get_processed_comments_list_with_image_description(issue_key)
|
1359
1359
|
if comments:
|
1360
1360
|
for comment in comments:
|
1361
|
-
yield Document(page_content=
|
1361
|
+
yield Document(page_content='',
|
1362
1362
|
metadata={
|
1363
|
+
IndexerKeywords.CONTENT_IN_BYTES.value: comment.get('processed_content').encode('utf-8'),
|
1364
|
+
IndexerKeywords.CONTENT_FILE_NAME.value: "comment.md",
|
1363
1365
|
'id': comment.get('id'),
|
1364
1366
|
'issue_key': issue_key,
|
1365
1367
|
'source': f"{self.base_url}/browse/{issue_key}",
|
@@ -234,12 +234,29 @@ def process_content_by_type(document: Document, content, extension_source: str,
|
|
234
234
|
if chunking_config and (users_config_for_extension := chunking_config.get(extension, {})):
|
235
235
|
for key in set(users_config_for_extension.keys()) & set(allowed_to_override):
|
236
236
|
loader_kwargs[key] = users_config_for_extension[key]
|
237
|
-
|
237
|
+
loader_kwargs['llm'] = llm
|
238
|
+
loader_kwargs['prompt'] = image_processing_prompt
|
238
239
|
loader = loader_cls(file_path=temp_file_path, **loader_kwargs)
|
239
|
-
|
240
|
+
counter = 1
|
241
|
+
try:
|
242
|
+
chunks = loader.load()
|
243
|
+
except Exception as e:
|
244
|
+
msg = f"Error during content for file {temp_file_path}:\n{e}"
|
245
|
+
logger.warning(msg)
|
246
|
+
yield Document(
|
247
|
+
page_content=msg,
|
248
|
+
metadata={**document.metadata, 'chunk_id':1}
|
249
|
+
)
|
250
|
+
return
|
251
|
+
for chunk in chunks:
|
252
|
+
if 'chunk_id' not in chunk.metadata:
|
253
|
+
chunk.metadata['chunk_id'] = counter
|
254
|
+
document_metadata = document.metadata.copy()
|
255
|
+
document_metadata['id'] = f"{document.metadata['id']}_{chunk.metadata['chunk_id']}"
|
256
|
+
counter+=1
|
240
257
|
yield Document(
|
241
258
|
page_content=sanitize_for_postgres(chunk.page_content),
|
242
|
-
metadata={**
|
259
|
+
metadata={**document_metadata, **chunk.metadata}
|
243
260
|
)
|
244
261
|
finally:
|
245
262
|
if temp_file_path and os.path.exists(temp_file_path):
|
@@ -16,7 +16,7 @@ from ..elitea_base import (
|
|
16
16
|
from ..non_code_indexer_toolkit import NonCodeIndexerToolkit
|
17
17
|
from ..utils.available_tools_decorator import extend_with_parent_available_tools
|
18
18
|
from ...runtime.utils.utils import IndexerKeywords
|
19
|
-
from ..utils.content_parser import
|
19
|
+
from ..utils.content_parser import file_extension_by_chunker
|
20
20
|
|
21
21
|
try:
|
22
22
|
from alita_sdk.runtime.langchain.interfaces.llm_processor import get_embeddings
|
@@ -109,7 +109,7 @@ XrayCreateTest = create_model(
|
|
109
109
|
|
110
110
|
XrayCreateTests = create_model(
|
111
111
|
"XrayCreateTests",
|
112
|
-
graphql_mutations=(
|
112
|
+
graphql_mutations=(List[str], Field(description="list of GraphQL mutations:\n" + _graphql_mutation_description))
|
113
113
|
)
|
114
114
|
|
115
115
|
def _parse_tests(test_results) -> List[Any]:
|
@@ -417,7 +417,9 @@ class XrayApiWrapper(NonCodeIndexerToolkit):
|
|
417
417
|
if attachments_data:
|
418
418
|
metadata["_attachments_data"] = attachments_data
|
419
419
|
|
420
|
-
|
420
|
+
metadata[IndexerKeywords.CONTENT_IN_BYTES.value] = page_content.encode('utf-8')
|
421
|
+
metadata[IndexerKeywords.CONTENT_FILE_NAME.value] = f"base_doc{file_extension_by_chunker(kwargs['chunking_tool'])}"
|
422
|
+
yield Document(page_content='', metadata=metadata)
|
421
423
|
|
422
424
|
except Exception as e:
|
423
425
|
logger.error(f"Error processing test data: {e}")
|
@@ -559,17 +561,9 @@ class XrayApiWrapper(NonCodeIndexerToolkit):
|
|
559
561
|
logger.error(f"Error processing attachment: {e}")
|
560
562
|
|
561
563
|
def _load_attachment(self, content, file_name, attachment_metadata) -> Generator[Document, None, None]:
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
if not content_docs or isinstance(content_docs, ToolException):
|
566
|
-
return
|
567
|
-
for doc in content_docs:
|
568
|
-
yield Document(page_content=doc.page_content,
|
569
|
-
metadata={
|
570
|
-
**doc.metadata,
|
571
|
-
**attachment_metadata
|
572
|
-
})
|
564
|
+
attachment_metadata[IndexerKeywords.CONTENT_IN_BYTES.value] = content
|
565
|
+
attachment_metadata[IndexerKeywords.CONTENT_FILE_NAME.value] = file_name
|
566
|
+
yield Document(page_content='', metadata=attachment_metadata)
|
573
567
|
|
574
568
|
def _index_tool_params(self, **kwargs) -> dict[str, tuple[type, Field]]:
|
575
569
|
return {
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import json
|
1
2
|
import logging
|
2
3
|
from typing import Optional, List, Generator, Literal
|
3
4
|
|
@@ -8,6 +9,8 @@ from langchain_core.documents import Document
|
|
8
9
|
from .zephyr_enterprise import ZephyrClient
|
9
10
|
from ..non_code_indexer_toolkit import NonCodeIndexerToolkit
|
10
11
|
from ..utils.available_tools_decorator import extend_with_parent_available_tools
|
12
|
+
from ..utils.content_parser import file_extension_by_chunker
|
13
|
+
from ...runtime.utils.utils import IndexerKeywords
|
11
14
|
|
12
15
|
logger = logging.getLogger(__name__)
|
13
16
|
|
@@ -157,6 +160,7 @@ class ZephyrApiWrapper(NonCodeIndexerToolkit):
|
|
157
160
|
}
|
158
161
|
|
159
162
|
def _base_loader(self, zql: str, **kwargs) -> Generator[Document, None, None]:
|
163
|
+
self._chunking_tool = kwargs.get('chunking_tool', None)
|
160
164
|
test_cases = self.get_testcases_by_zql(zql=zql, return_as_list=True)
|
161
165
|
for test_case in test_cases:
|
162
166
|
metadata = {
|
@@ -175,7 +179,10 @@ class ZephyrApiWrapper(NonCodeIndexerToolkit):
|
|
175
179
|
try:
|
176
180
|
id = document.metadata['id']
|
177
181
|
test_case_content = self.get_test_case_steps(id)
|
178
|
-
|
182
|
+
page_content = json.dumps(test_case_content)
|
183
|
+
document.metadata[IndexerKeywords.CONTENT_IN_BYTES.value] = page_content.encode('utf-8')
|
184
|
+
document.metadata[
|
185
|
+
IndexerKeywords.CONTENT_FILE_NAME.value] = f"base_doc{file_extension_by_chunker(self._chunking_tool)}"
|
179
186
|
except Exception as e:
|
180
187
|
logging.error(f"Failed to process document: {e}")
|
181
188
|
yield document
|
@@ -9,6 +9,8 @@ from langchain_core.tools import ToolException
|
|
9
9
|
|
10
10
|
from ..non_code_indexer_toolkit import NonCodeIndexerToolkit
|
11
11
|
from ..utils.available_tools_decorator import extend_with_parent_available_tools
|
12
|
+
from ..utils.content_parser import file_extension_by_chunker
|
13
|
+
from ...runtime.utils.utils import IndexerKeywords
|
12
14
|
|
13
15
|
|
14
16
|
class ZephyrEssentialApiWrapper(NonCodeIndexerToolkit):
|
@@ -270,6 +272,7 @@ class ZephyrEssentialApiWrapper(NonCodeIndexerToolkit):
|
|
270
272
|
}
|
271
273
|
|
272
274
|
def _base_loader(self, **kwargs) -> Generator[Document, None, None]:
|
275
|
+
self._chunking_tool = kwargs.get('chunking_tool', None)
|
273
276
|
try:
|
274
277
|
test_cases = self.list_test_cases()
|
275
278
|
except Exception as e:
|
@@ -291,7 +294,10 @@ class ZephyrEssentialApiWrapper(NonCodeIndexerToolkit):
|
|
291
294
|
additional_content = self._process_test_case(document.metadata['key'])
|
292
295
|
for steps_type, content in additional_content.items():
|
293
296
|
if content:
|
294
|
-
|
297
|
+
page_content = json.dumps(content)
|
298
|
+
document.metadata[IndexerKeywords.CONTENT_IN_BYTES.value] = page_content.encode('utf-8')
|
299
|
+
document.metadata[
|
300
|
+
IndexerKeywords.CONTENT_FILE_NAME.value] = f"base_doc{file_extension_by_chunker(self._chunking_tool)}"
|
295
301
|
document.metadata["steps_type"] = steps_type
|
296
302
|
except Exception as e:
|
297
303
|
logging.error(f"Failed to process document: {e}")
|
@@ -12,6 +12,8 @@ from langchain_core.documents import Document
|
|
12
12
|
|
13
13
|
from ..non_code_indexer_toolkit import NonCodeIndexerToolkit
|
14
14
|
from ..utils.available_tools_decorator import extend_with_parent_available_tools
|
15
|
+
from ..utils.content_parser import file_extension_by_chunker
|
16
|
+
from ...runtime.utils.utils import IndexerKeywords
|
15
17
|
|
16
18
|
try:
|
17
19
|
from alita_sdk.runtime.langchain.interfaces.llm_processor import get_embeddings
|
@@ -1218,6 +1220,7 @@ class ZephyrScaleApiWrapper(NonCodeIndexerToolkit):
|
|
1218
1220
|
}
|
1219
1221
|
|
1220
1222
|
def _base_loader(self, project_key: str, jql: str, **kwargs) -> Generator[Document, None, None]:
|
1223
|
+
self._chunking_tool = kwargs.get('chunking_tool', None)
|
1221
1224
|
for test_case_doc in self._get_test_cases_docs(project_key, jql):
|
1222
1225
|
yield test_case_doc
|
1223
1226
|
for folder_doc in self._get_folders_docs(project_key):
|
@@ -1284,7 +1287,10 @@ class ZephyrScaleApiWrapper(NonCodeIndexerToolkit):
|
|
1284
1287
|
additional_content = self._process_test_case(document.metadata['key'])
|
1285
1288
|
for steps_type, content in additional_content.items():
|
1286
1289
|
if content:
|
1287
|
-
|
1290
|
+
page_content = json.dumps(content)
|
1291
|
+
document.metadata[IndexerKeywords.CONTENT_IN_BYTES.value] = page_content.encode('utf-8')
|
1292
|
+
document.metadata[
|
1293
|
+
IndexerKeywords.CONTENT_FILE_NAME.value] = f"base_doc{file_extension_by_chunker(self._chunking_tool)}"
|
1288
1294
|
document.metadata["steps_type"] = steps_type
|
1289
1295
|
except Exception as e:
|
1290
1296
|
logging.error(f"Failed to process document: {e}")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: alita_sdk
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.291
|
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
|
@@ -58,6 +58,8 @@ Requires-Dist: scipy==1.13.1; extra == "runtime"
|
|
58
58
|
Requires-Dist: pytesseract==0.3.13; extra == "runtime"
|
59
59
|
Requires-Dist: reportlab==4.2.5; extra == "runtime"
|
60
60
|
Requires-Dist: svglib==1.5.1; extra == "runtime"
|
61
|
+
Requires-Dist: rlpycairo==0.3.0; extra == "runtime"
|
62
|
+
Requires-Dist: cairocffi==1.7.1; extra == "runtime"
|
61
63
|
Requires-Dist: docx2txt==0.8; extra == "runtime"
|
62
64
|
Requires-Dist: mammoth==1.9.0; extra == "runtime"
|
63
65
|
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc==1.25.0; extra == "runtime"
|
@@ -12,7 +12,7 @@ alita_sdk/configurations/confluence.py,sha256=mAW2fgSEOg-BAV768Sc6b_EuRA3H5UL9xf
|
|
12
12
|
alita_sdk/configurations/delta_lake.py,sha256=sCNDClaO6-b1Qv5WDxOMHjQUrHnr6S6EPQuS9o6q8Z8,1130
|
13
13
|
alita_sdk/configurations/embedding.py,sha256=8GSC8Feh8CH7bT_6cQhNqlS6raE91S2YRAtb2N9bUA8,552
|
14
14
|
alita_sdk/configurations/figma.py,sha256=vecZ20IyZgnFO2GdphkovYHMISRPcUYh7fxkUQsPwX8,1306
|
15
|
-
alita_sdk/configurations/github.py,sha256=
|
15
|
+
alita_sdk/configurations/github.py,sha256=6F7P9BPu9zE54q8m8IPjIct8cEX3WODYzZvn9WtxOXI,6283
|
16
16
|
alita_sdk/configurations/gitlab.py,sha256=0W35igIlue6QxOnPgw65ToLf4HSdPVuRyObdwQuEld8,1053
|
17
17
|
alita_sdk/configurations/google_places.py,sha256=jXhlPXywkDhHNrgB4KoVWogf3CVi1bY3wFLRzDqMr-E,589
|
18
18
|
alita_sdk/configurations/jira.py,sha256=ASh8I2iVXzOOtwjRX7kYNllXpCXyAIxFMP_YD4Q0PTI,1379
|
@@ -32,7 +32,7 @@ alita_sdk/configurations/testrail.py,sha256=k0fPmHBIrWAfEKhrDdB9Rdirw-UFHFoXkReP
|
|
32
32
|
alita_sdk/configurations/xray.py,sha256=_XCW5eGEAyhDuRvXCtTAZ24BGsIwzvIaeAZT10xoW6M,1147
|
33
33
|
alita_sdk/configurations/zephyr.py,sha256=ndqGYFy5OFxjoXB7DzC71rd5W6qGBGAlKMWoqT8TuNk,1653
|
34
34
|
alita_sdk/configurations/zephyr_enterprise.py,sha256=UaBk3qWcT2-bCzko5HEPvgxArw1ZpvOvwXwFYrIHZjM,710
|
35
|
-
alita_sdk/configurations/zephyr_essential.py,sha256=
|
35
|
+
alita_sdk/configurations/zephyr_essential.py,sha256=tUIrh-PRNvdrLBj6rJXqlF-h6oaMXUQI1wgit07kFBw,752
|
36
36
|
alita_sdk/runtime/__init__.py,sha256=4W0UF-nl3QF2bvET5lnah4o24CoTwSoKXhuN0YnwvEE,828
|
37
37
|
alita_sdk/runtime/clients/__init__.py,sha256=BdehU5GBztN1Qi1Wul0cqlU46FxUfMnI6Vq2Zd_oq1M,296
|
38
38
|
alita_sdk/runtime/clients/artifact.py,sha256=TPvROw1qu4IyUEGuf7x40IKRpb5eFZpYGN3-8LfQE0M,3461
|
@@ -61,14 +61,15 @@ alita_sdk/runtime/langchain/document_loaders/AlitaGitRepoLoader.py,sha256=5WXGcy
|
|
61
61
|
alita_sdk/runtime/langchain/document_loaders/AlitaImageLoader.py,sha256=QwgBJE-BvOasjgT1hYHZc0MP0F_elirUjSzKixoM6fY,6610
|
62
62
|
alita_sdk/runtime/langchain/document_loaders/AlitaJSONLoader.py,sha256=1mGZjltnqsSXkp1Jw-lQroyNFiCPpjb9ZbdoqOlqPeU,3354
|
63
63
|
alita_sdk/runtime/langchain/document_loaders/AlitaJiraLoader.py,sha256=M2q3YThkps0yAZOjfoLcyE7qycVTYKcXEGtpmp0N6C8,10950
|
64
|
-
alita_sdk/runtime/langchain/document_loaders/
|
64
|
+
alita_sdk/runtime/langchain/document_loaders/AlitaMarkdownLoader.py,sha256=RGHDfleYTn7AAc3H-yFZrjm06L0Ux14ZtEJpFlVBNCA,2474
|
65
|
+
alita_sdk/runtime/langchain/document_loaders/AlitaPDFLoader.py,sha256=toXdQbT9TuBCdB4t62t2cPalBY_2RZy2lqKSMU7YVhw,3386
|
65
66
|
alita_sdk/runtime/langchain/document_loaders/AlitaPowerPointLoader.py,sha256=SKAAPo3DfMtRPxICKrPzlXXkC5RfaeiRj7lejLXTi7o,2337
|
66
67
|
alita_sdk/runtime/langchain/document_loaders/AlitaQtestLoader.py,sha256=CUVVnisxm7b5yZWV6rn0Q3MEEaO1GWNcfnz5yWz8T0k,13283
|
67
68
|
alita_sdk/runtime/langchain/document_loaders/AlitaTableLoader.py,sha256=o0SRFPZ-VskltgThVRX80rT19qtB4gPzxED9SENTNWo,4145
|
68
69
|
alita_sdk/runtime/langchain/document_loaders/AlitaTextLoader.py,sha256=uNcV0En49_0u0RYB1sP1XfNspT2Xc5CacuJr9Jqv79Q,2972
|
69
70
|
alita_sdk/runtime/langchain/document_loaders/ImageParser.py,sha256=gao5yCCKdDai_Gx7YdEx5U6oMyJYzn69eYmEvWLh-fc,656
|
70
71
|
alita_sdk/runtime/langchain/document_loaders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
71
|
-
alita_sdk/runtime/langchain/document_loaders/constants.py,sha256=
|
72
|
+
alita_sdk/runtime/langchain/document_loaders/constants.py,sha256=xdZlVZhqWFrxYXTk5E7IOKLT7MowmMQSPoRjk0StQEw,5640
|
72
73
|
alita_sdk/runtime/langchain/document_loaders/utils.py,sha256=9xghESf3axBbwxATyVuS0Yu-TWe8zWZnXgCD1ZVyNW0,2414
|
73
74
|
alita_sdk/runtime/langchain/interfaces/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
74
75
|
alita_sdk/runtime/langchain/interfaces/kwextractor.py,sha256=kSJA9L8g8UArmHu7Bd9dIO0Rrq86JPUb8RYNlnN68FQ,3072
|
@@ -137,7 +138,7 @@ alita_sdk/tools/non_code_indexer_toolkit.py,sha256=v9uq1POE1fQKCd152mbqDtF-HSe0q
|
|
137
138
|
alita_sdk/tools/ado/__init__.py,sha256=u2tdDgufGuDb-7lIgKKQlqgStL9Wd1gzNmRNYems2c0,1267
|
138
139
|
alita_sdk/tools/ado/utils.py,sha256=PTCludvaQmPLakF2EbCGy66Mro4-rjDtavVP-xcB2Wc,1252
|
139
140
|
alita_sdk/tools/ado/repos/__init__.py,sha256=n-IhKED05RwQGWT4LfCaxJ85uDyG4S9zTjSjK6A8N4o,5192
|
140
|
-
alita_sdk/tools/ado/repos/repos_wrapper.py,sha256=
|
141
|
+
alita_sdk/tools/ado/repos/repos_wrapper.py,sha256=y1wJZNhuoWaSkFsGU5Pct3LClc1xfgmgBy2u_dgBF-4,49769
|
141
142
|
alita_sdk/tools/ado/test_plan/__init__.py,sha256=4fEw_3cm4shuZ868HhAU-uMH3xNXPyb3uRjyNWoBKls,5243
|
142
143
|
alita_sdk/tools/ado/test_plan/test_plan_wrapper.py,sha256=p3mbBiu0jthZG-Bj2-duO7DDZQ4LHYZ6Q1nOVd-KTrc,21944
|
143
144
|
alita_sdk/tools/ado/wiki/__init__.py,sha256=uBKo_Meu2ZxMxcxGsMmvCXyplRE2um1_PIRvdYd37rM,5171
|
@@ -258,7 +259,7 @@ alita_sdk/tools/google/bigquery/tool.py,sha256=Esf9Hsp8I0e7-5EdkFqQ-bid0cfrg-bfS
|
|
258
259
|
alita_sdk/tools/google_places/__init__.py,sha256=Tg_dfKTc0qxcG-1HVuQQB11PYph2RDWSUVhrlgxqk64,3491
|
259
260
|
alita_sdk/tools/google_places/api_wrapper.py,sha256=7nZly6nk4f4Tm7s2MVdnnwlb-1_WHRrDhyjDiqoyPjA,4674
|
260
261
|
alita_sdk/tools/jira/__init__.py,sha256=0NJikFWEqK8DSohXPUYD4iDLJFS8btxhqQ60acWwC3k,6063
|
261
|
-
alita_sdk/tools/jira/api_wrapper.py,sha256=
|
262
|
+
alita_sdk/tools/jira/api_wrapper.py,sha256=Cm9sULiw4Til6wmhsVM3-IIUAMkRVbWdRsScEUYHss4,79260
|
262
263
|
alita_sdk/tools/keycloak/__init__.py,sha256=0WB9yXMUUAHQRni1ghDEmd7GYa7aJPsTVlZgMCM9cQ0,3050
|
263
264
|
alita_sdk/tools/keycloak/api_wrapper.py,sha256=cOGr0f3S3-c6tRDBWI8wMnetjoNSxiV5rvC_0VHb8uw,3100
|
264
265
|
alita_sdk/tools/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -325,11 +326,11 @@ alita_sdk/tools/testrail/__init__.py,sha256=0kETjWKLU7R6mugBWsjwEUsh10pipbAeNSGJ
|
|
325
326
|
alita_sdk/tools/testrail/api_wrapper.py,sha256=xKQbjwL602J55KZiAdMcMtsuzK2jky0DUcrrdsazj0A,32981
|
326
327
|
alita_sdk/tools/utils/__init__.py,sha256=155xepXPr4OEzs2Mz5YnjXcBpxSv1X2eznRUVoPtyK0,3268
|
327
328
|
alita_sdk/tools/utils/available_tools_decorator.py,sha256=IbrdfeQkswxUFgvvN7-dyLMZMyXLiwvX7kgi3phciCk,273
|
328
|
-
alita_sdk/tools/utils/content_parser.py,sha256=
|
329
|
+
alita_sdk/tools/utils/content_parser.py,sha256=tppnQfgoER24acx3CJW1AUvkay_C7lvz_qVB-r-RQOo,13852
|
329
330
|
alita_sdk/tools/vector_adapters/VectorStoreAdapter.py,sha256=a6FAsiix_EvATIKUf5YT6vHh5LDyJ5uSP3LJqoxFo04,17367
|
330
331
|
alita_sdk/tools/vector_adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
331
332
|
alita_sdk/tools/xray/__init__.py,sha256=AsHDvRgyD-6vvGyAyQDPWHbOD2WoMJ5Llt029bLuu6U,4277
|
332
|
-
alita_sdk/tools/xray/api_wrapper.py,sha256=
|
333
|
+
alita_sdk/tools/xray/api_wrapper.py,sha256=DLQ5dT9XUiTJWc7OT6L9mU6CIZ8Sf6hGSBunYA6_k5k,30441
|
333
334
|
alita_sdk/tools/yagmail/__init__.py,sha256=c4Qn3em0tLxzRmFKpzbBgY9W2EnOoKf0azoDJHng5CY,2208
|
334
335
|
alita_sdk/tools/yagmail/yagmail_wrapper.py,sha256=SKoGVd1X4Ew3ad5tOdtPoY00M6jStNdT3q7GXEjQc5g,1952
|
335
336
|
alita_sdk/tools/zephyr/Zephyr.py,sha256=ODZbg9Aw0H0Rbv-HcDXLI4KHbPiLDHoteDofshw9A_k,1508
|
@@ -337,18 +338,18 @@ alita_sdk/tools/zephyr/__init__.py,sha256=8B2Ibz5QTmB5WkV0q8Sq4kuj92FFaFWZLrT877
|
|
337
338
|
alita_sdk/tools/zephyr/api_wrapper.py,sha256=lJCYPG03ej0qgdpLflnS7LFB4HSAfGzIvTjAJt07CQs,6244
|
338
339
|
alita_sdk/tools/zephyr/rest_client.py,sha256=7vSD3oYIX-3KbAFed-mphSQif_VRuXrq5O07ryNQ7Pk,6208
|
339
340
|
alita_sdk/tools/zephyr_enterprise/__init__.py,sha256=IoWQPH2lf2Yuj2ejZ74818JTXdrMoh_ZxAJORukYODU,4172
|
340
|
-
alita_sdk/tools/zephyr_enterprise/api_wrapper.py,sha256=
|
341
|
+
alita_sdk/tools/zephyr_enterprise/api_wrapper.py,sha256=OQJbdcpeVm_5WiTfg-w0wHXFnrKQgHhkufz_nr2wSn4,12270
|
341
342
|
alita_sdk/tools/zephyr_enterprise/zephyr_enterprise.py,sha256=hV9LIrYfJT6oYp-ZfQR0YHflqBFPsUw2Oc55HwK0H48,6809
|
342
343
|
alita_sdk/tools/zephyr_essential/__init__.py,sha256=2SymL6TIF1ad52w5DTtWaYvNygEvE1ssNNeKx3Y-_Zg,3980
|
343
|
-
alita_sdk/tools/zephyr_essential/api_wrapper.py,sha256=
|
344
|
+
alita_sdk/tools/zephyr_essential/api_wrapper.py,sha256=SKU6G_RwnMpg6iEB-MCFJiiplXF1q0Tum94OGSv2AGM,41151
|
344
345
|
alita_sdk/tools/zephyr_essential/client.py,sha256=bfNcUKNqj9MFWTludGbbqD4qZlxrBaC2JtWsCfZMqSY,9722
|
345
346
|
alita_sdk/tools/zephyr_scale/__init__.py,sha256=eetAVRclO1j_N0T3mRnWeLfi3BS98i5FwhNReXO0PlE,4289
|
346
|
-
alita_sdk/tools/zephyr_scale/api_wrapper.py,sha256=
|
347
|
+
alita_sdk/tools/zephyr_scale/api_wrapper.py,sha256=2M6yFoOmfH5BwxMwTLQO76yD0YdfvccOYHlARJFiqGo,78796
|
347
348
|
alita_sdk/tools/zephyr_squad/__init__.py,sha256=0AI_j27xVO5Gk5HQMFrqPTd4uvuVTpiZUicBrdfEpKg,2796
|
348
349
|
alita_sdk/tools/zephyr_squad/api_wrapper.py,sha256=kmw_xol8YIYFplBLWTqP_VKPRhL_1ItDD0_vXTe_UuI,14906
|
349
350
|
alita_sdk/tools/zephyr_squad/zephyr_squad_cloud_client.py,sha256=R371waHsms4sllHCbijKYs90C-9Yu0sSR3N4SUfQOgU,5066
|
350
|
-
alita_sdk-0.3.
|
351
|
-
alita_sdk-0.3.
|
352
|
-
alita_sdk-0.3.
|
353
|
-
alita_sdk-0.3.
|
354
|
-
alita_sdk-0.3.
|
351
|
+
alita_sdk-0.3.291.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
352
|
+
alita_sdk-0.3.291.dist-info/METADATA,sha256=CXmc_tAHmUndqcF-usDJoZaaAuwAFBZyjGyqtzgMXIM,18897
|
353
|
+
alita_sdk-0.3.291.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
354
|
+
alita_sdk-0.3.291.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
|
355
|
+
alita_sdk-0.3.291.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|