ws-bom-robot-app 0.0.104__tar.gz → 0.0.105__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.104/ws_bom_robot_app.egg-info → ws_bom_robot_app-0.0.105}/PKG-INFO +364 -364
  2. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/README.md +2 -2
  3. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/requirements.txt +55 -55
  4. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/setup.cfg +4 -4
  5. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/setup.py +1 -1
  6. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/agent_description.py +123 -123
  7. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/agent_handler.py +176 -176
  8. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/agent_lcel.py +107 -107
  9. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/defaut_prompt.py +15 -15
  10. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/feedbacks/feedback_manager.py +66 -66
  11. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/main.py +159 -159
  12. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/models/feedback.py +30 -30
  13. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/nebuly_handler.py +185 -185
  14. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/tools/tool_builder.py +68 -68
  15. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/tools/tool_manager.py +343 -343
  16. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/tools/utils.py +41 -41
  17. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/utils/agent.py +34 -34
  18. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/utils/cms.py +123 -123
  19. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/utils/download.py +183 -183
  20. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/utils/print.py +29 -29
  21. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/generator.py +137 -137
  22. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/integration/shopify.py +147 -143
  23. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/integration/thron.py +236 -236
  24. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/loader/json_loader.py +25 -25
  25. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105/ws_bom_robot_app.egg-info}/PKG-INFO +364 -364
  26. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/MANIFEST.in +0 -0
  27. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/pyproject.toml +0 -0
  28. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/__init__.py +0 -0
  29. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/auth.py +0 -0
  30. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/config.py +0 -0
  31. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/cron_manager.py +0 -0
  32. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/__init__.py +0 -0
  33. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/agent_context.py +0 -0
  34. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/api.py +0 -0
  35. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/evaluator.py +0 -0
  36. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/feedbacks/__init__.py +0 -0
  37. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/models/__init__.py +0 -0
  38. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/models/api.py +0 -0
  39. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/models/base.py +0 -0
  40. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/models/kb.py +0 -0
  41. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/providers/__init__.py +0 -0
  42. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/providers/llm_manager.py +0 -0
  43. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/tools/__init__.py +0 -0
  44. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/tools/models/__init__.py +0 -0
  45. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/tools/models/main.py +0 -0
  46. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/utils/__init__.py +0 -0
  47. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/utils/chunker.py +0 -0
  48. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/utils/cleanup.py +0 -0
  49. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/utils/secrets.py +0 -0
  50. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/utils/webhooks.py +0 -0
  51. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/__init__.py +0 -0
  52. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/db/__init__.py +0 -0
  53. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/db/base.py +0 -0
  54. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/db/chroma.py +0 -0
  55. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/db/faiss.py +0 -0
  56. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/db/manager.py +0 -0
  57. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/db/qdrant.py +0 -0
  58. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/integration/__init__.py +0 -0
  59. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/integration/api.py +0 -0
  60. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/integration/azure.py +0 -0
  61. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/integration/base.py +0 -0
  62. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/integration/confluence.py +0 -0
  63. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/integration/dropbox.py +0 -0
  64. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/integration/gcs.py +0 -0
  65. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/integration/github.py +0 -0
  66. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/integration/googledrive.py +0 -0
  67. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/integration/jira.py +0 -0
  68. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/integration/manager.py +0 -0
  69. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/integration/s3.py +0 -0
  70. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/integration/sftp.py +0 -0
  71. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/integration/sharepoint.py +0 -0
  72. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/integration/sitemap.py +0 -0
  73. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/integration/slack.py +0 -0
  74. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/loader/__init__.py +0 -0
  75. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/loader/base.py +0 -0
  76. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/llm/vector_store/loader/docling.py +0 -0
  77. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/main.py +0 -0
  78. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/subprocess_runner.py +0 -0
  79. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/task_manager.py +0 -0
  80. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app/util.py +0 -0
  81. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app.egg-info/SOURCES.txt +0 -0
  82. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app.egg-info/dependency_links.txt +0 -0
  83. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app.egg-info/requires.txt +0 -0
  84. {ws_bom_robot_app-0.0.104 → ws_bom_robot_app-0.0.105}/ws_bom_robot_app.egg-info/top_level.txt +0 -0
@@ -1,364 +1,364 @@
1
- Metadata-Version: 2.4
2
- Name: ws_bom_robot_app
3
- Version: 0.0.104
4
- Summary: A FastAPI application serving ws bom/robot/llm platform ai.
5
- Home-page: https://github.com/websolutespa/bom
6
- Author: Websolute Spa
7
- Author-email: dev@websolute.it
8
- License: MIT
9
- Classifier: Programming Language :: Python :: 3
10
- Classifier: Operating System :: OS Independent
11
- Requires-Python: >=3.12
12
- Description-Content-Type: text/markdown
13
- Requires-Dist: standardwebhooks==1.0.0
14
- Requires-Dist: apscheduler==3.11.1
15
- Requires-Dist: aiofiles==25.1.0
16
- Requires-Dist: pydantic==2.12.4
17
- Requires-Dist: pydantic-settings==2.12.0
18
- Requires-Dist: fastapi[standard]==0.121.1
19
- Requires-Dist: chevron==0.14.0
20
- Requires-Dist: msoffcrypto-tool==5.4.2
21
- Requires-Dist: langchain==0.3.27
22
- Requires-Dist: langchain-community==0.3.30
23
- Requires-Dist: langchain-core==0.3.76
24
- Requires-Dist: langchain-openai==0.3.33
25
- Requires-Dist: langchain-anthropic==0.3.21
26
- Requires-Dist: langchain-ibm==0.3.18
27
- Requires-Dist: langchain-google-genai==2.1.12
28
- Requires-Dist: langchain-google-vertexai==2.1.2
29
- Requires-Dist: langchain-groq==0.3.8
30
- Requires-Dist: langchain-ollama==0.3.8
31
- Requires-Dist: openevals==0.1.2
32
- Requires-Dist: faiss-cpu==1.12.0
33
- Requires-Dist: chromadb==1.3.4
34
- Requires-Dist: langchain-chroma==0.2.6
35
- Requires-Dist: langchain-qdrant==0.2.1
36
- Requires-Dist: qdrant-client[fastembed]==1.15.1
37
- Requires-Dist: lark==1.3.1
38
- Requires-Dist: unstructured==0.18.18
39
- Requires-Dist: unstructured[image]
40
- Requires-Dist: unstructured-ingest==1.2.21
41
- Requires-Dist: unstructured-ingest[azure]
42
- Requires-Dist: unstructured-ingest[confluence]
43
- Requires-Dist: unstructured-ingest[dropbox]
44
- Requires-Dist: unstructured-ingest[gcs]
45
- Requires-Dist: unstructured-ingest[github]
46
- Requires-Dist: unstructured-ingest[google_drive]
47
- Requires-Dist: unstructured-ingest[jira]
48
- Requires-Dist: unstructured-ingest[s3]
49
- Requires-Dist: unstructured-ingest[sftp]
50
- Requires-Dist: unstructured-ingest[sharepoint]
51
- Requires-Dist: unstructured-ingest[slack]
52
- Requires-Dist: html5lib==1.1
53
- Requires-Dist: markdownify==1.2.0
54
- Requires-Dist: duckduckgo-search==8.1.1
55
- Requires-Dist: langchain-google-community==2.0.10
56
- Requires-Dist: trafilatura==2.0.0
57
- Dynamic: author
58
- Dynamic: author-email
59
- Dynamic: classifier
60
- Dynamic: description
61
- Dynamic: description-content-type
62
- Dynamic: home-page
63
- Dynamic: license
64
- Dynamic: requires-dist
65
- Dynamic: requires-python
66
- Dynamic: summary
67
-
68
- # 🤖 ws-bom-robot-app
69
-
70
- A `FastAPI` application serving ws bom/robot/llm platform ai
71
-
72
- ## 🌵 Minimal app structure
73
-
74
- ```env
75
- app/
76
- |-- .env
77
- |-- main.py
78
- ```
79
-
80
- Fill `main.py` with the following code:
81
-
82
- ```python
83
- from ws_bom_robot_app import main
84
- app = main.app
85
- ```
86
-
87
- Create a `.env` file in the root directory with the following configuration:
88
-
89
- ```properties
90
- # robot configuration
91
- robot_env=development
92
- robot_user=your_username
93
- USER_AGENT=ws-bom-robot-app
94
-
95
- # cms (bowl) configuration
96
- robot_cms_host='http://localhost:4000'
97
- robot_cms_auth='users API-Key your-api-key-here'
98
-
99
- # llm providers: fill one or more of these with your API keys
100
- DEEPSEEK_API_KEY="your-deepseek-api-key"
101
- OPENAI_API_KEY="your-openai-api-key"
102
- GOOGLE_API_KEY="your-google-api-key"
103
- ANTHROPIC_API_KEY="your-anthropic-api-key"
104
- GROQ_API_KEY="your-groq-api-key"
105
- # ibm
106
- WATSONX_URL="https://eu-gb.ml.cloud.ibm.com"
107
- WATSONX_APIKEY="your-watsonx-api-key"
108
- WATSONX_PROJECTID="your-watsonx-project-id"
109
- # gvertex: ensure to mount the file in docker
110
- GOOGLE_APPLICATION_CREDENTIALS="./.data/secrets/google-credentials.json"
111
- ```
112
-
113
- ## 🚀 Run the app
114
-
115
- - development
116
-
117
- ```bash
118
- fastapi dev --port 6001
119
- #uvicorn main:app --app-dir ./ws_bom_robot_app --reload --reload-dir ws_bom_robot_app --host 0.0.0.0 --port 6001
120
- #uvicorn main:app --app-dir ./ws_bom_robot_app --host 0.0.0.0 --port 6001
121
- ```
122
-
123
- - production
124
-
125
- ```bash
126
- uvicorn main:app --host 0.0.0.0 --port 6001
127
- ```
128
-
129
- - production with [multipler workers](https://fastapi.tiangolo.com/deployment/server-workers/#multiple-workers)
130
-
131
- ```bash
132
- fastapi run --port 6001 --workers 4
133
- #uvicorn main:app --host 0.0.0.0 --port 6001 --workers 4
134
- #gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app --bind
135
- ```
136
-
137
- ## 📖 API documentation
138
-
139
- - [swagger](http://localhost:6001/docs)
140
- - [redoc](http://localhost:6001/redoc)
141
-
142
- ---
143
-
144
- ## 🐳 Docker
145
-
146
- dockerize base image
147
-
148
- ```pwsh
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 push ghcr.io/websolutespa/ws-bom-robot-base:cpu
153
- <# 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
- docker push ghcr.io/websolutespa/ws-bom-robot-base:gpu
157
- ```
158
-
159
- dockerize app (from src)
160
-
161
- - cpu
162
- ```pwsh
163
- docker build -f Dockerfile -t ws-bom-robot-app:cpu --build-arg DEVICE=cpu .
164
- docker run --rm -d --name ws-bom-robot-app --env-file .env -p 6001:6001 ws-bom-robot-app:cpu
165
- ```
166
- - gpu
167
- ```pwsh
168
- docker build -f Dockerfile -t ws-bom-robot-app:gpu --build-arg DEVICE=gpu .
169
- docker run --rm -d --name ws-bom-robot-app --gpus all --env-file .env -p 6001:6001 ws-bom-robot-app:gpu
170
- ```
171
-
172
- dockerize app (from latest)
173
-
174
- - cpu
175
- ```pwsh
176
- docker build -f Dockerfile-pkg -t ws-bom-robot-app-pkg:cpu --build-arg DEVICE=cpu .
177
- docker run --rm -d --name ws-bom-robot-app-pkg --env-file .env -p 6001:6001 ws-bom-robot-app-pkg:cpu
178
- ```
179
- - gpu
180
- ```pwsh
181
- docker build -f Dockerfile-pkg -t ws-bom-robot-app-pkg:gpu --build-arg DEVICE=gpu .
182
- docker run --rm -d --name ws-bom-robot-app-pkg --gpus all --env-file .env -p 6001:6001 ws-bom-robot-app-pkg:gpu
183
- <# test gpu: nvidia-smi #>
184
- ```
185
-
186
- docker run mounted to src (dev mode)
187
-
188
- ```pwsh
189
- docker run --rm -d --env-file .env -v "$(pwd)/.data:/app/.data" -p 6001:6001 ws-bom-robot-app fastapi dev ./ws_bom_robot_app/main.py --host 0.0.0.0 --port 6001
190
- docker run --rm -d --env-file .env -v "$(pwd)/.data:/app/.data" -p 6001:6001 ws-bom-robot-app uvicorn ws_bom_robot_app.main:app --reload --host 0.0.0.0 --port 6001
191
- ```
192
-
193
- ---
194
-
195
- ## 🔖 Windows requirements (for RAG functionality only)
196
-
197
- > ⚠️ While it's strongly recommended to use a docker container for development, you can run the app on Windows with the following requirements
198
-
199
- ### libmagic (mandatory)
200
-
201
- ```bash
202
- py -m pip install --upgrade python-magic-bin
203
- ```
204
-
205
- ### tesseract-ocr (mandatory)
206
-
207
- [Install tesseract](https://github.com/UB-Mannheim/tesseract/wiki)
208
- [Last win-64 release](https://github.com/tesseract-ocr/tesseract/releases/download/5.5.0/tesseract-ocr-w64-setup-5.5.0.20241111.exe)
209
-
210
- Add tesseract executable (C:\Program Files\Tesseract-OCR) to system PATH
211
-
212
- ```pwsh
213
- $pathToAdd = "C:\Program Files\Tesseract-OCR"; `
214
- $currentPath = [System.Environment]::GetEnvironmentVariable("Path", [System.EnvironmentVariableTarget]::Machine); `
215
- if ($currentPath -split ';' -notcontains $pathToAdd) { `
216
- [System.Environment]::SetEnvironmentVariable("Path", "$currentPath;$pathToAdd", [System.EnvironmentVariableTarget]::Machine) `
217
- }
218
- ```
219
-
220
- ### docling
221
-
222
- Set the following environment variables
223
-
224
- ```pwsh
225
- KMP_DUPLICATE_LIB_OK=TRUE
226
- ```
227
-
228
- ### libreoffice (optional: for robot_env set to development/production)
229
-
230
- [Install libreoffice](https://www.libreoffice.org/download/download-libreoffice/)
231
- [Last win-64 release](https://download.documentfoundation.org/libreoffice/stable/24.8.2/win/x86_64/LibreOffice_24.8.2_Win_x86-64.msi)
232
-
233
- Add libreoffice executable (C:\Program Files\LibreOffice\program) to system PATH
234
-
235
- ```pwsh
236
- $pathToAdd = "C:\Program Files\LibreOffice\program"; `
237
- $currentPath = [System.Environment]::GetEnvironmentVariable("Path", [System.EnvironmentVariableTarget]::Machine); `
238
- if ($currentPath -split ';' -notcontains $pathToAdd) { `
239
- [System.Environment]::SetEnvironmentVariable("Path", "$currentPath;$pathToAdd", [System.EnvironmentVariableTarget]::Machine) `
240
- }
241
- ```
242
-
243
- ### poppler (optional: for robot_env set to development/production)
244
-
245
- [Download win poppler release](https://github.com/oschwartz10612/poppler-windows/releases)
246
- Extract the zip, copy the nested folder "poppler-x.x.x." to a program folder (e.g. C:\Program Files\poppler-24.08.0)
247
- Add poppler executable (C:\Program Files\poppler-24.08.0\Library\bin) to system PATH
248
-
249
- ```pwsh
250
- $pathToAdd = "C:\Program Files\poppler-24.08.0\Library\bin"; `
251
- $currentPath = [System.Environment]::GetEnvironmentVariable("Path", [System.EnvironmentVariableTarget]::Machine); `
252
- if ($currentPath -split ';' -notcontains $pathToAdd) { `
253
- [System.Environment]::SetEnvironmentVariable("Path", "$currentPath;$pathToAdd", [System.EnvironmentVariableTarget]::Machine) `
254
- }
255
- ```
256
-
257
- ---
258
-
259
- ## 👷 Contributors
260
-
261
- Build/distribute pkg from `websolutespa` bom [[Github](https://github.com/websolutespa/bom)]
262
-
263
- > dir in `robot` project folder
264
-
265
- ```bash
266
- cd ./src/robot
267
- ```
268
-
269
- ### 🔖 requirements
270
-
271
- - install uv venv package management
272
-
273
- ```bash
274
- py -m pip install --upgrade uv
275
- # create venv
276
- uv venv
277
- # activate venv
278
- #win: .venv/Scripts/activate
279
- #linux: source .venv/bin/activate
280
- ```
281
-
282
- - project requirements update
283
-
284
- ```bash
285
- uv pip install --upgrade -r requirements.txt
286
- ```
287
-
288
- - build tools
289
-
290
- ```bash
291
- uv pip install --upgrade setuptools build twine streamlit
292
- ```
293
-
294
- ### 🪛 build
295
-
296
- - clean dist and build package
297
- ```pwsh
298
- if (Test-Path ./dist) {rm ./dist -r -force}; `
299
- py -m build && twine check dist/*
300
- ```
301
- - linux/mac
302
- ```bash
303
- [ -d ./dist ] && rm -rf ./dist
304
- python -m build && twine check dist/*
305
- ```
306
-
307
- ### 📦 test / 🧪 debugger
308
-
309
- Install the package in editable project location
310
-
311
- ```pwsh
312
- uv pip install -U -e .
313
- uv pip show ws-bom-robot-app
314
- ```
315
-
316
- code quality tools
317
-
318
- ```pwsh
319
- # .\src\robot
320
- !py -m uv pip install -U scanreq prospector[with_everything]
321
- ## unused requirements
322
- scanreq -r requirements.txt -p ./ws_bom_robot_app
323
- ## style/linting
324
- prospector ./ws_bom_robot_app -t pylint -t pydocstyle
325
- ## code quality/complexity
326
- prospector ./ws_bom_robot_app -t vulture -t mccabe -t mypy
327
- ## security
328
- prospector ./ws_bom_robot_app -t dodgy -t bandit
329
- ## package
330
- prospector ./ws_bom_robot_app -t pyroma
331
- ```
332
-
333
- #### 🧪 run tests
334
-
335
- ```pwsh
336
- !py -m uv pip install -U pytest pytest-asyncio pytest-mock pytest-cov pyclean
337
- # clean cache if needed
338
- # pyclean --verbose .
339
- pytest --cov=ws_bom_robot_app --log-cli-level=info
340
- # directory
341
- # pytest --cov=ws_bom_robot_app.llm.vector_store --log-cli-level=info ./tests/app/llm/vector_store
342
- ```
343
-
344
- #### 🐞 start debugger
345
-
346
- ```pwsh
347
- streamlit run debugger.py --server.port 8051
348
- ```
349
-
350
- ### ✈️ publish
351
-
352
- - [testpypi](https://test.pypi.org/project/ws-bom-robot-app/)
353
-
354
- ```pwsh
355
- twine upload --verbose -r testpypi dist/*
356
- #pip install -i https://test.pypi.org/simple/ -U ws-bom-robot-app
357
- ```
358
-
359
- - [pypi](https://pypi.org/project/ws-bom-robot-app/)
360
-
361
- ```pwsh
362
- twine upload --verbose dist/*
363
-
364
- ```
1
+ Metadata-Version: 2.4
2
+ Name: ws_bom_robot_app
3
+ Version: 0.0.105
4
+ Summary: A FastAPI application serving ws bom/robot/llm platform ai.
5
+ Home-page: https://github.com/websolutespa/bom
6
+ Author: Websolute Spa
7
+ Author-email: dev@websolute.it
8
+ License: MIT
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.12
12
+ Description-Content-Type: text/markdown
13
+ Requires-Dist: standardwebhooks==1.0.0
14
+ Requires-Dist: apscheduler==3.11.1
15
+ Requires-Dist: aiofiles==25.1.0
16
+ Requires-Dist: pydantic==2.12.4
17
+ Requires-Dist: pydantic-settings==2.12.0
18
+ Requires-Dist: fastapi[standard]==0.121.1
19
+ Requires-Dist: chevron==0.14.0
20
+ Requires-Dist: msoffcrypto-tool==5.4.2
21
+ Requires-Dist: langchain==0.3.27
22
+ Requires-Dist: langchain-community==0.3.30
23
+ Requires-Dist: langchain-core==0.3.76
24
+ Requires-Dist: langchain-openai==0.3.33
25
+ Requires-Dist: langchain-anthropic==0.3.21
26
+ Requires-Dist: langchain-ibm==0.3.18
27
+ Requires-Dist: langchain-google-genai==2.1.12
28
+ Requires-Dist: langchain-google-vertexai==2.1.2
29
+ Requires-Dist: langchain-groq==0.3.8
30
+ Requires-Dist: langchain-ollama==0.3.8
31
+ Requires-Dist: openevals==0.1.2
32
+ Requires-Dist: faiss-cpu==1.12.0
33
+ Requires-Dist: chromadb==1.3.4
34
+ Requires-Dist: langchain-chroma==0.2.6
35
+ Requires-Dist: langchain-qdrant==0.2.1
36
+ Requires-Dist: qdrant-client[fastembed]==1.15.1
37
+ Requires-Dist: lark==1.3.1
38
+ Requires-Dist: unstructured==0.18.18
39
+ Requires-Dist: unstructured[image]
40
+ Requires-Dist: unstructured-ingest==1.2.21
41
+ Requires-Dist: unstructured-ingest[azure]
42
+ Requires-Dist: unstructured-ingest[confluence]
43
+ Requires-Dist: unstructured-ingest[dropbox]
44
+ Requires-Dist: unstructured-ingest[gcs]
45
+ Requires-Dist: unstructured-ingest[github]
46
+ Requires-Dist: unstructured-ingest[google_drive]
47
+ Requires-Dist: unstructured-ingest[jira]
48
+ Requires-Dist: unstructured-ingest[s3]
49
+ Requires-Dist: unstructured-ingest[sftp]
50
+ Requires-Dist: unstructured-ingest[sharepoint]
51
+ Requires-Dist: unstructured-ingest[slack]
52
+ Requires-Dist: html5lib==1.1
53
+ Requires-Dist: markdownify==1.2.0
54
+ Requires-Dist: duckduckgo-search==8.1.1
55
+ Requires-Dist: langchain-google-community==2.0.10
56
+ Requires-Dist: trafilatura==2.0.0
57
+ Dynamic: author
58
+ Dynamic: author-email
59
+ Dynamic: classifier
60
+ Dynamic: description
61
+ Dynamic: description-content-type
62
+ Dynamic: home-page
63
+ Dynamic: license
64
+ Dynamic: requires-dist
65
+ Dynamic: requires-python
66
+ Dynamic: summary
67
+
68
+ # 🤖 ws-bom-robot-app
69
+
70
+ A `FastAPI` application serving ws bom/robot/llm platform ai
71
+
72
+ ## 🌵 Minimal app structure
73
+
74
+ ```env
75
+ app/
76
+ |-- .env
77
+ |-- main.py
78
+ ```
79
+
80
+ Fill `main.py` with the following code:
81
+
82
+ ```python
83
+ from ws_bom_robot_app import main
84
+ app = main.app
85
+ ```
86
+
87
+ Create a `.env` file in the root directory with the following configuration:
88
+
89
+ ```properties
90
+ # robot configuration
91
+ robot_env=development
92
+ robot_user=your_username
93
+ USER_AGENT=ws-bom-robot-app
94
+
95
+ # cms (bowl) configuration
96
+ robot_cms_host='http://localhost:4000'
97
+ robot_cms_auth='users API-Key your-api-key-here'
98
+
99
+ # llm providers: fill one or more of these with your API keys
100
+ DEEPSEEK_API_KEY="your-deepseek-api-key"
101
+ OPENAI_API_KEY="your-openai-api-key"
102
+ GOOGLE_API_KEY="your-google-api-key"
103
+ ANTHROPIC_API_KEY="your-anthropic-api-key"
104
+ GROQ_API_KEY="your-groq-api-key"
105
+ # ibm
106
+ WATSONX_URL="https://eu-gb.ml.cloud.ibm.com"
107
+ WATSONX_APIKEY="your-watsonx-api-key"
108
+ WATSONX_PROJECTID="your-watsonx-project-id"
109
+ # gvertex: ensure to mount the file in docker
110
+ GOOGLE_APPLICATION_CREDENTIALS="./.data/secrets/google-credentials.json"
111
+ ```
112
+
113
+ ## 🚀 Run the app
114
+
115
+ - development
116
+
117
+ ```bash
118
+ fastapi dev --port 6001
119
+ #uvicorn main:app --app-dir ./ws_bom_robot_app --reload --reload-dir ws_bom_robot_app --host 0.0.0.0 --port 6001
120
+ #uvicorn main:app --app-dir ./ws_bom_robot_app --host 0.0.0.0 --port 6001
121
+ ```
122
+
123
+ - production
124
+
125
+ ```bash
126
+ uvicorn main:app --host 0.0.0.0 --port 6001
127
+ ```
128
+
129
+ - production with [multipler workers](https://fastapi.tiangolo.com/deployment/server-workers/#multiple-workers)
130
+
131
+ ```bash
132
+ fastapi run --port 6001 --workers 4
133
+ #uvicorn main:app --host 0.0.0.0 --port 6001 --workers 4
134
+ #gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app --bind
135
+ ```
136
+
137
+ ## 📖 API documentation
138
+
139
+ - [swagger](http://localhost:6001/docs)
140
+ - [redoc](http://localhost:6001/redoc)
141
+
142
+ ---
143
+
144
+ ## 🐳 Docker
145
+
146
+ dockerize base image
147
+
148
+ ```pwsh
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 push ghcr.io/websolutespa/ws-bom-robot-base:cpu
153
+ <# 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
+ docker push ghcr.io/websolutespa/ws-bom-robot-base:gpu
157
+ ```
158
+
159
+ dockerize app (from src)
160
+
161
+ - cpu
162
+ ```pwsh
163
+ docker build -f Dockerfile -t ws-bom-robot-app:cpu --build-arg DEVICE=cpu .
164
+ docker run --rm -d --name ws-bom-robot-app --env-file .env -p 6001:6001 ws-bom-robot-app:cpu
165
+ ```
166
+ - gpu
167
+ ```pwsh
168
+ docker build -f Dockerfile -t ws-bom-robot-app:gpu --build-arg DEVICE=gpu .
169
+ docker run --rm -d --name ws-bom-robot-app --gpus all --env-file .env -p 6001:6001 ws-bom-robot-app:gpu
170
+ ```
171
+
172
+ dockerize app (from latest)
173
+
174
+ - cpu
175
+ ```pwsh
176
+ docker build -f Dockerfile-pkg -t ws-bom-robot-app-pkg:cpu --build-arg DEVICE=cpu .
177
+ docker run --rm -d --name ws-bom-robot-app-pkg --env-file .env -p 6001:6001 ws-bom-robot-app-pkg:cpu
178
+ ```
179
+ - gpu
180
+ ```pwsh
181
+ docker build -f Dockerfile-pkg -t ws-bom-robot-app-pkg:gpu --build-arg DEVICE=gpu .
182
+ docker run --rm -d --name ws-bom-robot-app-pkg --gpus all --env-file .env -p 6001:6001 ws-bom-robot-app-pkg:gpu
183
+ <# test gpu: nvidia-smi #>
184
+ ```
185
+
186
+ docker run mounted to src (dev mode)
187
+
188
+ ```pwsh
189
+ docker run --rm -d --env-file .env -v "$(pwd)/.data:/app/.data" -p 6001:6001 ws-bom-robot-app fastapi dev ./ws_bom_robot_app/main.py --host 0.0.0.0 --port 6001
190
+ docker run --rm -d --env-file .env -v "$(pwd)/.data:/app/.data" -p 6001:6001 ws-bom-robot-app uvicorn ws_bom_robot_app.main:app --reload --host 0.0.0.0 --port 6001
191
+ ```
192
+
193
+ ---
194
+
195
+ ## 🔖 Windows requirements (for RAG functionality only)
196
+
197
+ > ⚠️ While it's strongly recommended to use a docker container for development, you can run the app on Windows with the following requirements
198
+
199
+ ### libmagic (mandatory)
200
+
201
+ ```bash
202
+ py -m pip install --upgrade python-magic-bin
203
+ ```
204
+
205
+ ### tesseract-ocr (mandatory)
206
+
207
+ [Install tesseract](https://github.com/UB-Mannheim/tesseract/wiki)
208
+ [Last win-64 release](https://github.com/tesseract-ocr/tesseract/releases/download/5.5.0/tesseract-ocr-w64-setup-5.5.0.20241111.exe)
209
+
210
+ Add tesseract executable (C:\Program Files\Tesseract-OCR) to system PATH
211
+
212
+ ```pwsh
213
+ $pathToAdd = "C:\Program Files\Tesseract-OCR"; `
214
+ $currentPath = [System.Environment]::GetEnvironmentVariable("Path", [System.EnvironmentVariableTarget]::Machine); `
215
+ if ($currentPath -split ';' -notcontains $pathToAdd) { `
216
+ [System.Environment]::SetEnvironmentVariable("Path", "$currentPath;$pathToAdd", [System.EnvironmentVariableTarget]::Machine) `
217
+ }
218
+ ```
219
+
220
+ ### docling
221
+
222
+ Set the following environment variables
223
+
224
+ ```pwsh
225
+ KMP_DUPLICATE_LIB_OK=TRUE
226
+ ```
227
+
228
+ ### libreoffice (optional: for robot_env set to development/production)
229
+
230
+ [Install libreoffice](https://www.libreoffice.org/download/download-libreoffice/)
231
+ [Last win-64 release](https://download.documentfoundation.org/libreoffice/stable/24.8.2/win/x86_64/LibreOffice_24.8.2_Win_x86-64.msi)
232
+
233
+ Add libreoffice executable (C:\Program Files\LibreOffice\program) to system PATH
234
+
235
+ ```pwsh
236
+ $pathToAdd = "C:\Program Files\LibreOffice\program"; `
237
+ $currentPath = [System.Environment]::GetEnvironmentVariable("Path", [System.EnvironmentVariableTarget]::Machine); `
238
+ if ($currentPath -split ';' -notcontains $pathToAdd) { `
239
+ [System.Environment]::SetEnvironmentVariable("Path", "$currentPath;$pathToAdd", [System.EnvironmentVariableTarget]::Machine) `
240
+ }
241
+ ```
242
+
243
+ ### poppler (optional: for robot_env set to development/production)
244
+
245
+ [Download win poppler release](https://github.com/oschwartz10612/poppler-windows/releases)
246
+ Extract the zip, copy the nested folder "poppler-x.x.x." to a program folder (e.g. C:\Program Files\poppler-24.08.0)
247
+ Add poppler executable (C:\Program Files\poppler-24.08.0\Library\bin) to system PATH
248
+
249
+ ```pwsh
250
+ $pathToAdd = "C:\Program Files\poppler-24.08.0\Library\bin"; `
251
+ $currentPath = [System.Environment]::GetEnvironmentVariable("Path", [System.EnvironmentVariableTarget]::Machine); `
252
+ if ($currentPath -split ';' -notcontains $pathToAdd) { `
253
+ [System.Environment]::SetEnvironmentVariable("Path", "$currentPath;$pathToAdd", [System.EnvironmentVariableTarget]::Machine) `
254
+ }
255
+ ```
256
+
257
+ ---
258
+
259
+ ## 👷 Contributors
260
+
261
+ Build/distribute pkg from `websolutespa` bom [[Github](https://github.com/websolutespa/bom)]
262
+
263
+ > dir in `robot` project folder
264
+
265
+ ```bash
266
+ cd ./src/robot
267
+ ```
268
+
269
+ ### 🔖 requirements
270
+
271
+ - install uv venv package management
272
+
273
+ ```bash
274
+ py -m pip install --upgrade uv
275
+ # create venv
276
+ uv venv
277
+ # activate venv
278
+ #win: .venv/Scripts/activate
279
+ #linux: source .venv/bin/activate
280
+ ```
281
+
282
+ - project requirements update
283
+
284
+ ```bash
285
+ uv pip install --upgrade -r requirements.txt
286
+ ```
287
+
288
+ - build tools
289
+
290
+ ```bash
291
+ uv pip install --upgrade setuptools build twine streamlit
292
+ ```
293
+
294
+ ### 🪛 build
295
+
296
+ - clean dist and build package
297
+ ```pwsh
298
+ if (Test-Path ./dist) {rm ./dist -r -force}; `
299
+ py -m build && twine check dist/*
300
+ ```
301
+ - linux/mac
302
+ ```bash
303
+ [ -d ./dist ] && rm -rf ./dist
304
+ python -m build && twine check dist/*
305
+ ```
306
+
307
+ ### 📦 test / 🧪 debugger
308
+
309
+ Install the package in editable project location
310
+
311
+ ```pwsh
312
+ uv pip install -U -e .
313
+ uv pip show ws-bom-robot-app
314
+ ```
315
+
316
+ code quality tools
317
+
318
+ ```pwsh
319
+ # .\src\robot
320
+ uv pip install -U scanreq prospector[with_everything]
321
+ ## unused requirements
322
+ scanreq -r requirements.txt -p ./ws_bom_robot_app
323
+ ## style/linting
324
+ prospector ./ws_bom_robot_app -t pylint -t pydocstyle
325
+ ## code quality/complexity
326
+ prospector ./ws_bom_robot_app -t vulture -t mccabe -t mypy
327
+ ## security
328
+ prospector ./ws_bom_robot_app -t dodgy -t bandit
329
+ ## package
330
+ prospector ./ws_bom_robot_app -t pyroma
331
+ ```
332
+
333
+ #### 🧪 run tests
334
+
335
+ ```pwsh
336
+ uv pip install -U pytest pytest-asyncio pytest-mock pytest-cov pyclean
337
+ # clean cache if needed
338
+ # pyclean --verbose .
339
+ pytest --cov=ws_bom_robot_app --log-cli-level=info
340
+ # directory
341
+ # pytest --cov=ws_bom_robot_app.llm.vector_store --log-cli-level=info ./tests/app/llm/vector_store
342
+ ```
343
+
344
+ #### 🐞 start debugger
345
+
346
+ ```pwsh
347
+ streamlit run debugger.py --server.port 8051
348
+ ```
349
+
350
+ ### ✈️ publish
351
+
352
+ - [testpypi](https://test.pypi.org/project/ws-bom-robot-app/)
353
+
354
+ ```pwsh
355
+ twine upload --verbose -r testpypi dist/*
356
+ #pip install -i https://test.pypi.org/simple/ -U ws-bom-robot-app
357
+ ```
358
+
359
+ - [pypi](https://pypi.org/project/ws-bom-robot-app/)
360
+
361
+ ```pwsh
362
+ twine upload --verbose dist/*
363
+
364
+ ```