alita-sdk 0.3.349__py3-none-any.whl → 0.3.350__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.
Potentially problematic release.
This version of alita-sdk might be problematic. Click here for more details.
- alita_sdk/runtime/langchain/document_loaders/constants.py +115 -18
- {alita_sdk-0.3.349.dist-info → alita_sdk-0.3.350.dist-info}/METADATA +1 -1
- {alita_sdk-0.3.349.dist-info → alita_sdk-0.3.350.dist-info}/RECORD +6 -6
- {alita_sdk-0.3.349.dist-info → alita_sdk-0.3.350.dist-info}/WHEEL +0 -0
- {alita_sdk-0.3.349.dist-info → alita_sdk-0.3.350.dist-info}/licenses/LICENSE +0 -0
- {alita_sdk-0.3.349.dist-info → alita_sdk-0.3.350.dist-info}/top_level.txt +0 -0
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
from langchain_community.document_loaders import (
|
|
16
16
|
AirbyteJSONLoader, UnstructuredHTMLLoader,
|
|
17
|
-
|
|
17
|
+
UnstructuredXMLLoader)
|
|
18
18
|
|
|
19
19
|
from .AlitaCSVLoader import AlitaCSVLoader
|
|
20
20
|
from .AlitaDocxMammothLoader import AlitaDocxMammothLoader
|
|
@@ -28,50 +28,88 @@ from .AlitaMarkdownLoader import AlitaMarkdownLoader
|
|
|
28
28
|
from .AlitaPythonLoader import AlitaPythonLoader
|
|
29
29
|
from enum import Enum
|
|
30
30
|
|
|
31
|
+
|
|
31
32
|
class LoaderProperties(Enum):
|
|
32
33
|
LLM = 'llm'
|
|
33
34
|
PROMPT = 'prompt'
|
|
34
35
|
PROMPT_DEFAULT = 'prompt_default'
|
|
35
36
|
|
|
36
|
-
|
|
37
|
+
|
|
38
|
+
# Image file loaders mapping
|
|
39
|
+
image_loaders_map = {
|
|
37
40
|
'.png': {
|
|
38
41
|
'class': AlitaImageLoader,
|
|
42
|
+
'mime_type': 'image/png',
|
|
39
43
|
'is_multimodal_processing': True,
|
|
40
44
|
'kwargs': {},
|
|
41
|
-
'allowed_to_override': [
|
|
45
|
+
'allowed_to_override': [
|
|
46
|
+
'max_tokens', LoaderProperties.LLM.value,
|
|
47
|
+
LoaderProperties.PROMPT.value,
|
|
48
|
+
LoaderProperties.PROMPT_DEFAULT.value
|
|
49
|
+
],
|
|
42
50
|
},
|
|
43
51
|
'.jpg': {
|
|
44
52
|
'class': AlitaImageLoader,
|
|
53
|
+
'mime_type': 'image/jpeg',
|
|
45
54
|
'is_multimodal_processing': True,
|
|
46
55
|
'kwargs': {},
|
|
47
|
-
'allowed_to_override': [
|
|
56
|
+
'allowed_to_override': [
|
|
57
|
+
'max_tokens', LoaderProperties.LLM.value,
|
|
58
|
+
LoaderProperties.PROMPT.value,
|
|
59
|
+
LoaderProperties.PROMPT_DEFAULT.value
|
|
60
|
+
]
|
|
48
61
|
},
|
|
49
62
|
'.jpeg': {
|
|
50
63
|
'class': AlitaImageLoader,
|
|
64
|
+
'mime_type': 'image/jpeg',
|
|
51
65
|
'is_multimodal_processing': True,
|
|
52
66
|
'kwargs': {},
|
|
53
|
-
'allowed_to_override': [
|
|
67
|
+
'allowed_to_override': [
|
|
68
|
+
'max_tokens', LoaderProperties.LLM.value,
|
|
69
|
+
LoaderProperties.PROMPT.value,
|
|
70
|
+
LoaderProperties.PROMPT_DEFAULT.value
|
|
71
|
+
]
|
|
54
72
|
},
|
|
55
73
|
'.gif': {
|
|
56
74
|
'class': AlitaImageLoader,
|
|
75
|
+
'mime_type': 'image/gif',
|
|
57
76
|
'is_multimodal_processing': True,
|
|
58
77
|
'kwargs': {},
|
|
59
|
-
'allowed_to_override': [
|
|
78
|
+
'allowed_to_override': [
|
|
79
|
+
'max_tokens', LoaderProperties.LLM.value,
|
|
80
|
+
LoaderProperties.PROMPT.value,
|
|
81
|
+
LoaderProperties.PROMPT_DEFAULT.value
|
|
82
|
+
]
|
|
60
83
|
},
|
|
61
84
|
'.bmp': {
|
|
62
85
|
'class': AlitaImageLoader,
|
|
86
|
+
'mime_type': 'image/bmp',
|
|
63
87
|
'is_multimodal_processing': True,
|
|
64
88
|
'kwargs': {},
|
|
65
|
-
'allowed_to_override': [
|
|
89
|
+
'allowed_to_override': [
|
|
90
|
+
'max_tokens', LoaderProperties.LLM.value,
|
|
91
|
+
LoaderProperties.PROMPT.value,
|
|
92
|
+
LoaderProperties.PROMPT_DEFAULT.value
|
|
93
|
+
]
|
|
66
94
|
},
|
|
67
95
|
'.svg': {
|
|
68
96
|
'class': AlitaImageLoader,
|
|
97
|
+
'mime_type': 'image/svg+xml',
|
|
69
98
|
'is_multimodal_processing': True,
|
|
70
99
|
'kwargs': {},
|
|
71
|
-
'allowed_to_override': [
|
|
72
|
-
|
|
100
|
+
'allowed_to_override': [
|
|
101
|
+
'max_tokens', LoaderProperties.LLM.value,
|
|
102
|
+
LoaderProperties.PROMPT.value,
|
|
103
|
+
LoaderProperties.PROMPT_DEFAULT.value
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
# Document file loaders mapping
|
|
109
|
+
document_loaders_map = {
|
|
73
110
|
'.txt': {
|
|
74
111
|
'class': AlitaTextLoader,
|
|
112
|
+
'mime_type': 'text/plain',
|
|
75
113
|
'is_multimodal_processing': False,
|
|
76
114
|
'kwargs': {
|
|
77
115
|
'autodetect_encoding': True
|
|
@@ -80,6 +118,7 @@ loaders_map = {
|
|
|
80
118
|
},
|
|
81
119
|
'.yml': {
|
|
82
120
|
'class': AlitaTextLoader,
|
|
121
|
+
'mime_type': 'application/x-yaml',
|
|
83
122
|
'is_multimodal_processing': False,
|
|
84
123
|
'kwargs': {
|
|
85
124
|
'autodetect_encoding': True
|
|
@@ -88,6 +127,7 @@ loaders_map = {
|
|
|
88
127
|
},
|
|
89
128
|
'.yaml': {
|
|
90
129
|
'class': AlitaTextLoader,
|
|
130
|
+
'mime_type': 'application/x-yaml',
|
|
91
131
|
'is_multimodal_processing': False,
|
|
92
132
|
'kwargs': {
|
|
93
133
|
'autodetect_encoding': True
|
|
@@ -96,6 +136,7 @@ loaders_map = {
|
|
|
96
136
|
},
|
|
97
137
|
'.groovy': {
|
|
98
138
|
'class': AlitaTextLoader,
|
|
139
|
+
'mime_type': 'text/x-groovy',
|
|
99
140
|
'is_multimodal_processing': False,
|
|
100
141
|
'kwargs': {
|
|
101
142
|
'autodetect_encoding': True
|
|
@@ -104,12 +145,14 @@ loaders_map = {
|
|
|
104
145
|
},
|
|
105
146
|
'.md': {
|
|
106
147
|
'class': AlitaMarkdownLoader,
|
|
148
|
+
'mime_type': 'text/markdown',
|
|
107
149
|
'is_multimodal_processing': False,
|
|
108
150
|
'kwargs': {},
|
|
109
151
|
'allowed_to_override': ['max_tokens']
|
|
110
152
|
},
|
|
111
153
|
'.csv': {
|
|
112
154
|
'class': AlitaCSVLoader,
|
|
155
|
+
'mime_type': 'text/csv',
|
|
113
156
|
'is_multimodal_processing': False,
|
|
114
157
|
'kwargs': {
|
|
115
158
|
'encoding': 'utf-8',
|
|
@@ -120,88 +163,142 @@ loaders_map = {
|
|
|
120
163
|
},
|
|
121
164
|
'.xlsx': {
|
|
122
165
|
'class': AlitaExcelLoader,
|
|
166
|
+
'mime_type': ('application/vnd.openxmlformats-officedocument.'
|
|
167
|
+
'spreadsheetml.sheet'),
|
|
123
168
|
'is_multimodal_processing': False,
|
|
124
169
|
'kwargs': {
|
|
125
170
|
'excel_by_sheets': True,
|
|
126
171
|
'raw_content': True,
|
|
127
172
|
'cleanse': False
|
|
128
173
|
},
|
|
129
|
-
'allowed_to_override': [
|
|
174
|
+
'allowed_to_override': [
|
|
175
|
+
'max_tokens', LoaderProperties.LLM.value,
|
|
176
|
+
LoaderProperties.PROMPT.value,
|
|
177
|
+
LoaderProperties.PROMPT_DEFAULT.value
|
|
178
|
+
]
|
|
130
179
|
},
|
|
131
180
|
'.xls': {
|
|
132
181
|
'class': AlitaExcelLoader,
|
|
182
|
+
'mime_type': 'application/vnd.ms-excel',
|
|
133
183
|
'is_multimodal_processing': False,
|
|
134
184
|
'kwargs': {
|
|
135
185
|
'excel_by_sheets': True,
|
|
136
186
|
'raw_content': True,
|
|
137
187
|
'cleanse': False
|
|
138
188
|
},
|
|
139
|
-
'allowed_to_override': [
|
|
189
|
+
'allowed_to_override': [
|
|
190
|
+
'max_tokens', LoaderProperties.LLM.value,
|
|
191
|
+
LoaderProperties.PROMPT.value,
|
|
192
|
+
LoaderProperties.PROMPT_DEFAULT.value
|
|
193
|
+
]
|
|
140
194
|
},
|
|
141
195
|
'.pdf': {
|
|
142
196
|
'class': AlitaPDFLoader,
|
|
197
|
+
'mime_type': 'application/pdf',
|
|
143
198
|
'is_multimodal_processing': False,
|
|
144
199
|
'kwargs': {},
|
|
145
|
-
'allowed_to_override': [
|
|
200
|
+
'allowed_to_override': [
|
|
201
|
+
'max_tokens', LoaderProperties.LLM.value,
|
|
202
|
+
LoaderProperties.PROMPT.value,
|
|
203
|
+
LoaderProperties.PROMPT_DEFAULT.value
|
|
204
|
+
]
|
|
146
205
|
},
|
|
147
206
|
'.docx': {
|
|
148
207
|
'class': AlitaDocxMammothLoader,
|
|
208
|
+
'mime_type': ('application/vnd.openxmlformats-officedocument.'
|
|
209
|
+
'wordprocessingml.document'),
|
|
149
210
|
'is_multimodal_processing': True,
|
|
150
211
|
'kwargs': {
|
|
151
212
|
'extract_images': True
|
|
152
213
|
},
|
|
153
|
-
'allowed_to_override': [
|
|
214
|
+
'allowed_to_override': [
|
|
215
|
+
'max_tokens', 'mode', LoaderProperties.LLM.value,
|
|
216
|
+
LoaderProperties.PROMPT.value,
|
|
217
|
+
LoaderProperties.PROMPT_DEFAULT.value
|
|
218
|
+
]
|
|
154
219
|
},
|
|
155
220
|
'.json': {
|
|
156
221
|
'class': AlitaJSONLoader,
|
|
222
|
+
'mime_type': 'application/json',
|
|
157
223
|
'is_multimodal_processing': False,
|
|
158
224
|
'kwargs': {},
|
|
159
225
|
'allowed_to_override': ['max_tokens']
|
|
160
226
|
},
|
|
161
227
|
'.jsonl': {
|
|
162
228
|
'class': AirbyteJSONLoader,
|
|
229
|
+
'mime_type': 'application/jsonl',
|
|
163
230
|
'is_multimodal_processing': False,
|
|
164
231
|
'kwargs': {},
|
|
165
232
|
'allowed_to_override': ['max_tokens']
|
|
166
233
|
},
|
|
167
234
|
'.htm': {
|
|
168
235
|
'class': UnstructuredHTMLLoader,
|
|
236
|
+
'mime_type': 'text/html',
|
|
169
237
|
'is_multimodal_processing': False,
|
|
170
238
|
'kwargs': {},
|
|
171
|
-
'allowed_to_override': [
|
|
239
|
+
'allowed_to_override': [
|
|
240
|
+
'max_tokens', LoaderProperties.LLM.value,
|
|
241
|
+
LoaderProperties.PROMPT.value,
|
|
242
|
+
LoaderProperties.PROMPT_DEFAULT.value
|
|
243
|
+
]
|
|
172
244
|
},
|
|
173
245
|
'.html': {
|
|
174
246
|
'class': UnstructuredHTMLLoader,
|
|
247
|
+
'mime_type': 'text/html',
|
|
175
248
|
'is_multimodal_processing': False,
|
|
176
249
|
'kwargs': {},
|
|
177
|
-
'allowed_to_override': [
|
|
250
|
+
'allowed_to_override': [
|
|
251
|
+
'max_tokens', LoaderProperties.LLM.value,
|
|
252
|
+
LoaderProperties.PROMPT.value,
|
|
253
|
+
LoaderProperties.PROMPT_DEFAULT.value
|
|
254
|
+
]
|
|
178
255
|
},
|
|
179
256
|
'.xml': {
|
|
180
257
|
'class': UnstructuredXMLLoader,
|
|
258
|
+
'mime_type': 'application/xml',
|
|
181
259
|
'is_multimodal_processing': False,
|
|
182
260
|
'kwargs': {},
|
|
183
|
-
'allowed_to_override': [
|
|
261
|
+
'allowed_to_override': [
|
|
262
|
+
'max_tokens', LoaderProperties.LLM.value,
|
|
263
|
+
LoaderProperties.PROMPT.value,
|
|
264
|
+
LoaderProperties.PROMPT_DEFAULT.value
|
|
265
|
+
]
|
|
184
266
|
},
|
|
185
267
|
'.ppt': {
|
|
186
268
|
'class': AlitaPowerPointLoader,
|
|
269
|
+
'mime_type': 'application/vnd.ms-powerpoint',
|
|
187
270
|
'is_multimodal_processing': False,
|
|
188
271
|
'kwargs': {
|
|
189
272
|
'mode': 'paged'
|
|
190
273
|
},
|
|
191
|
-
'allowed_to_override': [
|
|
274
|
+
'allowed_to_override': [
|
|
275
|
+
'max_tokens', 'mode', LoaderProperties.LLM.value,
|
|
276
|
+
LoaderProperties.PROMPT.value,
|
|
277
|
+
LoaderProperties.PROMPT_DEFAULT.value
|
|
278
|
+
]
|
|
192
279
|
},
|
|
193
280
|
'.pptx': {
|
|
194
281
|
'class': AlitaPowerPointLoader,
|
|
282
|
+
'mime_type': ('application/vnd.openxmlformats-officedocument.'
|
|
283
|
+
'presentationml.presentation'),
|
|
195
284
|
'is_multimodal_processing': False,
|
|
196
285
|
'kwargs': {
|
|
197
286
|
'mode': 'paged'
|
|
198
287
|
},
|
|
199
|
-
'allowed_to_override': [
|
|
288
|
+
'allowed_to_override': [
|
|
289
|
+
'max_tokens', 'mode', LoaderProperties.LLM.value,
|
|
290
|
+
LoaderProperties.PROMPT.value,
|
|
291
|
+
LoaderProperties.PROMPT_DEFAULT.value
|
|
292
|
+
]
|
|
200
293
|
},
|
|
201
294
|
'.py': {
|
|
202
295
|
'class': AlitaPythonLoader,
|
|
296
|
+
'mime_type': 'text/x-python',
|
|
203
297
|
'is_multimodal_processing': False,
|
|
204
298
|
'kwargs': {},
|
|
205
299
|
'allowed_to_override': ['max_tokens']
|
|
206
300
|
}
|
|
207
301
|
}
|
|
302
|
+
|
|
303
|
+
# Combined mapping for backward compatibility
|
|
304
|
+
loaders_map = {**image_loaders_map, **document_loaders_map}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: alita_sdk
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.350
|
|
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
|
|
@@ -70,7 +70,7 @@ alita_sdk/runtime/langchain/document_loaders/AlitaTableLoader.py,sha256=nI8lyndV
|
|
|
70
70
|
alita_sdk/runtime/langchain/document_loaders/AlitaTextLoader.py,sha256=EiCIAF_OxSrbuwgOFk2IpxRMvFbctITt2jAI0g_atpk,3586
|
|
71
71
|
alita_sdk/runtime/langchain/document_loaders/ImageParser.py,sha256=RQ4zGdSw42ec8c6Eb48uFadayWuiT4FbwhGVwhSw60s,1065
|
|
72
72
|
alita_sdk/runtime/langchain/document_loaders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
73
|
-
alita_sdk/runtime/langchain/document_loaders/constants.py,sha256=
|
|
73
|
+
alita_sdk/runtime/langchain/document_loaders/constants.py,sha256=jOiyDmm1S5iFXxQwdB3PyhAKNYsfwhxxzNqFg4bt4tc,9584
|
|
74
74
|
alita_sdk/runtime/langchain/document_loaders/utils.py,sha256=9xghESf3axBbwxATyVuS0Yu-TWe8zWZnXgCD1ZVyNW0,2414
|
|
75
75
|
alita_sdk/runtime/langchain/interfaces/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
76
76
|
alita_sdk/runtime/langchain/interfaces/kwextractor.py,sha256=kSJA9L8g8UArmHu7Bd9dIO0Rrq86JPUb8RYNlnN68FQ,3072
|
|
@@ -350,8 +350,8 @@ alita_sdk/tools/zephyr_scale/api_wrapper.py,sha256=kT0TbmMvuKhDUZc0i7KO18O38JM9S
|
|
|
350
350
|
alita_sdk/tools/zephyr_squad/__init__.py,sha256=0ne8XLJEQSLOWfzd2HdnqOYmQlUliKHbBED5kW_Vias,2895
|
|
351
351
|
alita_sdk/tools/zephyr_squad/api_wrapper.py,sha256=kmw_xol8YIYFplBLWTqP_VKPRhL_1ItDD0_vXTe_UuI,14906
|
|
352
352
|
alita_sdk/tools/zephyr_squad/zephyr_squad_cloud_client.py,sha256=R371waHsms4sllHCbijKYs90C-9Yu0sSR3N4SUfQOgU,5066
|
|
353
|
-
alita_sdk-0.3.
|
|
354
|
-
alita_sdk-0.3.
|
|
355
|
-
alita_sdk-0.3.
|
|
356
|
-
alita_sdk-0.3.
|
|
357
|
-
alita_sdk-0.3.
|
|
353
|
+
alita_sdk-0.3.350.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
354
|
+
alita_sdk-0.3.350.dist-info/METADATA,sha256=egxdPjxktXS8RfeJkh2URSOGUGNcuXD2oq7RBg-sHq4,19071
|
|
355
|
+
alita_sdk-0.3.350.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
356
|
+
alita_sdk-0.3.350.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
|
|
357
|
+
alita_sdk-0.3.350.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|