ws-bom-robot-app 0.0.34__tar.gz → 0.0.35__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.34/ws_bom_robot_app.egg-info → ws_bom_robot_app-0.0.35}/PKG-INFO +1 -1
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/setup.py +1 -1
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/config.py +1 -1
- ws_bom_robot_app-0.0.35/ws_bom_robot_app/llm/utils/secrets.py +26 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/vector_store/integration/base.py +12 -1
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35/ws_bom_robot_app.egg-info}/PKG-INFO +1 -1
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app.egg-info/SOURCES.txt +1 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/MANIFEST.in +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/README.md +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/pyproject.toml +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/requirements.txt +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/setup.cfg +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/__init__.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/auth.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/cron_manager.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/__init__.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/agent_description.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/agent_handler.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/agent_lcel.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/api.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/defaut_prompt.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/main.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/models/__init__.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/models/api.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/models/base.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/models/kb.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/providers/__init__.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/providers/llm_manager.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/settings.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/tools/__init__.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/tools/models/__init__.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/tools/models/main.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/tools/tool_builder.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/tools/tool_manager.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/tools/utils.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/utils/__init__.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/utils/agent_utils.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/utils/chunker.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/utils/download.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/utils/kb.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/utils/print.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/utils/webhooks.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/vector_store/__init__.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/vector_store/generator.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/vector_store/integration/__init__.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/vector_store/integration/azure.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/vector_store/integration/confluence.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/vector_store/integration/dropbox.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/vector_store/integration/gcs.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/vector_store/integration/github.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/vector_store/integration/googledrive.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/vector_store/integration/jira.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/vector_store/integration/manager.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/vector_store/integration/s3.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/vector_store/integration/sftp.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/vector_store/integration/sharepoint.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/vector_store/integration/sitemap.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/vector_store/integration/slack.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/vector_store/loader/__init__.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/vector_store/loader/base.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/vector_store/loader/docling.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/vector_store/loader/json_loader.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/main.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/task_manager.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/util.py +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app.egg-info/dependency_links.txt +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app.egg-info/requires.txt +0 -0
- {ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app.egg-info/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@ _requirements = [line.split('#')[0].strip() for line in open("requirements.txt")
|
|
|
4
4
|
|
|
5
5
|
setup(
|
|
6
6
|
name="ws_bom_robot_app",
|
|
7
|
-
version="0.0.
|
|
7
|
+
version="0.0.35",
|
|
8
8
|
description="A FastAPI application serving ws bom/robot/llm platform ai.",
|
|
9
9
|
long_description=open("README.md", encoding='utf-8').read(),
|
|
10
10
|
long_description_content_type="text/markdown",
|
|
@@ -25,7 +25,7 @@ class Settings(BaseSettings):
|
|
|
25
25
|
robot_debugger_llm_key: str = ''
|
|
26
26
|
robot_debugger_embedding_key: str = ''
|
|
27
27
|
OPENAI_API_KEY: str = '' # used for dall-e api
|
|
28
|
-
GOOGLE_APPLICATION_CREDENTIALS: str = './.
|
|
28
|
+
GOOGLE_APPLICATION_CREDENTIALS: str = './.secrets/google.json' # path to google credentials iam file
|
|
29
29
|
model_config = ConfigDict(
|
|
30
30
|
env_file='./.env',
|
|
31
31
|
extra='ignore',
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import json, os, logging
|
|
2
|
+
from typing import Union
|
|
3
|
+
class Secrets:
|
|
4
|
+
@staticmethod
|
|
5
|
+
def from_file(path: str) -> dict[str, Union[str, int, list]] | None:
|
|
6
|
+
if os.path.exists(path):
|
|
7
|
+
with open(path, 'r') as file:
|
|
8
|
+
_content = file.read()
|
|
9
|
+
try:
|
|
10
|
+
return json.loads(_content)
|
|
11
|
+
except json.JSONDecodeError:
|
|
12
|
+
logging.error(f"Failed to parse secret file: {path}")
|
|
13
|
+
else:
|
|
14
|
+
logging.error(f"Secret file not found: {path}")
|
|
15
|
+
return None
|
|
16
|
+
@staticmethod
|
|
17
|
+
def from_env(key: str) -> dict[str, Union[str, int, list]] | None:
|
|
18
|
+
_content = os.getenv(key)
|
|
19
|
+
if _content:
|
|
20
|
+
try:
|
|
21
|
+
return json.loads(_content)
|
|
22
|
+
except json.JSONDecodeError:
|
|
23
|
+
logging.error(f"Failed to parse environment variable: {key}")
|
|
24
|
+
else:
|
|
25
|
+
logging.error(f"Environment variable not found: {key}")
|
|
26
|
+
return None
|
|
@@ -4,11 +4,22 @@ from abc import ABC, abstractmethod
|
|
|
4
4
|
from unstructured_ingest.v2.interfaces import ProcessorConfig
|
|
5
5
|
from unstructured_ingest.v2.pipeline.pipeline import Pipeline, PartitionerConfig, FiltererConfig
|
|
6
6
|
from typing import Union
|
|
7
|
+
from ws_bom_robot_app.llm.utils.secrets import Secrets
|
|
7
8
|
|
|
8
9
|
class IntegrationStrategy(ABC):
|
|
10
|
+
@classmethod
|
|
11
|
+
def _parse_data(cls, data: dict[str, Union[str, int, list]]) -> dict[str, Union[str, int, list]]:
|
|
12
|
+
for key, fn in (
|
|
13
|
+
("__from_env", Secrets.from_env),
|
|
14
|
+
("__from_file", Secrets.from_file),
|
|
15
|
+
):
|
|
16
|
+
if key in data:
|
|
17
|
+
if secret := fn(data[key]):
|
|
18
|
+
return secret
|
|
19
|
+
return data
|
|
9
20
|
def __init__(self, knowledgebase_path: str, data: dict[str, Union[str,int,list]]):
|
|
10
21
|
self.knowledgebase_path = knowledgebase_path
|
|
11
|
-
self.data = data
|
|
22
|
+
self.data = self._parse_data(data)
|
|
12
23
|
self.working_directory = os.path.join(self.knowledgebase_path,self.working_subdirectory())
|
|
13
24
|
os.makedirs(self.working_directory, exist_ok=True)
|
|
14
25
|
@property
|
|
@@ -41,6 +41,7 @@ ws_bom_robot_app/llm/utils/chunker.py
|
|
|
41
41
|
ws_bom_robot_app/llm/utils/download.py
|
|
42
42
|
ws_bom_robot_app/llm/utils/kb.py
|
|
43
43
|
ws_bom_robot_app/llm/utils/print.py
|
|
44
|
+
ws_bom_robot_app/llm/utils/secrets.py
|
|
44
45
|
ws_bom_robot_app/llm/utils/webhooks.py
|
|
45
46
|
ws_bom_robot_app/llm/vector_store/__init__.py
|
|
46
47
|
ws_bom_robot_app/llm/vector_store/generator.py
|
|
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.34 → ws_bom_robot_app-0.0.35}/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
|
{ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/providers/__init__.py
RENAMED
|
File without changes
|
{ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/providers/llm_manager.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/tools/models/__init__.py
RENAMED
|
File without changes
|
{ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/tools/models/main.py
RENAMED
|
File without changes
|
{ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/tools/tool_builder.py
RENAMED
|
File without changes
|
{ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/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.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/utils/agent_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/vector_store/__init__.py
RENAMED
|
File without changes
|
{ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app/llm/vector_store/generator.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/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
|
|
File without changes
|
{ws_bom_robot_app-0.0.34 → ws_bom_robot_app-0.0.35}/ws_bom_robot_app.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|