ws-bom-robot-app 0.0.30__py3-none-any.whl → 0.0.32__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.
- ws_bom_robot_app/llm/agent_description.py +124 -124
- ws_bom_robot_app/llm/agent_handler.py +167 -167
- ws_bom_robot_app/llm/agent_lcel.py +64 -64
- ws_bom_robot_app/llm/defaut_prompt.py +9 -9
- ws_bom_robot_app/llm/main.py +102 -102
- ws_bom_robot_app/llm/models/api.py +1 -1
- ws_bom_robot_app/llm/settings.py +4 -4
- ws_bom_robot_app/llm/tools/tool_builder.py +19 -19
- ws_bom_robot_app/llm/tools/tool_manager.py +101 -101
- ws_bom_robot_app/llm/tools/utils.py +25 -25
- ws_bom_robot_app/llm/utils/agent_utils.py +16 -16
- ws_bom_robot_app/llm/utils/download.py +79 -79
- ws_bom_robot_app/llm/utils/print.py +29 -29
- ws_bom_robot_app/llm/vector_store/generator.py +137 -137
- ws_bom_robot_app/llm/vector_store/integration/jira.py +56 -0
- ws_bom_robot_app/llm/vector_store/loader/base.py +2 -2
- ws_bom_robot_app/llm/vector_store/loader/json_loader.py +25 -25
- {ws_bom_robot_app-0.0.30.dist-info → ws_bom_robot_app-0.0.32.dist-info}/METADATA +2 -5
- {ws_bom_robot_app-0.0.30.dist-info → ws_bom_robot_app-0.0.32.dist-info}/RECORD +21 -21
- {ws_bom_robot_app-0.0.30.dist-info → ws_bom_robot_app-0.0.32.dist-info}/WHEEL +0 -0
- {ws_bom_robot_app-0.0.30.dist-info → ws_bom_robot_app-0.0.32.dist-info}/top_level.txt +0 -0
|
@@ -35,12 +35,12 @@ class Loader():
|
|
|
35
35
|
'.eml': LoaderConfig(loader=UnstructuredEmailLoader,kwargs={"strategy":"auto", "process_attachments": False}),
|
|
36
36
|
'.msg': LoaderConfig(loader=UnstructuredEmailLoader,kwargs={"strategy":"auto", "process_attachments": False}),
|
|
37
37
|
'.epub': None,
|
|
38
|
-
'.md': LoaderConfig(loader=TextLoader),
|
|
38
|
+
'.md': LoaderConfig(loader=TextLoader, kwargs={"autodetect_encoding": True}),
|
|
39
39
|
'.org': None,
|
|
40
40
|
'.odt': None,
|
|
41
41
|
'.ppt': None,
|
|
42
42
|
'.pptx': LoaderConfig(loader=UnstructuredPowerPointLoader,kwargs={"strategy":"auto"}), #docling issue with WMF https://github.com/DS4SD/docling/issues/594
|
|
43
|
-
'.txt': LoaderConfig(loader=TextLoader),
|
|
43
|
+
'.txt': LoaderConfig(loader=TextLoader, kwargs={"autodetect_encoding": True}),
|
|
44
44
|
'.rst': None,
|
|
45
45
|
'.rtf': None,
|
|
46
46
|
'.tsv': None,
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import json
|
|
2
|
-
from typing import Optional
|
|
3
|
-
from langchain_core.documents import Document
|
|
4
|
-
from langchain_community.document_loaders.base import BaseLoader
|
|
5
|
-
|
|
6
|
-
class JsonLoader(BaseLoader):
|
|
7
|
-
def __init__(self, file_path: str, meta_fields:Optional[list[str]] = [],encoding: Optional[str] = "utf-8"):
|
|
8
|
-
self.file_path = file_path
|
|
9
|
-
self.meta_fields = meta_fields
|
|
10
|
-
self.encoding = encoding
|
|
11
|
-
|
|
12
|
-
def load(self) -> list[Document]:
|
|
13
|
-
with open(self.file_path, "r", encoding=self.encoding) as file:
|
|
14
|
-
data = json.load(file)
|
|
15
|
-
_list = data if isinstance(data, list) else [data]
|
|
16
|
-
return [
|
|
17
|
-
Document(
|
|
18
|
-
page_content=json.dumps(item),
|
|
19
|
-
metadata={
|
|
20
|
-
"source": self.file_path,
|
|
21
|
-
**{field: item.get(field) for field in self.meta_fields if item.get(field)}
|
|
22
|
-
}
|
|
23
|
-
)
|
|
24
|
-
for item in _list
|
|
25
|
-
]
|
|
1
|
+
import json
|
|
2
|
+
from typing import Optional
|
|
3
|
+
from langchain_core.documents import Document
|
|
4
|
+
from langchain_community.document_loaders.base import BaseLoader
|
|
5
|
+
|
|
6
|
+
class JsonLoader(BaseLoader):
|
|
7
|
+
def __init__(self, file_path: str, meta_fields:Optional[list[str]] = [],encoding: Optional[str] = "utf-8"):
|
|
8
|
+
self.file_path = file_path
|
|
9
|
+
self.meta_fields = meta_fields
|
|
10
|
+
self.encoding = encoding
|
|
11
|
+
|
|
12
|
+
def load(self) -> list[Document]:
|
|
13
|
+
with open(self.file_path, "r", encoding=self.encoding) as file:
|
|
14
|
+
data = json.load(file)
|
|
15
|
+
_list = data if isinstance(data, list) else [data]
|
|
16
|
+
return [
|
|
17
|
+
Document(
|
|
18
|
+
page_content=json.dumps(item),
|
|
19
|
+
metadata={
|
|
20
|
+
"source": self.file_path,
|
|
21
|
+
**{field: item.get(field) for field in self.meta_fields if item.get(field)}
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
for item in _list
|
|
25
|
+
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: ws_bom_robot_app
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.32
|
|
4
4
|
Summary: A FastAPI application serving ws bom/robot/llm platform ai.
|
|
5
5
|
Home-page: https://github.com/websolutespa/bom
|
|
6
6
|
Author: Websolute Spa
|
|
@@ -185,10 +185,7 @@ py -m pip install --upgrade setuptools build twine streamlit
|
|
|
185
185
|
### 🪛 build
|
|
186
186
|
|
|
187
187
|
```pwsh
|
|
188
|
-
|
|
189
|
-
cp .\requirements.txt .\ws_bom_robot_app\ && `
|
|
190
|
-
py -m build && `
|
|
191
|
-
twine check dist/*
|
|
188
|
+
py -m build && twine check dist/*
|
|
192
189
|
```
|
|
193
190
|
|
|
194
191
|
### 📦 test / 🧪 debugger
|
|
@@ -6,33 +6,33 @@ ws_bom_robot_app/main.py,sha256=vChP8vfmOCbs51TPUsaaxX8FvoFXuURMkOgmgx0Xi_4,6121
|
|
|
6
6
|
ws_bom_robot_app/task_manager.py,sha256=Zedzs2R3O-wNSQOqs4jorgFwPRi-ji_0TN4mGfk-VvE,15958
|
|
7
7
|
ws_bom_robot_app/util.py,sha256=b49ItlZgh2Wzw-6K8k5Wa44eVgjQ0JmWQwJnEaQBVGw,3502
|
|
8
8
|
ws_bom_robot_app/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
ws_bom_robot_app/llm/agent_description.py,sha256=
|
|
10
|
-
ws_bom_robot_app/llm/agent_handler.py,sha256=
|
|
11
|
-
ws_bom_robot_app/llm/agent_lcel.py,sha256=
|
|
9
|
+
ws_bom_robot_app/llm/agent_description.py,sha256=80g9LKRb0cHDSvwlr9MbtUCkaD9Yh6Zm-wR11ak21KM,4829
|
|
10
|
+
ws_bom_robot_app/llm/agent_handler.py,sha256=7b-H6PCkeFt4gDFv4oXO_Mg6A59MepWm0qwosvjgaw0,5975
|
|
11
|
+
ws_bom_robot_app/llm/agent_lcel.py,sha256=O4FgzvKXuIP9VJgSBQtP26Xifx1r-fydD0LtlqUYzug,2730
|
|
12
12
|
ws_bom_robot_app/llm/api.py,sha256=vBu_TFTlBjp7e3J-WmlZbXn_TbB550x-NpQN4YsO7To,3004
|
|
13
|
-
ws_bom_robot_app/llm/defaut_prompt.py,sha256=
|
|
14
|
-
ws_bom_robot_app/llm/main.py,sha256=
|
|
15
|
-
ws_bom_robot_app/llm/settings.py,sha256=
|
|
13
|
+
ws_bom_robot_app/llm/defaut_prompt.py,sha256=CDsM6I6vOTklOKD1FK0v93P4TLPjdq7iCQ7wszCs6yE,765
|
|
14
|
+
ws_bom_robot_app/llm/main.py,sha256=OgjWceJca1d3zd9TJHfdalcXAZMCyr8aO6VZGuqLWsY,4037
|
|
15
|
+
ws_bom_robot_app/llm/settings.py,sha256=DCLaGZwxlw0xE46LpfUgin_FHD8_XJIthCgI6r2UDlM,121
|
|
16
16
|
ws_bom_robot_app/llm/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
-
ws_bom_robot_app/llm/models/api.py,sha256=
|
|
17
|
+
ws_bom_robot_app/llm/models/api.py,sha256=ebyzuXcNNan8xzR94SfediHMJ5PymY4GoPYlfFQPdq4,6583
|
|
18
18
|
ws_bom_robot_app/llm/models/base.py,sha256=1TqxuTK3rjJEALn7lvgoen_1ba3R2brAgGx6EDTtDZo,152
|
|
19
19
|
ws_bom_robot_app/llm/models/kb.py,sha256=9zqwDlVULVrWE48wo5AivzWoOtnjA57k9rsw8KNnyDk,8935
|
|
20
20
|
ws_bom_robot_app/llm/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
|
-
ws_bom_robot_app/llm/tools/tool_builder.py,sha256=
|
|
22
|
-
ws_bom_robot_app/llm/tools/tool_manager.py,sha256
|
|
23
|
-
ws_bom_robot_app/llm/tools/utils.py,sha256=
|
|
21
|
+
ws_bom_robot_app/llm/tools/tool_builder.py,sha256=sdnyiqXU-6fxcIUu1PvTjJHaOpdIZz-b5hsjIlp-RaY,920
|
|
22
|
+
ws_bom_robot_app/llm/tools/tool_manager.py,sha256=-vBTL89S-KMxCitTUT15qN-jCikX2wbIjduHNJe0rQM,4596
|
|
23
|
+
ws_bom_robot_app/llm/tools/utils.py,sha256=gO0YLqF3hhfsmoY_B-K940jZO9aJHAuWvykONmkKHHQ,1332
|
|
24
24
|
ws_bom_robot_app/llm/tools/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
25
|
ws_bom_robot_app/llm/tools/models/main.py,sha256=LsOJ7vkcSzYLoE1oa3TG0Rs0pr9J5VS_e4li6aDx_fw,260
|
|
26
26
|
ws_bom_robot_app/llm/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
|
-
ws_bom_robot_app/llm/utils/agent_utils.py,sha256=
|
|
27
|
+
ws_bom_robot_app/llm/utils/agent_utils.py,sha256=t8uWmszBo7PFjjGqvhzNtBrHD44WQUYuKnbs2ee0zSo,830
|
|
28
28
|
ws_bom_robot_app/llm/utils/chunker.py,sha256=N7570xBYlObneg-fsvDhPAJ-Pv8C8OaYZOBK6q7LmMI,607
|
|
29
|
-
ws_bom_robot_app/llm/utils/download.py,sha256=
|
|
29
|
+
ws_bom_robot_app/llm/utils/download.py,sha256=GaRypPgkx16HfYRj-upX9kvmjfAdFFb5TP4P97scWeA,3273
|
|
30
30
|
ws_bom_robot_app/llm/utils/faiss_helper.py,sha256=VikpopCpEzV1lN5JISDabpHcIUkNDACNL52KliB4Hxs,5224
|
|
31
31
|
ws_bom_robot_app/llm/utils/kb.py,sha256=jja45WCbNI7SGEgqDS99nErlwB5eY8Ga7BMnhdMHZ90,1279
|
|
32
|
-
ws_bom_robot_app/llm/utils/print.py,sha256=
|
|
32
|
+
ws_bom_robot_app/llm/utils/print.py,sha256=QH36yQW-rqFx0b9O0bojJ6HrnOBuOgwdiQNUDIeLTGw,828
|
|
33
33
|
ws_bom_robot_app/llm/utils/webhooks.py,sha256=LAAZqyN6VhV13wu4X-X85TwdDgAV2rNvIwQFIIc0FJM,2114
|
|
34
34
|
ws_bom_robot_app/llm/vector_store/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
|
-
ws_bom_robot_app/llm/vector_store/generator.py,sha256=
|
|
35
|
+
ws_bom_robot_app/llm/vector_store/generator.py,sha256=Au6YrGdcn4ZkkamCFvSJhC44kUZ2qtT0mg2QbDPegEs,6329
|
|
36
36
|
ws_bom_robot_app/llm/vector_store/integration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
37
|
ws_bom_robot_app/llm/vector_store/integration/azure.py,sha256=R37TaPQP-HJJJiaKE9rmMc9kpeXeRvdebbTY_982om0,3392
|
|
38
38
|
ws_bom_robot_app/llm/vector_store/integration/base.py,sha256=IvIu8RkISuurrVKr2YPG96fsOI2kqhaEGyTGzjB-jCI,1550
|
|
@@ -41,7 +41,7 @@ ws_bom_robot_app/llm/vector_store/integration/dropbox.py,sha256=yhGvHTN0TEpUfhdv
|
|
|
41
41
|
ws_bom_robot_app/llm/vector_store/integration/gcs.py,sha256=fFDVDUR6eNB7FVTzDSEpMHFEWMgG16GLnpSf_mqGDdE,3184
|
|
42
42
|
ws_bom_robot_app/llm/vector_store/integration/github.py,sha256=18PO30AZcgTn6PHhid3MwImVAdmKBNkr0kmAPgOetGw,2663
|
|
43
43
|
ws_bom_robot_app/llm/vector_store/integration/googledrive.py,sha256=R6hr8iEgrR3QMOzIj5jY6w1x8pZ1LGdh4xM_q7g_ttc,3738
|
|
44
|
-
ws_bom_robot_app/llm/vector_store/integration/jira.py,sha256=
|
|
44
|
+
ws_bom_robot_app/llm/vector_store/integration/jira.py,sha256=uiNkCOSqxOgm3AoO6k5TN_bsYXiO60I_wF0i_z8Yp8Y,4874
|
|
45
45
|
ws_bom_robot_app/llm/vector_store/integration/manager.py,sha256=5Fl3XML6f1wmgraigpUwIFIXh7QFPX0RI0YFgFxBAvg,1700
|
|
46
46
|
ws_bom_robot_app/llm/vector_store/integration/s3.py,sha256=3kh-VmH84IW7DdSLvOk6td1VBJ9aohlVJsk5F3cYj0U,3320
|
|
47
47
|
ws_bom_robot_app/llm/vector_store/integration/sftp.py,sha256=WNzjjS1EUykgFB-8e7QkecSa1r1jTJqKyGzR25uJCtM,2848
|
|
@@ -49,10 +49,10 @@ ws_bom_robot_app/llm/vector_store/integration/sharepoint.py,sha256=zqqn-6qPrK50P
|
|
|
49
49
|
ws_bom_robot_app/llm/vector_store/integration/sitemap.py,sha256=4WYj3C6Y_4vkGs5iUNR59l1YOZEDsQT8MnZ5rIYDL_k,4733
|
|
50
50
|
ws_bom_robot_app/llm/vector_store/integration/slack.py,sha256=FMjESXm2QetFXI6i8epze7Kbbu22fV8CVaxb71AHnJ8,2572
|
|
51
51
|
ws_bom_robot_app/llm/vector_store/loader/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
52
|
-
ws_bom_robot_app/llm/vector_store/loader/base.py,sha256=
|
|
52
|
+
ws_bom_robot_app/llm/vector_store/loader/base.py,sha256=Bv3r5YYAjLHp4sU_sxTk6-OmUdEgoVDqKL-xgWD9k_s,5240
|
|
53
53
|
ws_bom_robot_app/llm/vector_store/loader/docling.py,sha256=12sMSH8DkEsC1Ctml2EIX2gs1BDnWWdynUEqGv-JAF4,2114
|
|
54
|
-
ws_bom_robot_app/llm/vector_store/loader/json_loader.py,sha256=
|
|
55
|
-
ws_bom_robot_app-0.0.
|
|
56
|
-
ws_bom_robot_app-0.0.
|
|
57
|
-
ws_bom_robot_app-0.0.
|
|
58
|
-
ws_bom_robot_app-0.0.
|
|
54
|
+
ws_bom_robot_app/llm/vector_store/loader/json_loader.py,sha256=LDppW0ZATo4_1hh-KlsAM3TLawBvwBxva_a7k5Oz1sc,858
|
|
55
|
+
ws_bom_robot_app-0.0.32.dist-info/METADATA,sha256=2k0lbPSs0i08ckNPoaohVty_UBeN7pIjpFfX1bLZ190,7756
|
|
56
|
+
ws_bom_robot_app-0.0.32.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
57
|
+
ws_bom_robot_app-0.0.32.dist-info/top_level.txt,sha256=Yl0akyHVbynsBX_N7wx3H3ZTkcMLjYyLJs5zBMDAKcM,17
|
|
58
|
+
ws_bom_robot_app-0.0.32.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|