projectdavid 1.0.24__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 (55) hide show
  1. projectdavid-1.0.24/CHANGELOG.md +256 -0
  2. projectdavid-1.0.24/MANIFEST.in +9 -0
  3. projectdavid-1.0.24/PKG-INFO +147 -0
  4. projectdavid-1.0.24/README.md +113 -0
  5. projectdavid-1.0.24/docs/assistants.md +46 -0
  6. projectdavid-1.0.24/docs/code_interpretation.md +32 -0
  7. projectdavid-1.0.24/docs/code_interpreter0.png +0 -0
  8. projectdavid-1.0.24/docs/code_interpreter3.png +0 -0
  9. projectdavid-1.0.24/docs/database.md +5 -0
  10. projectdavid-1.0.24/docs/docker_comtainers.md +22 -0
  11. projectdavid-1.0.24/docs/files.md +97 -0
  12. projectdavid-1.0.24/docs/function_calling.md +155 -0
  13. projectdavid-1.0.24/docs/function_calling0.png +0 -0
  14. projectdavid-1.0.24/docs/function_calling1.png +0 -0
  15. projectdavid-1.0.24/docs/inference.md +252 -0
  16. projectdavid-1.0.24/docs/messages.md +68 -0
  17. projectdavid-1.0.24/docs/run0.png +0 -0
  18. projectdavid-1.0.24/docs/runs.md +77 -0
  19. projectdavid-1.0.24/docs/threads.md +33 -0
  20. projectdavid-1.0.24/docs/users.md +61 -0
  21. projectdavid-1.0.24/docs/vector_store.md +144 -0
  22. projectdavid-1.0.24/docs/versioning.md +64 -0
  23. projectdavid-1.0.24/pyproject.toml +49 -0
  24. projectdavid-1.0.24/setup.cfg +4 -0
  25. projectdavid-1.0.24/src/entities/__init__.py +6 -0
  26. projectdavid-1.0.24/src/entities/_version.py +4 -0
  27. projectdavid-1.0.24/src/entities/clients/actions.py +191 -0
  28. projectdavid-1.0.24/src/entities/clients/assistants.py +217 -0
  29. projectdavid-1.0.24/src/entities/clients/base_vector_store.py +81 -0
  30. projectdavid-1.0.24/src/entities/clients/event_handler.py +0 -0
  31. projectdavid-1.0.24/src/entities/clients/file_processor.py +475 -0
  32. projectdavid-1.0.24/src/entities/clients/files.py +282 -0
  33. projectdavid-1.0.24/src/entities/clients/inference.py +200 -0
  34. projectdavid-1.0.24/src/entities/clients/messages.py +466 -0
  35. projectdavid-1.0.24/src/entities/clients/runs.py +354 -0
  36. projectdavid-1.0.24/src/entities/clients/synchronous_inference_stream.py +68 -0
  37. projectdavid-1.0.24/src/entities/clients/threads.py +195 -0
  38. projectdavid-1.0.24/src/entities/clients/tools.py +283 -0
  39. projectdavid-1.0.24/src/entities/clients/users.py +135 -0
  40. projectdavid-1.0.24/src/entities/clients/vector_store_manager.py +298 -0
  41. projectdavid-1.0.24/src/entities/clients/vectors.py +891 -0
  42. projectdavid-1.0.24/src/entities/constants/platform.py +4 -0
  43. projectdavid-1.0.24/src/entities/entities.py +150 -0
  44. projectdavid-1.0.24/src/entities/events.py +19 -0
  45. projectdavid-1.0.24/src/entities/serializers.py +87 -0
  46. projectdavid-1.0.24/src/entities/services/logging_service.py +71 -0
  47. projectdavid-1.0.24/src/entities/utils/__init__.py +0 -0
  48. projectdavid-1.0.24/src/entities/utils/monitor_launcher.py +81 -0
  49. projectdavid-1.0.24/src/entities/utils/run_monitor.py +99 -0
  50. projectdavid-1.0.24/src/projectdavid.egg-info/PKG-INFO +147 -0
  51. projectdavid-1.0.24/src/projectdavid.egg-info/SOURCES.txt +53 -0
  52. projectdavid-1.0.24/src/projectdavid.egg-info/dependency_links.txt +1 -0
  53. projectdavid-1.0.24/src/projectdavid.egg-info/requires.txt +18 -0
  54. projectdavid-1.0.24/src/projectdavid.egg-info/top_level.txt +1 -0
  55. projectdavid-1.0.24/tests/test_clients.py +22 -0
@@ -0,0 +1,256 @@
1
+ ## [1.0.24](https://github.com/frankie336/entitites_sdk/compare/v1.0.23...v1.0.24) (2025-04-08)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * name change-projectdavid ([0632dc7](https://github.com/frankie336/entitites_sdk/commit/0632dc74fc7b3a500365b95cde21c9dbc6d3e4fc))
7
+
8
+ ## [1.0.23](https://github.com/frankie336/entitites_sdk/compare/v1.0.22...v1.0.23) (2025-04-08)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * name change ([0c7d4dd](https://github.com/frankie336/entitites_sdk/commit/0c7d4ddd04538ee0d089bbf96e1aaffd65e67e81))
14
+
15
+ ## [1.0.22](https://github.com/frankie336/entitites_sdk/compare/v1.0.21...v1.0.22) (2025-04-08)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * name change ([654c9e9](https://github.com/frankie336/entitites_sdk/commit/654c9e936bf28d7e0c754c93ca9f5d68b16b4f36))
21
+
22
+ ## [1.0.21](https://github.com/frankie336/entitites_sdk/compare/v1.0.20...v1.0.21) (2025-04-08)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * workflow ([583145e](https://github.com/frankie336/entitites_sdk/commit/583145ec50ca882332613e802ae0c5f55c9122ce))
28
+
29
+ ## [1.0.20](https://github.com/frankie336/entitites_sdk/compare/v1.0.19...v1.0.20) (2025-04-08)
30
+
31
+
32
+ ### Bug Fixes
33
+
34
+ * black formatting. ([34572e3](https://github.com/frankie336/entitites_sdk/commit/34572e32c5858bda4b19efbc21455609d79a2c84))
35
+ * conditional release in ci. ([22242ee](https://github.com/frankie336/entitites_sdk/commit/22242ee05ea0ca5552b82d56c7ac7fcb2bba0ad7))
36
+ * def _internal_add_file_to_vector_store_async-validation-type ([fa97c40](https://github.com/frankie336/entitites_sdk/commit/fa97c4064ea542601199b117f6c4a1d6a6e69fa6))
37
+ * entities release.json ([884a2b5](https://github.com/frankie336/entitites_sdk/commit/884a2b56aa6d864dab45a718ae135bcef7206895))
38
+ * entities release.json2 ([8c0c8d6](https://github.com/frankie336/entitites_sdk/commit/8c0c8d6c078fa04c4aeb230a1680e430c379c7a4))
39
+ * entities release.json3 ([0c09a5f](https://github.com/frankie336/entitites_sdk/commit/0c09a5ff942cfd02b86906feb8cb8775e02a6a08))
40
+ * entities version in requirements.txt. ([34d7394](https://github.com/frankie336/entitites_sdk/commit/34d7394199b86692ef4ddaa4b5c6cd721afefe81))
41
+ * entities version in requirements.txt2. ([bd47a4c](https://github.com/frankie336/entitites_sdk/commit/bd47a4c8071fedec21c7418c5c7da5c3ee76711b))
42
+ * entities version in requirements.txt3. ([3d49ff9](https://github.com/frankie336/entitites_sdk/commit/3d49ff9d20271c6bb02f01f622e7b8bffdb81d24))
43
+ * entities_common version. ([edd6cd2](https://github.com/frankie336/entitites_sdk/commit/edd6cd24bf5d3fd16c2fa159316e166f347605d6))
44
+ * isort ([072f3c4](https://github.com/frankie336/entitites_sdk/commit/072f3c430903c778d8504524f4b220d99aaaa0a3))
45
+ * isort import order ([6595b0d](https://github.com/frankie336/entitites_sdk/commit/6595b0d7e1ba800d06e85f32d3dfa793541ff9b6))
46
+ * isort imports ([0a16a41](https://github.com/frankie336/entitites_sdk/commit/0a16a41b68160f7afffe1d951879ad01d9f84c55))
47
+ * isort imports3 ([fe515b1](https://github.com/frankie336/entitites_sdk/commit/fe515b14e804b4381eed23e2568a980b051c76ed))
48
+ * publish ([6eee97a](https://github.com/frankie336/entitites_sdk/commit/6eee97ad114cd4f119a9e6610b8981c8739d9eaa))
49
+ * remove non release branch from CI logic ([4e37ece](https://github.com/frankie336/entitites_sdk/commit/4e37ece55899dd64ee666cb6327393d5fc9316f2))
50
+ * remove non release branch from CI logic2 ([db1bb94](https://github.com/frankie336/entitites_sdk/commit/db1bb9422cc70326001f14ee82df4963c6c3a954))
51
+ * run black formatting. ([babcdf1](https://github.com/frankie336/entitites_sdk/commit/babcdf178ee3ce5e159b890dca64a10350f2e70e))
52
+ * scripts/update_pyproject_version.py ([ee62a49](https://github.com/frankie336/entitites_sdk/commit/ee62a49866c1a36058e56ca801556a0c533b95d1))
53
+ * toml file path ([f1ec5b4](https://github.com/frankie336/entitites_sdk/commit/f1ec5b4df7c5ad02cf811f5fb9dcd956045defe6))
54
+
55
+ ## [1.0.19](https://github.com/frankie336/entitites_sdk/compare/v1.0.18...v1.0.19) (2025-04-07)
56
+
57
+
58
+ ### Bug Fixes
59
+
60
+ * def _internal_add_file_to_vector_store_async-validation-type ([bd21178](https://github.com/frankie336/entitites_sdk/commit/bd2117874842e52d403aff905cc44944166ac46d))
61
+
62
+ ## [1.0.18](https://github.com/frankie336/entitites_sdk/compare/v1.0.17...v1.0.18) (2025-04-07)
63
+
64
+
65
+ ### Bug Fixes
66
+
67
+ * def _internal_add_file_to_vector_store_async ([60e88b3](https://github.com/frankie336/entitites_sdk/commit/60e88b35cf53aad55c17d4376282c5aa5c689efa))
68
+
69
+ ## [1.0.17](https://github.com/frankie336/entitites_sdk/compare/v1.0.16...v1.0.17) (2025-04-07)
70
+
71
+
72
+ ### Bug Fixes
73
+
74
+ * store_name param ([3fc8b50](https://github.com/frankie336/entitites_sdk/commit/3fc8b5047b103b1860c26cbe82efa77cdd1bda91))
75
+
76
+ ## [1.0.16](https://github.com/frankie336/entitites_sdk/compare/v1.0.15...v1.0.16) (2025-04-07)
77
+
78
+
79
+ ### Bug Fixes
80
+
81
+ * store_name param ([d991581](https://github.com/frankie336/entitites_sdk/commit/d9915812dae6aa00d819b81f62a49a09154ee348))
82
+
83
+ ## [1.0.15](https://github.com/frankie336/entitites_sdk/compare/v1.0.14...v1.0.15) (2025-04-06)
84
+
85
+
86
+ ### Bug Fixes
87
+
88
+ * Vector store collection name issue ([eed4db5](https://github.com/frankie336/entitites_sdk/commit/eed4db5c3dcffbdc5a9b11d3495bec3e18706825))
89
+
90
+ ## [1.0.14](https://github.com/frankie336/entitites_sdk/compare/v1.0.13...v1.0.14) (2025-04-06)
91
+
92
+
93
+ ### Bug Fixes
94
+
95
+ * Migrate vector store endpoints ([7efbeea](https://github.com/frankie336/entitites_sdk/commit/7efbeeaebf0306f7f6d6d62c47f878e586c161d9))
96
+
97
+ ## [1.0.13](https://github.com/frankie336/entitites_sdk/compare/v1.0.12...v1.0.13) (2025-04-06)
98
+
99
+
100
+ ### Bug Fixes
101
+
102
+ * add sentence-transformers dependency to toml ([0c684b5](https://github.com/frankie336/entitites_sdk/commit/0c684b558c2c8b1b018ddd0a52b2052ee5ae4b99))
103
+
104
+ ## [1.0.12](https://github.com/frankie336/entitites_sdk/compare/v1.0.11...v1.0.12) (2025-04-06)
105
+
106
+
107
+ ### Bug Fixes
108
+
109
+ * add validators dependency ([2c52f21](https://github.com/frankie336/entitites_sdk/commit/2c52f212035ed9245540d93df064aedf4a2cb7e0))
110
+
111
+ ## [1.0.11](https://github.com/frankie336/entitites_sdk/compare/v1.0.10...v1.0.11) (2025-04-06)
112
+
113
+
114
+ ### Bug Fixes
115
+
116
+ * README.md with correct badge ([a59df73](https://github.com/frankie336/entitites_sdk/commit/a59df73a289e5847d2246686da448ab1d4ad257c))
117
+
118
+ ## [1.0.10](https://github.com/frankie336/entitites_sdk/compare/v1.0.9...v1.0.10) (2025-04-06)
119
+
120
+
121
+ ### Bug Fixes
122
+
123
+ * Add missing dependencies to toml ([5a78cdc](https://github.com/frankie336/entitites_sdk/commit/5a78cdc170390ffcc95f85aba000e9868a7d33db))
124
+
125
+ ## [1.0.9](https://github.com/frankie336/entitites_sdk/compare/v1.0.8...v1.0.9) (2025-04-06)
126
+
127
+
128
+ ### Bug Fixes
129
+
130
+ * _version.py relative import error ([96a5be4](https://github.com/frankie336/entitites_sdk/commit/96a5be4dd5ad85bb158332c7ca86dfe87151af31))
131
+
132
+ ## [1.0.8](https://github.com/frankie336/entitites_sdk/compare/v1.0.7...v1.0.8) (2025-04-06)
133
+
134
+
135
+ ### Bug Fixes
136
+
137
+ * test_tag_release.yml ([53bb318](https://github.com/frankie336/entitites_sdk/commit/53bb3186d60dfc38ba76c3180cc064a3f193d42e))
138
+
139
+ ## [1.0.7](https://github.com/frankie336/entitites_sdk/compare/v1.0.6...v1.0.7) (2025-04-06)
140
+
141
+
142
+ ### Bug Fixes
143
+
144
+ * update workflow to use new trusted publisher and build flow ([1179def](https://github.com/frankie336/entitites_sdk/commit/1179def6e74ef2cbcb4dc570cd76d239ad84e1b2))
145
+
146
+ ## [1.0.6](https://github.com/frankie336/entitites_sdk/compare/v1.0.5...v1.0.6) (2025-04-06)
147
+
148
+
149
+ ### Bug Fixes
150
+
151
+ * align pyproject version to v1.0.5 ([e8d12e0](https://github.com/frankie336/entitites_sdk/commit/e8d12e0e86f46d745a8b8731c7e663180e04c143))
152
+
153
+ ## [1.0.5](https://github.com/frankie336/entitites_sdk/compare/v1.0.4...v1.0.5) (2025-04-06)
154
+
155
+
156
+ ### Bug Fixes
157
+
158
+ * bump version to 1.0.4 ([37650d9](https://github.com/frankie336/entitites_sdk/commit/37650d948585fa3e176016b49dcad2967c83a4f2))
159
+ * Test workflow-8 ([cc0c25e](https://github.com/frankie336/entitites_sdk/commit/cc0c25ef60732bd28d5d70ad6554745439124cf4))
160
+
161
+ ## [1.0.4](https://github.com/frankie336/entitites_sdk/compare/v1.0.3...v1.0.4) (2025-04-06)
162
+
163
+
164
+ ### Bug Fixes
165
+
166
+ * Test workflow-3 ([0fb760c](https://github.com/frankie336/entitites_sdk/commit/0fb760c0a3dbc2a7e43256ad891e900808cf0eac))
167
+
168
+ ## [1.0.3](https://github.com/frankie336/entitites_sdk/compare/v1.0.2...v1.0.3) (2025-04-06)
169
+
170
+
171
+ ### Bug Fixes
172
+
173
+ * Test workflow-2 ([cc8730f](https://github.com/frankie336/entitites_sdk/commit/cc8730f290b2b2a3ff10f3fc76092650debcbb5f))
174
+
175
+ ## [1.0.2](https://github.com/frankie336/entitites_sdk/compare/v1.0.1...v1.0.2) (2025-04-06)
176
+
177
+
178
+ ### Bug Fixes
179
+
180
+ * Test workflow ([afc8e6b](https://github.com/frankie336/entitites_sdk/commit/afc8e6b4e036baa5f4a66a5bf8bed62c2ec2fde7))
181
+
182
+ ## [1.0.1](https://github.com/frankie336/entitites_sdk/compare/v1.0.0...v1.0.1) (2025-04-06)
183
+
184
+
185
+ ### Bug Fixes
186
+
187
+ * entities_common version issue again ([6dc6c45](https://github.com/frankie336/entitites_sdk/commit/6dc6c4500c81e61278bdb0254881cc1dfc537798))
188
+
189
+ # 1.0.0 (2025-04-06)
190
+
191
+
192
+ ### Bug Fixes
193
+
194
+ * Fix auto release ([a9a1b2e](https://github.com/frankie336/entitites_sdk/commit/a9a1b2e0d03a707be0510e171fd57cb0c3c7d5f2))
195
+ * Require latest entities_common in toml ([6ca402b](https://github.com/frankie336/entitites_sdk/commit/6ca402b0532946eef68e93862324d281e181cc39))
196
+ * resolve entities_common version issue ([6b64ef6](https://github.com/frankie336/entitites_sdk/commit/6b64ef6bdde7f21245a728d106d3f95daa1422b9))
197
+
198
+
199
+ ### Features
200
+
201
+ * add support for auto version tagging ([5ea9aed](https://github.com/frankie336/entitites_sdk/commit/5ea9aed79fa4f37789c463458409126d60da2388))
202
+
203
+ # Changelog
204
+
205
+ All notable changes to this project will be documented in this file.
206
+
207
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
208
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
209
+
210
+ ---
211
+
212
+ ## [0.3.1] - 2025-04-05
213
+
214
+ ### Added
215
+ - Trusted publishing setup for PyPI and TestPyPI, including GitHub Actions workflow with tag-based trigger.
216
+ - `scripts/pin_entities_common.py`: utility to pin latest commit SHA from `entities_common` into `pyproject.toml` and `requirements.txt`.
217
+ - CI workflow `pin-dependencies.yml` that auto-pins `entities_common` on each push to `main`.
218
+
219
+ ### Fixed
220
+ - Flake8 linting issues across `file_processor.py` due to missing typing imports.
221
+ - `LiteralString` fallback import for Python < 3.11 environments.
222
+ - Typos and inconsistencies in GitHub workflow tags (`test-v*` vs `v*`) that prevented job execution.
223
+
224
+ ### Changed
225
+ - Replaced dynamic `entities_common` Git dependency with pinned SHA references.
226
+ - Made the `publish` workflow fully conformant with [Trusted Publishing](https://docs.pypi.org/trusted-publishers/).
227
+
228
+
229
+
230
+ ## [0.3.0] - 2025-04-04
231
+
232
+ ### Added
233
+ - Introduced `RunMonitorClient` with full lifecycle event handling for assistant runs.
234
+ - Added `EntitiesInternalInterface` as a unified internal service orchestrator.
235
+ - `ActionsClient`, `MessagesClient`, `RunsClient`, and `VectorStoreClient` now wrapped and lazy-loaded under `Entities(...)`.
236
+ - Support for tool invocation streaming with `on_action_required`, `on_tool_invoked`, and `on_complete` callbacks.
237
+ - `code_interpreter_stream` and `file_download_url` support in SSE stream parsing.
238
+
239
+ ### Changed
240
+ - Moved `EntitiesEventHandler` logic from Flask backend into internal API and SDK boundary.
241
+ - enties_common package is now an auto installed dependency. No meed to install it directly.
242
+
243
+ ---
244
+
245
+ ## [0.2.0] - 2025-03-01
246
+
247
+ ### Added
248
+
249
+ ---
250
+
251
+ ## [0.1.0-alpha] - 2025-01-15
252
+
253
+ ### Added
254
+ - Core SDK skeleton: `Entities`, `UsersClient`, `MessagesClient`, etc.
255
+ - Basic message submission and tool output lifecycle.
256
+ - Initial assistant threading and function call support.
@@ -0,0 +1,9 @@
1
+ include README.md
2
+ include LICENSE
3
+ include pyproject.toml
4
+ include _version.py
5
+ include CHANGELOG.md
6
+
7
+ recursive-include src *
8
+ recursive-include docs *
9
+ recursive-exclude * __pycache__ *.pyc *.pyo *.pyd *.so *.dylib *.egg-info
@@ -0,0 +1,147 @@
1
+ Metadata-Version: 2.4
2
+ Name: projectdavid
3
+ Version: 1.0.24
4
+ Summary: Python SDK for interacting with the Entities Assistant API.
5
+ Author-email: Francis Neequaye Armah <francis.neequaye@projectdavid.co.uk>
6
+ License: MIT
7
+ Keywords: AI,SDK,Entities,LLM,Assistant
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Requires-Python: >=3.9
16
+ Description-Content-Type: text/markdown
17
+ Requires-Dist: httpx>=0.24.1
18
+ Requires-Dist: pydantic>=2.0
19
+ Requires-Dist: python-dotenv>=1.0
20
+ Requires-Dist: aiofiles>=23.2.1
21
+ Requires-Dist: ollama>=0.3.0
22
+ Requires-Dist: entities_common>=0.1.14
23
+ Requires-Dist: qdrant-client
24
+ Requires-Dist: pdfplumber
25
+ Requires-Dist: validators
26
+ Requires-Dist: sentence-transformers
27
+ Provides-Extra: dev
28
+ Requires-Dist: black>=23.3; extra == "dev"
29
+ Requires-Dist: isort>=5.12; extra == "dev"
30
+ Requires-Dist: pytest>=7.2; extra == "dev"
31
+ Requires-Dist: mypy>=1.0; extra == "dev"
32
+ Requires-Dist: build; extra == "dev"
33
+ Requires-Dist: twine; extra == "dev"
34
+
35
+ # Entity SDK
36
+ [![Test, Tag, Publish Status](https://github.com/frankie336/entitites_sdk/actions/workflows/test_tag_release.yml/badge.svg)](https://github.com/frankie336/entitites_sdk/actions/workflows/test_tag_release.yml)
37
+
38
+ The **Entity SDK** is a composable, Pythonic interface to the [Entities API](https://github.com/frankie336/entities_api) for building intelligent applications across **local, open-source**, and **cloud LLMs**.
39
+
40
+ It unifies:
41
+
42
+ - Users, threads, assistants, messages, runs, inference
43
+ - **Function calling**, **code interpretation**, and **structured streaming**
44
+ - Vector memory, file uploads, and secure tool orchestration
45
+
46
+ Local inference is fully supported via [Ollama](https://github.com/ollama).
47
+
48
+ ---
49
+
50
+ ## 🔌 Supported Inference Providers
51
+
52
+ | Provider | Type |
53
+ |--------------------------------------------------|--------------------------|
54
+ | [Ollama](https://github.com/ollama) | **Local** (Self-Hosted) |
55
+ | [DeepSeek](https://platform.deepseek.com/) | ☁ **Cloud** (Open-Source) |
56
+ | [Hyperbolic](https://hyperbolic.xyz/) | ☁ **Cloud** (Proprietary) |
57
+ | [OpenAI](https://platform.openai.com/) | ☁ **Cloud** (Proprietary) |
58
+ | [Together AI](https://www.together.ai/) | ☁ **Cloud** (Aggregated) |
59
+ | [Azure Foundry](https://azure.microsoft.com) | ☁ **Cloud** (Enterprise) |
60
+
61
+ ---
62
+
63
+ ## 📦 Installation
64
+
65
+ ```bash
66
+ pip install entities
67
+
68
+ ```
69
+
70
+ ---
71
+
72
+ ## Quick Start
73
+
74
+ ```python
75
+ from entities import Entities
76
+ import os
77
+ from dotenv import load_dotenv
78
+
79
+ load_dotenv()
80
+
81
+ client = Entities(
82
+ base_url='http://localhost:9000',
83
+ api_key=os.getenv("API_KEY")
84
+ )
85
+
86
+ user = client.users.create_user(name="demo_user")
87
+ thread = client.threads.create_thread(participant_ids=[user.id])
88
+ assistant = client.assistants.create_assistant(name="Demo Assistant")
89
+
90
+ message = client.messages.create_message(
91
+ thread_id=thread.id,
92
+ role="user",
93
+ content="Hello, assistant!",
94
+ assistant_id=assistant.id
95
+ )
96
+
97
+ run = client.runs.create_run(
98
+ assistant_id=assistant.id,
99
+ thread_id=thread.id
100
+ )
101
+
102
+ stream = client.inference.stream_inference_response(
103
+ provider="Hyperbolic",
104
+ model="meta-llama/Llama-3.3-70B-Instruct-Turbo",
105
+ thread_id=thread.id,
106
+ message_id=message.id,
107
+ run_id=run.id,
108
+ assistant_id=assistant.id
109
+ )
110
+
111
+ for chunk in stream:
112
+ print(chunk)
113
+ ```
114
+
115
+ ---
116
+
117
+ ## 📚 Documentation
118
+
119
+ | Domain | Link |
120
+ |---------------------|--------------------------------------------------------|
121
+ | Assistants | [assistants.md](/docs/assistants.md) |
122
+ | Threads | [threads.md](/docs/threads.md) |
123
+ | Messages | [messages.md](/docs/messages.md) |
124
+ | Runs | [runs.md](/docs/runs.md) |
125
+ | Inference | [inference.md](/docs/inference.md) |
126
+ | Streaming | [streams.md](/docs/streams.md) |
127
+ | Function Calling | [function_calling.md](/docs/function_calling.md) |
128
+ | Code Interpretation | [code_interpretation.md](/docs/code_interpretation.md) |
129
+ | Files | [files.md](/docs/files.md) |
130
+ | Vector Store(RAG) | [vector_store.md](/docs/vector_store.md) |
131
+ | Versioning | [versioning.md](/docs/versioning.md) |
132
+
133
+ ---
134
+
135
+ ## ✅ Compatibility & Requirements
136
+
137
+ - Python **3.10+**
138
+ - Compatible with **local** or **cloud** deployments of the Entities API
139
+
140
+ ---
141
+
142
+ ## 🌍 Related Repositories
143
+
144
+ - 🔌 [Entities API](https://github.com/frankie336/entities_api) — containerized API backend
145
+ -
146
+ - 📚 [entities_common](https://github.com/frankie336/entities_common) — shared validation, schemas, utilities, and tools.
147
+ This package is auto installed as dependency of entities SDK or entities API.
@@ -0,0 +1,113 @@
1
+ # Entity SDK
2
+ [![Test, Tag, Publish Status](https://github.com/frankie336/entitites_sdk/actions/workflows/test_tag_release.yml/badge.svg)](https://github.com/frankie336/entitites_sdk/actions/workflows/test_tag_release.yml)
3
+
4
+ The **Entity SDK** is a composable, Pythonic interface to the [Entities API](https://github.com/frankie336/entities_api) for building intelligent applications across **local, open-source**, and **cloud LLMs**.
5
+
6
+ It unifies:
7
+
8
+ - Users, threads, assistants, messages, runs, inference
9
+ - **Function calling**, **code interpretation**, and **structured streaming**
10
+ - Vector memory, file uploads, and secure tool orchestration
11
+
12
+ Local inference is fully supported via [Ollama](https://github.com/ollama).
13
+
14
+ ---
15
+
16
+ ## 🔌 Supported Inference Providers
17
+
18
+ | Provider | Type |
19
+ |--------------------------------------------------|--------------------------|
20
+ | [Ollama](https://github.com/ollama) | **Local** (Self-Hosted) |
21
+ | [DeepSeek](https://platform.deepseek.com/) | ☁ **Cloud** (Open-Source) |
22
+ | [Hyperbolic](https://hyperbolic.xyz/) | ☁ **Cloud** (Proprietary) |
23
+ | [OpenAI](https://platform.openai.com/) | ☁ **Cloud** (Proprietary) |
24
+ | [Together AI](https://www.together.ai/) | ☁ **Cloud** (Aggregated) |
25
+ | [Azure Foundry](https://azure.microsoft.com) | ☁ **Cloud** (Enterprise) |
26
+
27
+ ---
28
+
29
+ ## 📦 Installation
30
+
31
+ ```bash
32
+ pip install entities
33
+
34
+ ```
35
+
36
+ ---
37
+
38
+ ## Quick Start
39
+
40
+ ```python
41
+ from entities import Entities
42
+ import os
43
+ from dotenv import load_dotenv
44
+
45
+ load_dotenv()
46
+
47
+ client = Entities(
48
+ base_url='http://localhost:9000',
49
+ api_key=os.getenv("API_KEY")
50
+ )
51
+
52
+ user = client.users.create_user(name="demo_user")
53
+ thread = client.threads.create_thread(participant_ids=[user.id])
54
+ assistant = client.assistants.create_assistant(name="Demo Assistant")
55
+
56
+ message = client.messages.create_message(
57
+ thread_id=thread.id,
58
+ role="user",
59
+ content="Hello, assistant!",
60
+ assistant_id=assistant.id
61
+ )
62
+
63
+ run = client.runs.create_run(
64
+ assistant_id=assistant.id,
65
+ thread_id=thread.id
66
+ )
67
+
68
+ stream = client.inference.stream_inference_response(
69
+ provider="Hyperbolic",
70
+ model="meta-llama/Llama-3.3-70B-Instruct-Turbo",
71
+ thread_id=thread.id,
72
+ message_id=message.id,
73
+ run_id=run.id,
74
+ assistant_id=assistant.id
75
+ )
76
+
77
+ for chunk in stream:
78
+ print(chunk)
79
+ ```
80
+
81
+ ---
82
+
83
+ ## 📚 Documentation
84
+
85
+ | Domain | Link |
86
+ |---------------------|--------------------------------------------------------|
87
+ | Assistants | [assistants.md](/docs/assistants.md) |
88
+ | Threads | [threads.md](/docs/threads.md) |
89
+ | Messages | [messages.md](/docs/messages.md) |
90
+ | Runs | [runs.md](/docs/runs.md) |
91
+ | Inference | [inference.md](/docs/inference.md) |
92
+ | Streaming | [streams.md](/docs/streams.md) |
93
+ | Function Calling | [function_calling.md](/docs/function_calling.md) |
94
+ | Code Interpretation | [code_interpretation.md](/docs/code_interpretation.md) |
95
+ | Files | [files.md](/docs/files.md) |
96
+ | Vector Store(RAG) | [vector_store.md](/docs/vector_store.md) |
97
+ | Versioning | [versioning.md](/docs/versioning.md) |
98
+
99
+ ---
100
+
101
+ ## ✅ Compatibility & Requirements
102
+
103
+ - Python **3.10+**
104
+ - Compatible with **local** or **cloud** deployments of the Entities API
105
+
106
+ ---
107
+
108
+ ## 🌍 Related Repositories
109
+
110
+ - 🔌 [Entities API](https://github.com/frankie336/entities_api) — containerized API backend
111
+ -
112
+ - 📚 [entities_common](https://github.com/frankie336/entities_common) — shared validation, schemas, utilities, and tools.
113
+ This package is auto installed as dependency of entities SDK or entities API.
@@ -0,0 +1,46 @@
1
+ from tkinter.font import names
2
+
3
+ # Assistants
4
+
5
+ ## Overview
6
+
7
+ Create an Assistant by defining its custom instructions and picking a model. If helpful, add files and enable tools like Code Interpreter, File Search, and Function calling.
8
+
9
+ ### Basic Assistant Operations
10
+
11
+ ```python
12
+
13
+ from entities import Entities
14
+
15
+ client = Entities()
16
+
17
+ # Create assistant
18
+
19
+ assistant = client.assistants.create_assistant(
20
+ name='Mathy',
21
+ description='test_case',
22
+ model='llama3.1',
23
+ instructions='You are a helpful math tutor.'
24
+ )
25
+ print(f"Assistant created: ID: {assistant.id}")
26
+
27
+ # Retrieve an Assistant
28
+
29
+ retrieved_assistant = client.assistants.retrieve_assistant(assistant_id=assistant.id)
30
+
31
+ print(retrieved_assistant)
32
+
33
+ # Update and assistant
34
+
35
+ client.assistants.update_assistant(
36
+ assistant_id=assistant.id,
37
+ name = 'Mathy',
38
+ description='test_update',
39
+ instructions='You are now a world class poker player.'
40
+ )
41
+
42
+ # Delete an assistant
43
+
44
+ client.assistants.delete_assistant(assistant_id=assistant.id)
45
+
46
+ ```
@@ -0,0 +1,32 @@
1
+ # Code Interpretation
2
+
3
+ A code interpreter is a specialized [tool](/docs/function_calling.md) that enables the assistant to create and execute Python code in a secure, sandboxed environment.
4
+
5
+ This capability supports various use cases, such as allowing users to request computed outputs related to data analysis or visualization. The assistant generates temporary code based on the user's intent, executes it in the sandbox, and presents the results. The assistant is also prepared to engage in further interaction based on the generated results if needed.
6
+
7
+
8
+ ![Diagram](code_interpreter3.png)
9
+
10
+
11
+ The code interpreter is enabled by default, so no additional coding is required. Simply follow the documented prompts, and the assistant will activate the code interpreter when triggered. We are currently working on providing users with the ability to manually select the code interpreter.
12
+
13
+ **Turning on Code Interpreter**
14
+
15
+ ```python
16
+ from src.api.entities import CommonEntitiesInternalInterface
17
+ from src.api.entities import code_interpreter
18
+
19
+ available_functions = {
20
+ 'code_interpreter': code_interpreter
21
+ # Add other functions as needed
22
+ }
23
+
24
+ client = entities_api.CommonEntitiesInternalInterface(available_functions=available_functions)
25
+ ```
26
+
27
+ **Call the client with the code_interpreter handler injected in**
28
+
29
+ ```python
30
+
31
+ client = entities_api.CommonEntitiesInternalInterface(available_functions=available_functions)
32
+ ```
@@ -0,0 +1,5 @@
1
+
2
+
3
+
4
+
5
+ ![Network Diagram](../images/database.png)
@@ -0,0 +1,22 @@
1
+ # Docker Containers
2
+
3
+ ## Overview
4
+
5
+ This project utilizes a multi-container Docker architecture to provide a robust and scalable application environment. The containerized services include:
6
+
7
+ MySQL Database (my_mysql_cosmic_catalyst): A MySQL 8.0 container that handles all persistent data storage.
8
+
9
+ Qdrant Vector Search (qdrant_server): A container running the latest Qdrant image to manage vector searches for advanced data retrieval.
10
+
11
+ API Server (fastapi_cosmic_catalyst): A FastAPI-based service responsible for handling client requests and business logic.
12
+
13
+ Sandbox Environment (sandbox_api): A secure, isolated container for executing code and testing new features without affecting production.
14
+
15
+ Samba File Sharing (samba_server): A Samba server container that provides file sharing capabilities, ensuring efficient storage management.
16
+
17
+ All these containers are networked through a custom Docker bridge network, ensuring seamless communication and integrated operation across the system.
18
+
19
+
20
+
21
+
22
+ ![Network Diagram](../images/docker_containers.png)