ws-bom-robot-app 0.0.99__tar.gz → 0.0.100__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 (84) hide show
  1. {ws_bom_robot_app-0.0.99/ws_bom_robot_app.egg-info → ws_bom_robot_app-0.0.100}/PKG-INFO +5 -5
  2. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/README.md +4 -4
  3. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/setup.py +1 -1
  4. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/loader/base.py +7 -1
  5. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/loader/docling.py +20 -12
  6. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100/ws_bom_robot_app.egg-info}/PKG-INFO +5 -5
  7. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/MANIFEST.in +0 -0
  8. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/pyproject.toml +0 -0
  9. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/requirements.txt +0 -0
  10. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/setup.cfg +0 -0
  11. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/__init__.py +0 -0
  12. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/auth.py +0 -0
  13. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/config.py +0 -0
  14. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/cron_manager.py +0 -0
  15. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/__init__.py +0 -0
  16. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/agent_context.py +0 -0
  17. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/agent_description.py +0 -0
  18. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/agent_handler.py +0 -0
  19. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/agent_lcel.py +0 -0
  20. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/api.py +0 -0
  21. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/defaut_prompt.py +0 -0
  22. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/evaluator.py +0 -0
  23. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/feedbacks/__init__.py +0 -0
  24. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/feedbacks/feedback_manager.py +0 -0
  25. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/main.py +0 -0
  26. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/models/__init__.py +0 -0
  27. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/models/api.py +0 -0
  28. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/models/base.py +0 -0
  29. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/models/feedback.py +0 -0
  30. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/models/kb.py +0 -0
  31. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/nebuly_handler.py +0 -0
  32. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/providers/__init__.py +0 -0
  33. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/providers/llm_manager.py +0 -0
  34. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/tools/__init__.py +0 -0
  35. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/tools/models/__init__.py +0 -0
  36. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/tools/models/main.py +0 -0
  37. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/tools/tool_builder.py +0 -0
  38. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/tools/tool_manager.py +0 -0
  39. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/tools/utils.py +0 -0
  40. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/utils/__init__.py +0 -0
  41. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/utils/agent.py +0 -0
  42. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/utils/chunker.py +0 -0
  43. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/utils/cleanup.py +0 -0
  44. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/utils/cms.py +0 -0
  45. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/utils/download.py +0 -0
  46. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/utils/print.py +0 -0
  47. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/utils/secrets.py +0 -0
  48. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/utils/webhooks.py +0 -0
  49. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/__init__.py +0 -0
  50. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/db/__init__.py +0 -0
  51. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/db/base.py +0 -0
  52. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/db/chroma.py +0 -0
  53. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/db/faiss.py +0 -0
  54. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/db/manager.py +0 -0
  55. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/db/qdrant.py +0 -0
  56. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/generator.py +0 -0
  57. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/integration/__init__.py +0 -0
  58. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/integration/api.py +0 -0
  59. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/integration/azure.py +0 -0
  60. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/integration/base.py +0 -0
  61. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/integration/confluence.py +0 -0
  62. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/integration/dropbox.py +0 -0
  63. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/integration/gcs.py +0 -0
  64. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/integration/github.py +0 -0
  65. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/integration/googledrive.py +0 -0
  66. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/integration/jira.py +0 -0
  67. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/integration/manager.py +0 -0
  68. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/integration/s3.py +0 -0
  69. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/integration/sftp.py +0 -0
  70. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/integration/sharepoint.py +0 -0
  71. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/integration/shopify.py +0 -0
  72. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/integration/sitemap.py +0 -0
  73. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/integration/slack.py +0 -0
  74. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/integration/thron.py +0 -0
  75. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/loader/__init__.py +0 -0
  76. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/llm/vector_store/loader/json_loader.py +0 -0
  77. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/main.py +0 -0
  78. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/subprocess_runner.py +0 -0
  79. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/task_manager.py +0 -0
  80. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app/util.py +0 -0
  81. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app.egg-info/SOURCES.txt +0 -0
  82. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app.egg-info/dependency_links.txt +0 -0
  83. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/ws_bom_robot_app.egg-info/requires.txt +0 -0
  84. {ws_bom_robot_app-0.0.99 → ws_bom_robot_app-0.0.100}/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.99
3
+ Version: 0.0.100
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
@@ -147,12 +147,12 @@ dockerize base image
147
147
 
148
148
  ```pwsh
149
149
  <# cpu #>
150
- #docker build -f Dockerfile-robot-base-cpu -t ws-bom-robot-base:cpu .
151
- #docker tag ws-bom-robot-base:cpu ghcr.io/websolutespa/ws-bom-robot-base:cpu
152
- docker build -f Dockerfile-robot-base-cpu -t ghcr.io/websolutespa/ws-bom-robot-base:cpu .
150
+ docker build -f Dockerfile-robot-base-cpu -t ws-bom-robot-base:cpu .
151
+ docker tag ws-bom-robot-base:cpu ghcr.io/websolutespa/ws-bom-robot-base:cpu
153
152
  docker push ghcr.io/websolutespa/ws-bom-robot-base:cpu
154
153
  <# gpu #>
155
- docker build -f Dockerfile-robot-base-gpu -t ghcr.io/websolutespa/ws-bom-robot-base:gpu .
154
+ docker build -f Dockerfile-robot-base-gpu -t ws-bom-robot-base:gpu .
155
+ docker tag ws-bom-robot-base:gpu ghcr.io/websolutespa/ws-bom-robot-base:gpu
156
156
  docker push ghcr.io/websolutespa/ws-bom-robot-base:gpu
157
157
  ```
158
158
 
@@ -80,12 +80,12 @@ dockerize base image
80
80
 
81
81
  ```pwsh
82
82
  <# cpu #>
83
- #docker build -f Dockerfile-robot-base-cpu -t ws-bom-robot-base:cpu .
84
- #docker tag ws-bom-robot-base:cpu ghcr.io/websolutespa/ws-bom-robot-base:cpu
85
- docker build -f Dockerfile-robot-base-cpu -t ghcr.io/websolutespa/ws-bom-robot-base:cpu .
83
+ docker build -f Dockerfile-robot-base-cpu -t ws-bom-robot-base:cpu .
84
+ docker tag ws-bom-robot-base:cpu ghcr.io/websolutespa/ws-bom-robot-base:cpu
86
85
  docker push ghcr.io/websolutespa/ws-bom-robot-base:cpu
87
86
  <# gpu #>
88
- docker build -f Dockerfile-robot-base-gpu -t ghcr.io/websolutespa/ws-bom-robot-base:gpu .
87
+ docker build -f Dockerfile-robot-base-gpu -t ws-bom-robot-base:gpu .
88
+ docker tag ws-bom-robot-base:gpu ghcr.io/websolutespa/ws-bom-robot-base:gpu
89
89
  docker push ghcr.io/websolutespa/ws-bom-robot-base:gpu
90
90
  ```
91
91
 
@@ -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.99",
7
+ version="0.0.100",
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",
@@ -117,11 +117,14 @@ class Loader():
117
117
  #region log
118
118
  import warnings
119
119
  warnings.filterwarnings("ignore", message=".*pin_memory.*no accelerator is found.*")
120
+ warnings.filterwarnings("ignore", category=UserWarning)
120
121
  log_msg_to_ignore = [
121
122
  "Going to convert document batch...",
122
123
  "Initializing pipeline for",
123
124
  "Accelerator device:",
124
125
  "detected formats:",
126
+ "The text detection result is empty",
127
+ "RapidOCR returned empty result!",
125
128
  ]
126
129
  class MessageFilter(logging.Filter):
127
130
  def __init__(self, patterns):
@@ -139,8 +142,11 @@ class Loader():
139
142
  'docling.document_converter',
140
143
  'docling.datamodel',
141
144
  'docling.datamodel.document',
145
+ 'docling.models',
146
+ 'docling.models.rapidocr_model',
142
147
  'docling.utils.accelerator_utils',
143
- 'unstructured'
148
+ 'unstructured',
149
+ 'RapidOCR'
144
150
  ]
145
151
  for logger_name in loggers_to_filter:
146
152
  logging.getLogger(logger_name).addFilter(message_filter)
@@ -8,31 +8,39 @@ from docling.datamodel.accelerator_options import AcceleratorDevice, Accelerator
8
8
  from docling.datamodel.pipeline_options import PdfPipelineOptions, TableStructureOptions, TableFormerMode
9
9
  from langchain_community.document_loaders import UnstructuredFileLoader
10
10
  from ws_bom_robot_app.llm.vector_store.db.base import VectorDBStrategy
11
- from docling.datamodel.pipeline_options import TableStructureOptions, TableFormerMode, EasyOcrOptions
11
+ from docling.datamodel.pipeline_options import TableStructureOptions, TableFormerMode, RapidOcrOptions
12
12
  from docling.document_converter import DocumentConverter, PdfFormatOption, ImageFormatOption
13
13
 
14
14
  def _doclingConverter() -> DocumentConverter:
15
- pipeline_options = PdfPipelineOptions(
16
- accelerator_options=AcceleratorOptions(
15
+ _pipeline_config = {
16
+ "accelerator_options": AcceleratorOptions(
17
17
  device=AcceleratorDevice.AUTO,
18
18
  cuda_use_flash_attention2=False,
19
19
  ),
20
- table_structure_options=TableStructureOptions(mode=TableFormerMode.FAST),
21
- #do_ocr=False,
22
- ocr_options=EasyOcrOptions()
23
- )
20
+ "table_structure_options": TableStructureOptions(mode=TableFormerMode.ACCURATE),
21
+ }
22
+ _base_pipeline_options = PdfPipelineOptions(
23
+ **_pipeline_config,
24
+ do_ocr=False)
25
+ _ocr_pipeline_options = PdfPipelineOptions(
26
+ **_pipeline_config,
27
+ ocr_options=RapidOcrOptions(
28
+ print_verbose=False,
29
+ text_score=0.5,
30
+ #rapidocr_params={"det_use_cuda": True}
31
+ ))
24
32
  doc_converter = DocumentConverter(
25
- format_options={
33
+ format_options={
26
34
  InputFormat.PDF: PdfFormatOption(
27
- pipeline_options=pipeline_options,
35
+ pipeline_options=_base_pipeline_options,
28
36
  ),
29
37
  InputFormat.IMAGE: ImageFormatOption(
30
- pipeline_options=pipeline_options,
38
+ pipeline_options=_ocr_pipeline_options,
31
39
  ),
32
40
  }
33
41
  )
34
- doc_converter.initialize_pipeline(InputFormat.PDF)
35
- doc_converter.initialize_pipeline(InputFormat.IMAGE)
42
+ for frm in [InputFormat.PDF, InputFormat.IMAGE]:
43
+ doc_converter.initialize_pipeline(frm)
36
44
  return doc_converter
37
45
 
38
46
  class DoclingLoader(BaseLoader):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ws_bom_robot_app
3
- Version: 0.0.99
3
+ Version: 0.0.100
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
@@ -147,12 +147,12 @@ dockerize base image
147
147
 
148
148
  ```pwsh
149
149
  <# cpu #>
150
- #docker build -f Dockerfile-robot-base-cpu -t ws-bom-robot-base:cpu .
151
- #docker tag ws-bom-robot-base:cpu ghcr.io/websolutespa/ws-bom-robot-base:cpu
152
- docker build -f Dockerfile-robot-base-cpu -t ghcr.io/websolutespa/ws-bom-robot-base:cpu .
150
+ docker build -f Dockerfile-robot-base-cpu -t ws-bom-robot-base:cpu .
151
+ docker tag ws-bom-robot-base:cpu ghcr.io/websolutespa/ws-bom-robot-base:cpu
153
152
  docker push ghcr.io/websolutespa/ws-bom-robot-base:cpu
154
153
  <# gpu #>
155
- docker build -f Dockerfile-robot-base-gpu -t ghcr.io/websolutespa/ws-bom-robot-base:gpu .
154
+ docker build -f Dockerfile-robot-base-gpu -t ws-bom-robot-base:gpu .
155
+ docker tag ws-bom-robot-base:gpu ghcr.io/websolutespa/ws-bom-robot-base:gpu
156
156
  docker push ghcr.io/websolutespa/ws-bom-robot-base:gpu
157
157
  ```
158
158