projectdavid 1.33.0__tar.gz → 1.33.2__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.

Potentially problematic release.


This version of projectdavid might be problematic. Click here for more details.

Files changed (68) hide show
  1. {projectdavid-1.33.0 → projectdavid-1.33.2}/CHANGELOG.md +14 -0
  2. {projectdavid-1.33.0/src/projectdavid.egg-info → projectdavid-1.33.2}/PKG-INFO +1 -1
  3. {projectdavid-1.33.0 → projectdavid-1.33.2}/docs/vector_store.md +8 -0
  4. {projectdavid-1.33.0 → projectdavid-1.33.2}/pyproject.toml +1 -1
  5. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/clients/vectors.py +95 -21
  6. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/entity.py +7 -1
  7. {projectdavid-1.33.0 → projectdavid-1.33.2/src/projectdavid.egg-info}/PKG-INFO +1 -1
  8. {projectdavid-1.33.0 → projectdavid-1.33.2}/LICENSE +0 -0
  9. {projectdavid-1.33.0 → projectdavid-1.33.2}/MANIFEST.in +0 -0
  10. {projectdavid-1.33.0 → projectdavid-1.33.2}/README.md +0 -0
  11. {projectdavid-1.33.0 → projectdavid-1.33.2}/docs/assistants.md +0 -0
  12. {projectdavid-1.33.0 → projectdavid-1.33.2}/docs/code_interpretation.md +0 -0
  13. {projectdavid-1.33.0 → projectdavid-1.33.2}/docs/database.md +0 -0
  14. {projectdavid-1.33.0 → projectdavid-1.33.2}/docs/database_assistant_example.md +0 -0
  15. {projectdavid-1.33.0 → projectdavid-1.33.2}/docs/docker_comtainers.md +0 -0
  16. {projectdavid-1.33.0 → projectdavid-1.33.2}/docs/file_search.md +0 -0
  17. {projectdavid-1.33.0 → projectdavid-1.33.2}/docs/files.md +0 -0
  18. {projectdavid-1.33.0 → projectdavid-1.33.2}/docs/function_call_definition.md +0 -0
  19. {projectdavid-1.33.0 → projectdavid-1.33.2}/docs/function_calls.md +0 -0
  20. {projectdavid-1.33.0 → projectdavid-1.33.2}/docs/handling_function_calls.md +0 -0
  21. {projectdavid-1.33.0 → projectdavid-1.33.2}/docs/inference.md +0 -0
  22. {projectdavid-1.33.0 → projectdavid-1.33.2}/docs/messages.md +0 -0
  23. {projectdavid-1.33.0 → projectdavid-1.33.2}/docs/runs.md +0 -0
  24. {projectdavid-1.33.0 → projectdavid-1.33.2}/docs/streams.md +0 -0
  25. {projectdavid-1.33.0 → projectdavid-1.33.2}/docs/threads.md +0 -0
  26. {projectdavid-1.33.0 → projectdavid-1.33.2}/docs/tools.md +0 -0
  27. {projectdavid-1.33.0 → projectdavid-1.33.2}/docs/users.md +0 -0
  28. {projectdavid-1.33.0 → projectdavid-1.33.2}/docs/versioning.md +0 -0
  29. {projectdavid-1.33.0 → projectdavid-1.33.2}/setup.cfg +0 -0
  30. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/__init__.py +0 -0
  31. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/_version.py +0 -0
  32. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/clients/actions_client.py +0 -0
  33. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/clients/api_key_client.py +0 -0
  34. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/clients/assistants_client.py +0 -0
  35. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/clients/base_client.py +0 -0
  36. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/clients/base_vector_store.py +0 -0
  37. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/clients/event_handler.py +0 -0
  38. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/clients/file_processor.py +0 -0
  39. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/clients/file_search.py +0 -0
  40. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/clients/files_client.py +0 -0
  41. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/clients/inference_client.py +0 -0
  42. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/clients/messages_client.py +0 -0
  43. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/clients/runs.py +0 -0
  44. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/clients/synchronous_inference_wrapper.py +0 -0
  45. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/clients/threads_client.py +0 -0
  46. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/clients/tools_client.py +0 -0
  47. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/clients/users_client.py +0 -0
  48. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/clients/vector_store_manager.py +0 -0
  49. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/constants/platform.py +0 -0
  50. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/events.py +0 -0
  51. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/serializers.py +0 -0
  52. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/services/logging_service.py +0 -0
  53. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/synthesis/__init__.py +0 -0
  54. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/synthesis/llm_synthesizer.py +0 -0
  55. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/synthesis/prompt.py +0 -0
  56. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/synthesis/reranker.py +0 -0
  57. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/synthesis/retriever.py +0 -0
  58. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/utils/__init__.py +0 -0
  59. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/utils/function_call_suppressor.py +0 -0
  60. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/utils/monitor_launcher.py +0 -0
  61. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/utils/peek_gate.py +0 -0
  62. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/utils/run_monitor.py +0 -0
  63. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid/utils/vector_search_formatter.py +0 -0
  64. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid.egg-info/SOURCES.txt +0 -0
  65. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid.egg-info/dependency_links.txt +0 -0
  66. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid.egg-info/requires.txt +0 -0
  67. {projectdavid-1.33.0 → projectdavid-1.33.2}/src/projectdavid.egg-info/top_level.txt +0 -0
  68. {projectdavid-1.33.0 → projectdavid-1.33.2}/tests/test_clients.py +0 -0
@@ -1,3 +1,17 @@
1
+ ## [1.33.2](https://github.com/frankie336/projectdavid/compare/v1.33.1...v1.33.2) (2025-06-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * pass file_processor_kwargs from public interface and add default fallbacks. ([597b274](https://github.com/frankie336/projectdavid/commit/597b274e0f54fc87ac5449ac8259c8ad244b0214))
7
+
8
+ ## [1.33.1](https://github.com/frankie336/projectdavid/compare/v1.33.0...v1.33.1) (2025-06-10)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * Add create_vector_vision_store_for_user ([392813b](https://github.com/frankie336/projectdavid/commit/392813bef20e12c2aca456e349b6d937e686f78c))
14
+
1
15
  # [1.33.0](https://github.com/frankie336/projectdavid/compare/v1.32.21...v1.33.0) (2025-06-10)
2
16
 
3
17
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: projectdavid
3
- Version: 1.33.0
3
+ Version: 1.33.2
4
4
  Summary: Python SDK for interacting with the Entities Assistant API.
5
5
  Author-email: Francis Neequaye Armah <francis.neequaye@projectdavid.co.uk>
6
6
  License: PolyForm Noncommercial License 1.0.0
@@ -78,6 +78,14 @@ save_file_to_store = client.vectors.add_file_to_vector_store(
78
78
 
79
79
  At this point, your file has been vectorized to your store.
80
80
 
81
+
82
+ ---
83
+
84
+
85
+ ## Supporting image vectors
86
+
87
+ Entities now ingests and vectorizes a wide range of image formats for semantic search. You can leverage these image embeddings to extend text-only models into powerful multi-modal workflows; enriching chatbots, document search, recommendation engines, and more.
88
+
81
89
  ---
82
90
 
83
91
  ### Making Searches Against Files in a Store
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "projectdavid"
7
- version = "1.33.0"
7
+ version = "1.33.2"
8
8
  description = "Python SDK for interacting with the Entities Assistant API."
9
9
  readme = "README.md"
10
10
  authors = [
@@ -72,8 +72,9 @@ class VectorStoreClient:
72
72
  api_key: Optional[str] = None,
73
73
  *,
74
74
  vector_store_host: str = "localhost",
75
- file_processor_kwargs: Optional[dict] = None, # 🔶 add arg
75
+ file_processor_kwargs: Optional[dict] = None,
76
76
  ):
77
+
77
78
  self.base_url = (base_url or os.getenv("BASE_URL", "")).rstrip("/")
78
79
  self.api_key = api_key or os.getenv("API_KEY")
79
80
  if not self.base_url:
@@ -94,7 +95,18 @@ class VectorStoreClient:
94
95
  self.identifier_service = UtilsInterface.IdentifierService()
95
96
 
96
97
  # 🔶 forward kwargs into the upgraded FileProcessor
97
- self.file_processor = FileProcessor(**(file_processor_kwargs or {}))
98
+
99
+ self.file_processor = FileProcessor(
100
+ **(
101
+ file_processor_kwargs
102
+ or {
103
+ "use_gpu": False,
104
+ "use_detection": True,
105
+ "use_geo": True,
106
+ "use_ocr": True,
107
+ }
108
+ )
109
+ )
98
110
 
99
111
  log.info("VectorStoreClient → %s", self.base_url)
100
112
 
@@ -494,27 +506,89 @@ class VectorStoreClient:
494
506
 
495
507
  def create_vector_vision_store(
496
508
  self,
497
- name: str = "vision",
498
- ):
509
+ name: str,
510
+ *,
511
+ vector_size: int = 384,
512
+ distance_metric: str = "Cosine",
513
+ config: Optional[Dict[str, Any]] = None,
514
+ vectors_config: Optional[Dict[str, qdrant.VectorParams]] = None, # ← NEW
515
+ ) -> ValidationInterface.VectorStoreRead:
499
516
 
500
- vectors_config = {
501
- # Raw visual embeddings (OpenCLIP ViT-H/14 → 1024-D)
502
- "image_vector": qdrant.VectorParams(
503
- size=1024, distance=qdrant.Distance.COSINE
504
- ),
505
- # Language embeddings of your BLIP-2 captions → 1024-D
506
- "caption_vector": qdrant.VectorParams(
507
- size=1024, distance=qdrant.Distance.COSINE
508
- ),
509
- # Object-region embeddings (YOLO crop + Sentence-BERT) → 1024-D
510
- "region_vector": qdrant.VectorParams(
511
- size=1024, distance=qdrant.Distance.COSINE
512
- ),
513
- # Geo-location unit vectors (RegioNet) → 3-D
514
- "geo_vector": qdrant.VectorParams(size=3, distance=qdrant.Distance.COSINE),
515
- }
517
+ if not vectors_config:
518
+ vectors_config = {
519
+ # Raw visual embeddings (OpenCLIP ViT-H/14 → 1024-D)
520
+ "image_vector": qdrant.VectorParams(
521
+ size=1024, distance=qdrant.Distance.COSINE
522
+ ),
523
+ # Language embeddings of your BLIP-2 captions → 1024-D
524
+ "caption_vector": qdrant.VectorParams(
525
+ size=1024, distance=qdrant.Distance.COSINE
526
+ ),
527
+ # Object-region embeddings (YOLO crop + Sentence-BERT) → 1024-D
528
+ "region_vector": qdrant.VectorParams(
529
+ size=1024, distance=qdrant.Distance.COSINE
530
+ ),
531
+ # Geo-location unit vectors (RegioNet) → 3-D
532
+ "geo_vector": qdrant.VectorParams(
533
+ size=3, distance=qdrant.Distance.COSINE
534
+ ),
535
+ }
516
536
 
517
- return self.create_vector_store(name=name, vectors_config=vectors_config)
537
+ return self._run_sync(
538
+ self._create_vs_async(
539
+ name,
540
+ vector_size,
541
+ distance_metric,
542
+ config,
543
+ vectors_config,
544
+ )
545
+ )
546
+
547
+ def create_vector_vision_store_for_user(
548
+ self,
549
+ owner_id: str,
550
+ name: str,
551
+ *,
552
+ vector_size: int = 384,
553
+ distance_metric: str = "Cosine",
554
+ config: Optional[Dict[str, Any]] = None,
555
+ vectors_config: Optional[Dict[str, qdrant.VectorParams]] = None, # ← NEW
556
+ ) -> ValidationInterface.VectorStoreRead:
557
+ """
558
+ Admin-only: create a store on behalf of another user.
559
+ Pass `vectors_config` to define a multi-vector schema.
560
+ """
561
+ if not vectors_config:
562
+
563
+ vectors_config = {
564
+ # Raw visual embeddings (OpenCLIP ViT-H/14 → 1024-D)
565
+ "image_vector": qdrant.VectorParams(
566
+ size=1024, distance=qdrant.Distance.COSINE
567
+ ),
568
+ # Language embeddings of your BLIP-2 captions → 1024-D
569
+ "caption_vector": qdrant.VectorParams(
570
+ size=1024, distance=qdrant.Distance.COSINE
571
+ ),
572
+ # Object-region embeddings (YOLO crop + Sentence-BERT) → 1024-D
573
+ "region_vector": qdrant.VectorParams(
574
+ size=1024, distance=qdrant.Distance.COSINE
575
+ ),
576
+ # Geo-location unit vectors (RegioNet) → 3-D
577
+ "geo_vector": qdrant.VectorParams(
578
+ size=3, distance=qdrant.Distance.COSINE
579
+ ),
580
+ }
581
+
582
+ return self._run_sync(
583
+ self._create_vs_for_user_async(
584
+ owner_id,
585
+ name,
586
+ vector_size,
587
+ distance_metric,
588
+ config,
589
+ vectors_config,
590
+ )
591
+ )
518
592
 
519
593
  def create_vector_store_for_user(
520
594
  self,
@@ -30,11 +30,15 @@ class Entity:
30
30
  self,
31
31
  base_url: Optional[str] = None,
32
32
  api_key: Optional[str] = None,
33
+ file_processor_kwargs: Optional[dict] = None,
33
34
  ):
34
35
  """
35
36
  Initialize the main client with configuration.
36
37
  Optionally, a configuration object can be injected to decouple from environment variables.
37
38
  """
39
+
40
+ self.file_processor_kwargs = file_processor_kwargs
41
+
38
42
  self.base_url = base_url or os.getenv(
39
43
  "ENTITIES_BASE_URL", "http://localhost:9000/"
40
44
  )
@@ -145,7 +149,9 @@ class Entity:
145
149
  def vectors(self) -> VectorStoreClient:
146
150
  if self._vectors_client is None:
147
151
  self._vectors_client = VectorStoreClient(
148
- base_url=self.base_url, api_key=self.api_key
152
+ base_url=self.base_url,
153
+ api_key=self.api_key,
154
+ file_processor_kwargs=self.file_processor_kwargs,
149
155
  )
150
156
 
151
157
  return self._vectors_client
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: projectdavid
3
- Version: 1.33.0
3
+ Version: 1.33.2
4
4
  Summary: Python SDK for interacting with the Entities Assistant API.
5
5
  Author-email: Francis Neequaye Armah <francis.neequaye@projectdavid.co.uk>
6
6
  License: PolyForm Noncommercial License 1.0.0
File without changes
File without changes
File without changes
File without changes