ws-bom-robot-app 0.0.87__tar.gz → 0.0.88__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.
Files changed (83) hide show
  1. {ws_bom_robot_app-0.0.87/ws_bom_robot_app.egg-info → ws_bom_robot_app-0.0.88}/PKG-INFO +1 -1
  2. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/setup.py +1 -1
  3. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/integration/confluence.py +33 -5
  4. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88/ws_bom_robot_app.egg-info}/PKG-INFO +1 -1
  5. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/MANIFEST.in +0 -0
  6. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/README.md +0 -0
  7. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/pyproject.toml +0 -0
  8. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/requirements.txt +0 -0
  9. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/setup.cfg +0 -0
  10. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/__init__.py +0 -0
  11. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/auth.py +0 -0
  12. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/config.py +0 -0
  13. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/cron_manager.py +0 -0
  14. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/__init__.py +0 -0
  15. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/agent_context.py +0 -0
  16. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/agent_description.py +0 -0
  17. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/agent_handler.py +0 -0
  18. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/agent_lcel.py +0 -0
  19. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/api.py +0 -0
  20. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/defaut_prompt.py +0 -0
  21. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/evaluator.py +0 -0
  22. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/feedbacks/__init__.py +0 -0
  23. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/feedbacks/feedback_manager.py +0 -0
  24. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/main.py +0 -0
  25. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/models/__init__.py +0 -0
  26. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/models/api.py +0 -0
  27. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/models/base.py +0 -0
  28. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/models/feedback.py +0 -0
  29. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/models/kb.py +0 -0
  30. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/nebuly_handler.py +0 -0
  31. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/providers/__init__.py +0 -0
  32. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/providers/llm_manager.py +0 -0
  33. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/tools/__init__.py +0 -0
  34. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/tools/models/__init__.py +0 -0
  35. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/tools/models/main.py +0 -0
  36. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/tools/tool_builder.py +0 -0
  37. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/tools/tool_manager.py +0 -0
  38. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/tools/utils.py +0 -0
  39. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/utils/__init__.py +0 -0
  40. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/utils/agent.py +0 -0
  41. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/utils/chunker.py +0 -0
  42. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/utils/cleanup.py +0 -0
  43. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/utils/cms.py +0 -0
  44. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/utils/download.py +0 -0
  45. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/utils/print.py +0 -0
  46. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/utils/secrets.py +0 -0
  47. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/utils/webhooks.py +0 -0
  48. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/__init__.py +0 -0
  49. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/db/__init__.py +0 -0
  50. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/db/base.py +0 -0
  51. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/db/chroma.py +0 -0
  52. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/db/faiss.py +0 -0
  53. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/db/manager.py +0 -0
  54. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/db/qdrant.py +0 -0
  55. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/generator.py +0 -0
  56. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/integration/__init__.py +0 -0
  57. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/integration/azure.py +0 -0
  58. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/integration/base.py +0 -0
  59. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/integration/dropbox.py +0 -0
  60. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/integration/gcs.py +0 -0
  61. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/integration/github.py +0 -0
  62. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/integration/googledrive.py +0 -0
  63. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/integration/jira.py +0 -0
  64. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/integration/manager.py +0 -0
  65. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/integration/s3.py +0 -0
  66. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/integration/sftp.py +0 -0
  67. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/integration/sharepoint.py +0 -0
  68. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/integration/shopify.py +0 -0
  69. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/integration/sitemap.py +0 -0
  70. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/integration/slack.py +0 -0
  71. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/integration/thron.py +0 -0
  72. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/loader/__init__.py +0 -0
  73. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/loader/base.py +0 -0
  74. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/loader/docling.py +0 -0
  75. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/llm/vector_store/loader/json_loader.py +0 -0
  76. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/main.py +0 -0
  77. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/subprocess_runner.py +0 -0
  78. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/task_manager.py +0 -0
  79. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app/util.py +0 -0
  80. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app.egg-info/SOURCES.txt +0 -0
  81. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app.egg-info/dependency_links.txt +0 -0
  82. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app.egg-info/requires.txt +0 -0
  83. {ws_bom_robot_app-0.0.87 → ws_bom_robot_app-0.0.88}/ws_bom_robot_app.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ws_bom_robot_app
3
- Version: 0.0.87
3
+ Version: 0.0.88
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
@@ -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.87",
7
+ version="0.0.88",
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",
@@ -1,9 +1,10 @@
1
1
  import asyncio
2
2
  from ws_bom_robot_app.llm.vector_store.integration.base import IntegrationStrategy, UnstructuredIngest
3
- from unstructured_ingest.processes.connectors.confluence import ConfluenceIndexerConfig, ConfluenceDownloaderConfig, ConfluenceConnectionConfig, ConfluenceAccessConfig
3
+ from unstructured_ingest.processes.connectors.confluence import ConfluenceIndexerConfig, ConfluenceIndexer, ConfluenceDownloaderConfig, ConfluenceConnectionConfig, ConfluenceAccessConfig
4
+ from unstructured_ingest.pipeline.pipeline import Pipeline
4
5
  from langchain_core.documents import Document
5
6
  from ws_bom_robot_app.llm.vector_store.loader.base import Loader
6
- from typing import Optional, Union
7
+ from typing import List, Optional, Union
7
8
  from pydantic import BaseModel, Field, AliasChoices
8
9
 
9
10
  class ConfluenceParams(BaseModel):
@@ -16,6 +17,7 @@ class ConfluenceParams(BaseModel):
16
17
  password: Confluence password or Cloud API token, if filled, set the access_token to None and vice versa.
17
18
  access_token (str): The personal access token for authenticating with Confluence, e.g., 'AT....'
18
19
  spaces (list[str]): A list of Confluence spaces to interact with, e.g., ['SPACE1', 'SPACE2'].
20
+ max_num_of_docs_from_each_space (int): The maximum number of documents to fetch from each space. Defaults to 500, with a maximum limit of 5000.
19
21
  extension (list[str], optional): A list of file extensions to filter by. Defaults to None, e.g., ['.pdf', '.docx'].
20
22
  """
21
23
  url: str
@@ -23,6 +25,7 @@ class ConfluenceParams(BaseModel):
23
25
  password: Optional[str] = None
24
26
  access_token: Optional[str] = Field(None, validation_alias=AliasChoices("accessToken","access_token"))
25
27
  spaces: list[str] = []
28
+ max_num_of_docs_from_each_space: int = Field(default=500, ge=1, le=5000,validation_alias=AliasChoices("maxNumOfDocsFromEachSpace","max_num_of_docs_from_each_space"))
26
29
  extension: list[str] = Field(default=None)
27
30
  class Confluence(IntegrationStrategy):
28
31
  def __init__(self, knowledgebase_path: str, data: dict[str, Union[str,int,list]]):
@@ -33,7 +36,8 @@ class Confluence(IntegrationStrategy):
33
36
  return 'confluence'
34
37
  def run(self) -> None:
35
38
  indexer_config = ConfluenceIndexerConfig(
36
- spaces=self.__data.spaces
39
+ spaces=self.__data.spaces,
40
+ max_num_of_docs_from_each_space=self.__data.max_num_of_docs_from_each_space
37
41
  )
38
42
  downloader_config = ConfluenceDownloaderConfig(
39
43
  download_dir=self.working_directory
@@ -43,13 +47,37 @@ class Confluence(IntegrationStrategy):
43
47
  url=self.__data.url,
44
48
  username=self.__data.username
45
49
  )
46
- self.__unstructured_ingest.pipeline(
50
+ pipeline: Pipeline = self.__unstructured_ingest.pipeline(
47
51
  indexer_config,
48
52
  downloader_config,
49
53
  connection_config,
50
- extension=self.__data.extension).run()
54
+ extension=self.__data.extension
55
+ )
56
+ pipeline.indexer_step.process = CustomConfluenceIndexer(**vars(pipeline.indexer_step.process))
57
+ pipeline.run()
51
58
  async def load(self) -> list[Document]:
52
59
  await asyncio.to_thread(self.run)
53
60
  await asyncio.sleep(1)
54
61
  return await Loader(self.working_directory).load()
55
62
 
63
+ class CustomConfluenceIndexer(ConfluenceIndexer):
64
+ def __init__(self, **kwargs):
65
+ for key, value in kwargs.items():
66
+ try:
67
+ setattr(super(), key, value)
68
+ except AttributeError:
69
+ setattr(self, key, value)
70
+ def _get_docs_ids_within_one_space(self, space_key: str) -> List[dict]:
71
+ with self.connection_config.get_client() as client:
72
+ pages = client.get_all_pages_from_space(
73
+ space=space_key,
74
+ start=0,
75
+ limit=self.index_config.max_num_of_docs_from_each_space, #explicitly limit the number of pages fetched (omitted in unstructured-ingest)
76
+ expand=None,
77
+ content_type="page", # blogpost and comment types not currently supported
78
+ status=None,
79
+ )
80
+ limited_pages = pages[: self.index_config.max_num_of_docs_from_each_space]
81
+ doc_ids = [{"space_id": space_key, "doc_id": page["id"]} for page in limited_pages]
82
+ return doc_ids
83
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ws_bom_robot_app
3
- Version: 0.0.87
3
+ Version: 0.0.88
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