ws-bom-robot-app 0.0.15__tar.gz → 0.0.17__tar.gz
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-0.0.15 → ws_bom_robot_app-0.0.17}/PKG-INFO +28 -5
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/README.md +25 -1
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/setup.py +1 -1
- ws_bom_robot_app-0.0.17/ws_bom_robot_app/llm/vector_store/integration/base.py +44 -0
- ws_bom_robot_app-0.0.17/ws_bom_robot_app/llm/vector_store/integration/confluence.py +47 -0
- ws_bom_robot_app-0.0.17/ws_bom_robot_app/llm/vector_store/integration/github.py +48 -0
- ws_bom_robot_app-0.0.17/ws_bom_robot_app/llm/vector_store/integration/jira.py +49 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/vector_store/integration/manager.py +6 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/requirements.txt +2 -3
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app.egg-info/PKG-INFO +28 -5
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app.egg-info/SOURCES.txt +3 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app.egg-info/requires.txt +2 -3
- ws_bom_robot_app-0.0.15/ws_bom_robot_app/llm/vector_store/integration/base.py +0 -19
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/pyproject.toml +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/setup.cfg +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/__init__.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/auth.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/config.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/cron_manager.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/__init__.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/agent_description.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/agent_handler.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/agent_lcel.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/api.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/defaut_prompt.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/main.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/models/__init__.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/models/api.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/models/base.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/models/kb.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/settings.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/tools/__init__.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/tools/models/__init__.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/tools/models/main.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/tools/tool_builder.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/tools/tool_manager.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/tools/utils.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/utils/__init__.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/utils/agent_utils.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/utils/download.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/utils/faiss_helper.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/utils/kb.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/utils/print.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/utils/webhooks.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/vector_store/__init__.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/vector_store/generator.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/vector_store/integration/__init__.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/vector_store/integration/sitemap.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/vector_store/loader/__init__.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/vector_store/loader/base.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/vector_store/loader/json_loader.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/main.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/task_manager.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/util.py +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app.egg-info/dependency_links.txt +0 -0
- {ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ws_bom_robot_app
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.17
|
|
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
|
|
@@ -13,8 +13,8 @@ Description-Content-Type: text/markdown
|
|
|
13
13
|
Requires-Dist: standardwebhooks==1.0.0
|
|
14
14
|
Requires-Dist: apscheduler==3.11.0
|
|
15
15
|
Requires-Dist: aiofiles==24.1.0
|
|
16
|
-
Requires-Dist: pydantic==2.
|
|
17
|
-
Requires-Dist: pydantic-settings==2.6.
|
|
16
|
+
Requires-Dist: pydantic==2.10.3
|
|
17
|
+
Requires-Dist: pydantic-settings==2.6.1
|
|
18
18
|
Requires-Dist: fastapi[standard]==0.115.5
|
|
19
19
|
Requires-Dist: langchain==0.3.9
|
|
20
20
|
Requires-Dist: langchain-openai==0.2.10
|
|
@@ -23,7 +23,6 @@ Requires-Dist: langchain-core==0.3.21
|
|
|
23
23
|
Requires-Dist: faiss-cpu==1.9.0
|
|
24
24
|
Requires-Dist: python-magic==0.4.27
|
|
25
25
|
Requires-Dist: opencv-python-headless==4.10.0.84
|
|
26
|
-
Requires-Dist: jmespath==1.0.1
|
|
27
26
|
Requires-Dist: unstructured[all-docs]==0.15.14
|
|
28
27
|
Requires-Dist: langchain_unstructured==0.1.5
|
|
29
28
|
Requires-Dist: html5lib==1.1
|
|
@@ -174,7 +173,31 @@ py -m pip install --upgrade -e .
|
|
|
174
173
|
py -m pip show ws-bom-robot-app
|
|
175
174
|
```
|
|
176
175
|
|
|
177
|
-
|
|
176
|
+
code quality tools
|
|
177
|
+
|
|
178
|
+
```pwsh
|
|
179
|
+
# .\src\robot
|
|
180
|
+
!py -m pip install -U scanreq prospector[with_everything]
|
|
181
|
+
## unused requirements
|
|
182
|
+
scanreq -r requirements.txt -p ./ws_bom_robot_app
|
|
183
|
+
## style/linting
|
|
184
|
+
prospector ./ws_bom_robot_app -t pylint -t pydocstyle
|
|
185
|
+
## code quality/complexity
|
|
186
|
+
prospector ./ws_bom_robot_app -t vulture -t mccabe -t mypy
|
|
187
|
+
## security
|
|
188
|
+
prospector ./ws_bom_robot_app -t dodgy -t bandit
|
|
189
|
+
## package
|
|
190
|
+
prospector ./ws_bom_robot_app -t pyroma
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
lauch pytest
|
|
194
|
+
|
|
195
|
+
```pwsh
|
|
196
|
+
!py -m pip install -U pytest pytest-asyncio pytest-mock pytest-cov
|
|
197
|
+
pytest --cov=ws_bom_robot_app --log-cli-level=info
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
launch debugger
|
|
178
201
|
|
|
179
202
|
```pwsh
|
|
180
203
|
streamlit run debugger.py --server.port 6002
|
|
@@ -142,7 +142,31 @@ py -m pip install --upgrade -e .
|
|
|
142
142
|
py -m pip show ws-bom-robot-app
|
|
143
143
|
```
|
|
144
144
|
|
|
145
|
-
|
|
145
|
+
code quality tools
|
|
146
|
+
|
|
147
|
+
```pwsh
|
|
148
|
+
# .\src\robot
|
|
149
|
+
!py -m pip install -U scanreq prospector[with_everything]
|
|
150
|
+
## unused requirements
|
|
151
|
+
scanreq -r requirements.txt -p ./ws_bom_robot_app
|
|
152
|
+
## style/linting
|
|
153
|
+
prospector ./ws_bom_robot_app -t pylint -t pydocstyle
|
|
154
|
+
## code quality/complexity
|
|
155
|
+
prospector ./ws_bom_robot_app -t vulture -t mccabe -t mypy
|
|
156
|
+
## security
|
|
157
|
+
prospector ./ws_bom_robot_app -t dodgy -t bandit
|
|
158
|
+
## package
|
|
159
|
+
prospector ./ws_bom_robot_app -t pyroma
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
lauch pytest
|
|
163
|
+
|
|
164
|
+
```pwsh
|
|
165
|
+
!py -m pip install -U pytest pytest-asyncio pytest-mock pytest-cov
|
|
166
|
+
pytest --cov=ws_bom_robot_app --log-cli-level=info
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
launch debugger
|
|
146
170
|
|
|
147
171
|
```pwsh
|
|
148
172
|
streamlit run debugger.py --server.port 6002
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="ws_bom_robot_app",
|
|
5
|
-
version="0.0.
|
|
5
|
+
version="0.0.17",
|
|
6
6
|
description="A FastAPI application serving ws bom/robot/llm platform ai.",
|
|
7
7
|
long_description=open("README.md", encoding='utf-8').read(),
|
|
8
8
|
long_description_content_type="text/markdown",
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from langchain_core.documents import Document
|
|
3
|
+
from abc import ABC, abstractmethod
|
|
4
|
+
from unstructured_ingest.interfaces import PartitionConfig, ProcessorConfig, ReadConfig, RetryStrategyConfig
|
|
5
|
+
from typing import Union
|
|
6
|
+
|
|
7
|
+
class IntegrationStrategy(ABC):
|
|
8
|
+
def __init__(self, knowledgebase_path: str, data: dict[str, Union[str,int,list]]):
|
|
9
|
+
self.knowledgebase_path = knowledgebase_path
|
|
10
|
+
self.data = data
|
|
11
|
+
self.working_directory = os.path.join(self.knowledgebase_path,self.working_subdirectory())
|
|
12
|
+
os.makedirs(self.working_directory, exist_ok=True)
|
|
13
|
+
@property
|
|
14
|
+
@abstractmethod
|
|
15
|
+
def working_subdirectory(self) -> str:
|
|
16
|
+
pass
|
|
17
|
+
@abstractmethod
|
|
18
|
+
#@timer
|
|
19
|
+
def load(self) -> list[Document]:
|
|
20
|
+
pass
|
|
21
|
+
|
|
22
|
+
class UnstructuredIngest():
|
|
23
|
+
def __init__(self, working_directory: str):
|
|
24
|
+
self.working_directory = working_directory
|
|
25
|
+
def processor_config(self) -> ProcessorConfig:
|
|
26
|
+
return ProcessorConfig(
|
|
27
|
+
reprocess=False,
|
|
28
|
+
verbose=False,
|
|
29
|
+
#work_dir=os.path.join(self.working_directory,'.__work_dir'),
|
|
30
|
+
#output_dir=self.working_directory,
|
|
31
|
+
num_processes=1,
|
|
32
|
+
raise_on_error=False
|
|
33
|
+
)
|
|
34
|
+
def read_config(self) -> ReadConfig:
|
|
35
|
+
return ReadConfig(
|
|
36
|
+
download_dir=self.working_directory,
|
|
37
|
+
re_download=True,
|
|
38
|
+
preserve_downloads=False,
|
|
39
|
+
download_only=True
|
|
40
|
+
)
|
|
41
|
+
def partition_config(self) -> PartitionConfig:
|
|
42
|
+
return None
|
|
43
|
+
def retry_strategy_config(self) -> RetryStrategyConfig:
|
|
44
|
+
return None
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
import os
|
|
3
|
+
from ws_bom_robot_app.llm.vector_store.integration.base import IntegrationStrategy, UnstructuredIngest
|
|
4
|
+
from unstructured_ingest.connector.confluence import SimpleConfluenceConfig, ConfluenceAccessConfig
|
|
5
|
+
from unstructured_ingest.runner import ConfluenceRunner
|
|
6
|
+
from langchain_core.documents import Document
|
|
7
|
+
from ws_bom_robot_app.llm.vector_store.loader.base import Loader
|
|
8
|
+
from typing import Optional, Union
|
|
9
|
+
from pydantic import BaseModel, Field, AliasChoices
|
|
10
|
+
|
|
11
|
+
class ConfluenceParams(BaseModel):
|
|
12
|
+
url: str
|
|
13
|
+
access_token: str = Field(validation_alias=AliasChoices("accessToken","access_token"))
|
|
14
|
+
user_email: str = Field(validation_alias=AliasChoices("userEmail","user_email"))
|
|
15
|
+
spaces: list[str] = []
|
|
16
|
+
class Confluence(IntegrationStrategy):
|
|
17
|
+
def __init__(self, knowledgebase_path: str, data: dict[str, Union[str,int,list]]):
|
|
18
|
+
super().__init__(knowledgebase_path, data)
|
|
19
|
+
self.__data = ConfluenceParams.model_validate(self.data)
|
|
20
|
+
self.__loader = Loader(self.working_directory)
|
|
21
|
+
self.__unstructured_ingest = UnstructuredIngest(self.working_directory)
|
|
22
|
+
def working_subdirectory(self) -> str:
|
|
23
|
+
return 'confluence'
|
|
24
|
+
def run(self) -> None:
|
|
25
|
+
access_config = ConfluenceAccessConfig(
|
|
26
|
+
api_token=self.__data.access_token
|
|
27
|
+
)
|
|
28
|
+
config = SimpleConfluenceConfig(
|
|
29
|
+
user_email=self.__data.user_email,
|
|
30
|
+
url = self.__data.url,
|
|
31
|
+
access_config=access_config,
|
|
32
|
+
#max_num_of_spaces=self.data.get('max_num_of_spaces',500),
|
|
33
|
+
#max_num_of_docs_from_each_space=self.data.get('max_num_of_docs_from_each_space',100),
|
|
34
|
+
spaces=self.__data.spaces
|
|
35
|
+
)
|
|
36
|
+
runner = ConfluenceRunner(
|
|
37
|
+
connector_config=config,
|
|
38
|
+
processor_config=self.__unstructured_ingest.processor_config(),
|
|
39
|
+
read_config=self.__unstructured_ingest.read_config(),
|
|
40
|
+
partition_config=self.__unstructured_ingest.partition_config(),
|
|
41
|
+
retry_strategy_config=self.__unstructured_ingest.retry_strategy_config()
|
|
42
|
+
)
|
|
43
|
+
runner.run()
|
|
44
|
+
async def load(self) -> list[Document]:
|
|
45
|
+
self.run()
|
|
46
|
+
await asyncio.sleep(1)
|
|
47
|
+
return await self.__loader.load()
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
import os
|
|
3
|
+
from typing import Optional, Union
|
|
4
|
+
from ws_bom_robot_app.llm.vector_store.integration.base import IntegrationStrategy, UnstructuredIngest
|
|
5
|
+
from unstructured_ingest.connector.git import GitAccessConfig
|
|
6
|
+
from unstructured_ingest.connector.github import SimpleGitHubConfig
|
|
7
|
+
from unstructured_ingest.runner import GithubRunner
|
|
8
|
+
from langchain_core.documents import Document
|
|
9
|
+
from ws_bom_robot_app.llm.vector_store.loader.base import Loader
|
|
10
|
+
from pydantic import BaseModel, Field, AliasChoices
|
|
11
|
+
|
|
12
|
+
class GithubParams(BaseModel):
|
|
13
|
+
repo: str
|
|
14
|
+
access_token: Optional[str] | None = Field(None,validation_alias=AliasChoices("accessToken","access_token"))
|
|
15
|
+
branch: Optional[str] = 'main'
|
|
16
|
+
file_ext: Optional[list[str]] = Field(default_factory=list, validation_alias=AliasChoices("fileExt","file_ext"))
|
|
17
|
+
class Github(IntegrationStrategy):
|
|
18
|
+
def __init__(self, knowledgebase_path: str, data: dict[str, Union[str,int,list]]):
|
|
19
|
+
super().__init__(knowledgebase_path, data)
|
|
20
|
+
self.__data = GithubParams.model_validate(self.data)
|
|
21
|
+
self.__loader = Loader(self.working_directory)
|
|
22
|
+
self.__unstructured_ingest = UnstructuredIngest(self.working_directory)
|
|
23
|
+
def working_subdirectory(self) -> str:
|
|
24
|
+
return 'github'
|
|
25
|
+
def run(self) -> None:
|
|
26
|
+
access_config = GitAccessConfig(
|
|
27
|
+
access_token=self.__data.access_token
|
|
28
|
+
)
|
|
29
|
+
file_ext = self.__data.file_ext or None
|
|
30
|
+
file_glob = [f"**/*{ext}" for ext in file_ext] if file_ext else None
|
|
31
|
+
config = SimpleGitHubConfig(
|
|
32
|
+
url = self.__data.repo,
|
|
33
|
+
access_config=access_config,
|
|
34
|
+
branch=self.__data.branch,
|
|
35
|
+
file_glob=file_glob
|
|
36
|
+
)
|
|
37
|
+
runner = GithubRunner(
|
|
38
|
+
connector_config=config,
|
|
39
|
+
processor_config=self.__unstructured_ingest.processor_config(),
|
|
40
|
+
read_config=self.__unstructured_ingest.read_config(),
|
|
41
|
+
partition_config=self.__unstructured_ingest.partition_config(),
|
|
42
|
+
retry_strategy_config=self.__unstructured_ingest.retry_strategy_config()
|
|
43
|
+
)
|
|
44
|
+
runner.run()
|
|
45
|
+
async def load(self) -> list[Document]:
|
|
46
|
+
self.run()
|
|
47
|
+
await asyncio.sleep(1)
|
|
48
|
+
return await self.__loader.load()
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
import os
|
|
3
|
+
from ws_bom_robot_app.llm.vector_store.integration.base import IntegrationStrategy, UnstructuredIngest
|
|
4
|
+
from unstructured_ingest.connector.jira import SimpleJiraConfig, JiraAccessConfig
|
|
5
|
+
from unstructured_ingest.runner import JiraRunner
|
|
6
|
+
from langchain_core.documents import Document
|
|
7
|
+
from ws_bom_robot_app.llm.vector_store.loader.base import Loader
|
|
8
|
+
from pydantic import BaseModel, Field, AliasChoices
|
|
9
|
+
from typing import Optional, Union
|
|
10
|
+
|
|
11
|
+
class JiraParams(BaseModel):
|
|
12
|
+
url: str
|
|
13
|
+
access_token: str = Field(validation_alias=AliasChoices("accessToken","access_token"))
|
|
14
|
+
user_email: str = Field(validation_alias=AliasChoices("userEmail","user_email"))
|
|
15
|
+
projects: list[str]
|
|
16
|
+
boards: Optional[list[str]] | None = None
|
|
17
|
+
issues: Optional[list[str]] | None = None
|
|
18
|
+
class Jira(IntegrationStrategy):
|
|
19
|
+
def __init__(self, knowledgebase_path: str, data: dict[str, Union[str,int,list]]):
|
|
20
|
+
super().__init__(knowledgebase_path, data)
|
|
21
|
+
self.__data = JiraParams.model_validate(self.data)
|
|
22
|
+
self.__loader = Loader(self.working_directory)
|
|
23
|
+
self.__unstructured_ingest = UnstructuredIngest(self.working_directory)
|
|
24
|
+
def working_subdirectory(self) -> str:
|
|
25
|
+
return 'jira'
|
|
26
|
+
def run(self) -> None:
|
|
27
|
+
access_config = JiraAccessConfig(
|
|
28
|
+
api_token=self.__data.access_token
|
|
29
|
+
)
|
|
30
|
+
config = SimpleJiraConfig(
|
|
31
|
+
user_email=self.__data.user_email,
|
|
32
|
+
url = self.__data.url,
|
|
33
|
+
access_config=access_config,
|
|
34
|
+
projects=self.__data.projects,
|
|
35
|
+
boards=self.__data.boards,
|
|
36
|
+
issues=self.__data.issues
|
|
37
|
+
)
|
|
38
|
+
runner = JiraRunner(
|
|
39
|
+
connector_config=config,
|
|
40
|
+
processor_config=self.__unstructured_ingest.processor_config(),
|
|
41
|
+
read_config=self.__unstructured_ingest.read_config(),
|
|
42
|
+
partition_config=self.__unstructured_ingest.partition_config(),
|
|
43
|
+
retry_strategy_config=self.__unstructured_ingest.retry_strategy_config()
|
|
44
|
+
)
|
|
45
|
+
runner.run()
|
|
46
|
+
async def load(self) -> list[Document]:
|
|
47
|
+
self.run()
|
|
48
|
+
await asyncio.sleep(1)
|
|
49
|
+
return await self.__loader.load()
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
from typing import Type
|
|
2
2
|
from ws_bom_robot_app.llm.vector_store.integration.base import IntegrationStrategy
|
|
3
|
+
from ws_bom_robot_app.llm.vector_store.integration.confluence import Confluence
|
|
4
|
+
from ws_bom_robot_app.llm.vector_store.integration.github import Github
|
|
5
|
+
from ws_bom_robot_app.llm.vector_store.integration.jira import Jira
|
|
3
6
|
from ws_bom_robot_app.llm.vector_store.integration.sitemap import Sitemap
|
|
4
7
|
|
|
5
8
|
class IntegrationManager:
|
|
6
9
|
_list: dict[str, Type[IntegrationStrategy]] = {
|
|
7
10
|
"llmkbsitemap": Sitemap,
|
|
11
|
+
"llmkbgithub": Github,
|
|
12
|
+
"llmkbjira": Jira,
|
|
13
|
+
"llmkbconfluence": Confluence,
|
|
8
14
|
}
|
|
9
15
|
@classmethod
|
|
10
16
|
def get_strategy(cls, name: str, knowledgebase_path: str, data: dict[str, str]) -> IntegrationStrategy:
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
standardwebhooks==1.0.0
|
|
3
3
|
apscheduler==3.11.0
|
|
4
4
|
aiofiles==24.1.0
|
|
5
|
-
pydantic==2.
|
|
6
|
-
pydantic-settings==2.6.
|
|
5
|
+
pydantic==2.10.3
|
|
6
|
+
pydantic-settings==2.6.1
|
|
7
7
|
fastapi[standard]==0.115.5
|
|
8
8
|
|
|
9
9
|
#framework
|
|
@@ -20,7 +20,6 @@ faiss-cpu==1.9.0
|
|
|
20
20
|
#loaders
|
|
21
21
|
python-magic==0.4.27
|
|
22
22
|
opencv-python-headless==4.10.0.84 #docker specs
|
|
23
|
-
jmespath==1.0.1 #tmp fix to pre-extract from native pkg due to issues with wheel
|
|
24
23
|
unstructured[all-docs]==0.15.14
|
|
25
24
|
langchain_unstructured==0.1.5
|
|
26
25
|
html5lib==1.1 #beautifulsoup4 parser
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ws_bom_robot_app
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.17
|
|
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
|
|
@@ -13,8 +13,8 @@ Description-Content-Type: text/markdown
|
|
|
13
13
|
Requires-Dist: standardwebhooks==1.0.0
|
|
14
14
|
Requires-Dist: apscheduler==3.11.0
|
|
15
15
|
Requires-Dist: aiofiles==24.1.0
|
|
16
|
-
Requires-Dist: pydantic==2.
|
|
17
|
-
Requires-Dist: pydantic-settings==2.6.
|
|
16
|
+
Requires-Dist: pydantic==2.10.3
|
|
17
|
+
Requires-Dist: pydantic-settings==2.6.1
|
|
18
18
|
Requires-Dist: fastapi[standard]==0.115.5
|
|
19
19
|
Requires-Dist: langchain==0.3.9
|
|
20
20
|
Requires-Dist: langchain-openai==0.2.10
|
|
@@ -23,7 +23,6 @@ Requires-Dist: langchain-core==0.3.21
|
|
|
23
23
|
Requires-Dist: faiss-cpu==1.9.0
|
|
24
24
|
Requires-Dist: python-magic==0.4.27
|
|
25
25
|
Requires-Dist: opencv-python-headless==4.10.0.84
|
|
26
|
-
Requires-Dist: jmespath==1.0.1
|
|
27
26
|
Requires-Dist: unstructured[all-docs]==0.15.14
|
|
28
27
|
Requires-Dist: langchain_unstructured==0.1.5
|
|
29
28
|
Requires-Dist: html5lib==1.1
|
|
@@ -174,7 +173,31 @@ py -m pip install --upgrade -e .
|
|
|
174
173
|
py -m pip show ws-bom-robot-app
|
|
175
174
|
```
|
|
176
175
|
|
|
177
|
-
|
|
176
|
+
code quality tools
|
|
177
|
+
|
|
178
|
+
```pwsh
|
|
179
|
+
# .\src\robot
|
|
180
|
+
!py -m pip install -U scanreq prospector[with_everything]
|
|
181
|
+
## unused requirements
|
|
182
|
+
scanreq -r requirements.txt -p ./ws_bom_robot_app
|
|
183
|
+
## style/linting
|
|
184
|
+
prospector ./ws_bom_robot_app -t pylint -t pydocstyle
|
|
185
|
+
## code quality/complexity
|
|
186
|
+
prospector ./ws_bom_robot_app -t vulture -t mccabe -t mypy
|
|
187
|
+
## security
|
|
188
|
+
prospector ./ws_bom_robot_app -t dodgy -t bandit
|
|
189
|
+
## package
|
|
190
|
+
prospector ./ws_bom_robot_app -t pyroma
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
lauch pytest
|
|
194
|
+
|
|
195
|
+
```pwsh
|
|
196
|
+
!py -m pip install -U pytest pytest-asyncio pytest-mock pytest-cov
|
|
197
|
+
pytest --cov=ws_bom_robot_app --log-cli-level=info
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
launch debugger
|
|
178
201
|
|
|
179
202
|
```pwsh
|
|
180
203
|
streamlit run debugger.py --server.port 6002
|
|
@@ -43,6 +43,9 @@ ws_bom_robot_app/llm/vector_store/__init__.py
|
|
|
43
43
|
ws_bom_robot_app/llm/vector_store/generator.py
|
|
44
44
|
ws_bom_robot_app/llm/vector_store/integration/__init__.py
|
|
45
45
|
ws_bom_robot_app/llm/vector_store/integration/base.py
|
|
46
|
+
ws_bom_robot_app/llm/vector_store/integration/confluence.py
|
|
47
|
+
ws_bom_robot_app/llm/vector_store/integration/github.py
|
|
48
|
+
ws_bom_robot_app/llm/vector_store/integration/jira.py
|
|
46
49
|
ws_bom_robot_app/llm/vector_store/integration/manager.py
|
|
47
50
|
ws_bom_robot_app/llm/vector_store/integration/sitemap.py
|
|
48
51
|
ws_bom_robot_app/llm/vector_store/loader/__init__.py
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
standardwebhooks==1.0.0
|
|
2
2
|
apscheduler==3.11.0
|
|
3
3
|
aiofiles==24.1.0
|
|
4
|
-
pydantic==2.
|
|
5
|
-
pydantic-settings==2.6.
|
|
4
|
+
pydantic==2.10.3
|
|
5
|
+
pydantic-settings==2.6.1
|
|
6
6
|
fastapi[standard]==0.115.5
|
|
7
7
|
langchain==0.3.9
|
|
8
8
|
langchain-openai==0.2.10
|
|
@@ -11,7 +11,6 @@ langchain-core==0.3.21
|
|
|
11
11
|
faiss-cpu==1.9.0
|
|
12
12
|
python-magic==0.4.27
|
|
13
13
|
opencv-python-headless==4.10.0.84
|
|
14
|
-
jmespath==1.0.1
|
|
15
14
|
unstructured[all-docs]==0.15.14
|
|
16
15
|
langchain_unstructured==0.1.5
|
|
17
16
|
html5lib==1.1
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
from langchain_core.documents import Document
|
|
3
|
-
from abc import ABC, abstractmethod
|
|
4
|
-
from ws_bom_robot_app.util import timer
|
|
5
|
-
|
|
6
|
-
class IntegrationStrategy(ABC):
|
|
7
|
-
def __init__(self, knowledgebase_path: str, data: dict[str, str]):
|
|
8
|
-
self.knowledgebase_path = knowledgebase_path
|
|
9
|
-
self.data = data
|
|
10
|
-
self.working_directory = os.path.join(self.knowledgebase_path,self.working_subdirectory())
|
|
11
|
-
os.makedirs(self.working_directory, exist_ok=True)
|
|
12
|
-
@property
|
|
13
|
-
@abstractmethod
|
|
14
|
-
def working_subdirectory(self) -> str:
|
|
15
|
-
pass
|
|
16
|
-
@abstractmethod
|
|
17
|
-
#@timer
|
|
18
|
-
def load(self) -> list[Document]:
|
|
19
|
-
pass
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/agent_description.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/tools/models/__init__.py
RENAMED
|
File without changes
|
{ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/tools/models/main.py
RENAMED
|
File without changes
|
{ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/tools/tool_builder.py
RENAMED
|
File without changes
|
{ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/tools/tool_manager.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/utils/agent_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
{ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/utils/faiss_helper.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/vector_store/__init__.py
RENAMED
|
File without changes
|
{ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/vector_store/generator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app/llm/vector_store/loader/base.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ws_bom_robot_app-0.0.15 → ws_bom_robot_app-0.0.17}/ws_bom_robot_app.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|