projectdavid 1.33.20__tar.gz → 1.33.22__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.
- {projectdavid-1.33.20 → projectdavid-1.33.22}/CHANGELOG.md +14 -0
- {projectdavid-1.33.20/src/projectdavid.egg-info → projectdavid-1.33.22}/PKG-INFO +1 -1
- {projectdavid-1.33.20 → projectdavid-1.33.22}/pyproject.toml +1 -1
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/clients/vector_store_manager.py +57 -35
- {projectdavid-1.33.20 → projectdavid-1.33.22/src/projectdavid.egg-info}/PKG-INFO +1 -1
- {projectdavid-1.33.20 → projectdavid-1.33.22}/LICENSE +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/MANIFEST.in +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/README.md +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/docs/assistants.md +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/docs/code_interpretation.md +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/docs/database.md +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/docs/database_assistant_example.md +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/docs/docker_comtainers.md +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/docs/file_search.md +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/docs/files.md +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/docs/function_call_definition.md +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/docs/function_calls.md +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/docs/handling_function_calls.md +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/docs/inference.md +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/docs/messages.md +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/docs/runs.md +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/docs/streams.md +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/docs/threads.md +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/docs/tools.md +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/docs/users.md +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/docs/vector_store.md +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/docs/versioning.md +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/setup.cfg +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/__init__.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/_version.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/clients/actions_client.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/clients/api_key_client.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/clients/assistants_client.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/clients/base_client.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/clients/base_vector_store.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/clients/event_handler.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/clients/file_processor.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/clients/file_search.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/clients/files_client.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/clients/inference_client.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/clients/messages_client.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/clients/runs.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/clients/synchronous_inference_wrapper.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/clients/threads_client.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/clients/tools_client.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/clients/users_client.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/clients/vectors.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/clients/vision-file_processor.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/clients/vision_vectors.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/constants/platform.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/decorators.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/entity.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/events.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/serializers.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/services/logging_service.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/synthesis/__init__.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/synthesis/llm_synthesizer.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/synthesis/prompt.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/synthesis/reranker.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/synthesis/retriever.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/utils/__init__.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/utils/function_call_suppressor.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/utils/monitor_launcher.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/utils/peek_gate.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/utils/run_monitor.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/utils/vector_search_formatter.py +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid.egg-info/SOURCES.txt +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid.egg-info/dependency_links.txt +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid.egg-info/requires.txt +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid.egg-info/top_level.txt +0 -0
- {projectdavid-1.33.20 → projectdavid-1.33.22}/tests/test_clients.py +0 -0
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.33.22](https://github.com/frankie336/projectdavid/compare/v1.33.21...v1.33.22) (2025-06-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Back out from vision support - resource issue. Revisit in grand plan-16 ([bc3c298](https://github.com/frankie336/projectdavid/commit/bc3c298034ee40580ec4e92223782a9f2aee279f))
|
|
7
|
+
|
|
8
|
+
## [1.33.21](https://github.com/frankie336/projectdavid/compare/v1.33.20...v1.33.21) (2025-06-16)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* Back out from vision support - resource issue. Revisit in grand plan-13 ([f43db04](https://github.com/frankie336/projectdavid/commit/f43db045d2c99be59586d7b0700f0a55f2efefd7))
|
|
14
|
+
|
|
1
15
|
## [1.33.20](https://github.com/frankie336/projectdavid/compare/v1.33.19...v1.33.20) (2025-06-16)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: projectdavid
|
|
3
|
-
Version: 1.33.
|
|
3
|
+
Version: 1.33.22
|
|
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
|
{projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/clients/vector_store_manager.py
RENAMED
|
@@ -7,10 +7,8 @@ details from the higher‑level SDK.
|
|
|
7
7
|
|
|
8
8
|
from __future__ import annotations
|
|
9
9
|
|
|
10
|
-
import inspect
|
|
11
10
|
import time
|
|
12
11
|
import uuid
|
|
13
|
-
from pathlib import Path
|
|
14
12
|
from typing import Any, Dict, List, Optional
|
|
15
13
|
|
|
16
14
|
from dotenv import load_dotenv
|
|
@@ -57,12 +55,14 @@ class VectorStoreManager(BaseVectorStore):
|
|
|
57
55
|
vectors_config: Optional[Dict[str, qdrant.VectorParams]] = None,
|
|
58
56
|
) -> dict:
|
|
59
57
|
"""
|
|
60
|
-
Create or recreate a Qdrant collection.
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
Create or recreate a Qdrant collection.
|
|
59
|
+
|
|
60
|
+
• If *vectors_config* is provided → use it verbatim (multi-vector schema).
|
|
61
|
+
• Otherwise create a classic single-vector collection *without* naming the
|
|
62
|
+
vector field – so upserts can omit ``vector_name``.
|
|
63
63
|
"""
|
|
64
64
|
try:
|
|
65
|
-
# existence check
|
|
65
|
+
# ── pre-existence check ────────────────────────────────────────────
|
|
66
66
|
if any(
|
|
67
67
|
col.name == collection_name
|
|
68
68
|
for col in self.client.get_collections().collections
|
|
@@ -73,27 +73,32 @@ class VectorStoreManager(BaseVectorStore):
|
|
|
73
73
|
if dist not in qdrant.Distance.__members__:
|
|
74
74
|
raise ValueError(f"Invalid distance metric '{distance}'")
|
|
75
75
|
|
|
76
|
-
# choose schema
|
|
77
|
-
if vectors_config:
|
|
78
|
-
config = vectors_config
|
|
79
|
-
else:
|
|
80
|
-
config =
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
76
|
+
# ── choose schema ──────────────────────────────────────────────────
|
|
77
|
+
if vectors_config: # caller supplied full mapping
|
|
78
|
+
config = vectors_config # e.g. {"text_vec": ..., "img_vec": ...}
|
|
79
|
+
else: # default = single unnamed vector
|
|
80
|
+
config = qdrant.VectorParams(
|
|
81
|
+
size=vector_size,
|
|
82
|
+
distance=qdrant.Distance[dist],
|
|
83
|
+
)
|
|
85
84
|
|
|
86
|
-
#
|
|
85
|
+
# ── (re)create collection ─────────────────────────────────────────
|
|
87
86
|
self.client.recreate_collection(
|
|
88
87
|
collection_name=collection_name,
|
|
89
88
|
vectors_config=config,
|
|
90
89
|
)
|
|
91
|
-
|
|
90
|
+
|
|
91
|
+
# ── bookkeeping ───────────────────────────────────────────────────
|
|
92
|
+
if isinstance(config, dict):
|
|
93
|
+
fields = list(config.keys())
|
|
94
|
+
else: # unnamed field
|
|
95
|
+
fields = [None]
|
|
96
|
+
|
|
92
97
|
self.active_stores[collection_name] = {
|
|
93
98
|
"created_at": int(time.time()),
|
|
94
99
|
"vector_size": vector_size,
|
|
95
100
|
"distance": dist,
|
|
96
|
-
"fields":
|
|
101
|
+
"fields": fields,
|
|
97
102
|
}
|
|
98
103
|
log.info("Created Qdrant collection %s", collection_name)
|
|
99
104
|
return {"collection_name": collection_name, "status": "created"}
|
|
@@ -139,13 +144,17 @@ class VectorStoreManager(BaseVectorStore):
|
|
|
139
144
|
metadata: List[dict],
|
|
140
145
|
vector_name: Optional[str] = None,
|
|
141
146
|
) -> Dict[str, Any]:
|
|
142
|
-
"""
|
|
147
|
+
"""
|
|
148
|
+
Upsert vectors + payloads into *store_name*.
|
|
149
|
+
|
|
150
|
+
If *vector_name* is omitted the manager:
|
|
143
151
|
|
|
144
|
-
|
|
145
|
-
|
|
152
|
+
• auto-detects the single vector field for classic (unnamed) collections
|
|
153
|
+
• auto-detects the sole key for named-vector collections with exactly one field
|
|
154
|
+
• raises if multiple named fields exist.
|
|
146
155
|
"""
|
|
147
156
|
|
|
148
|
-
#
|
|
157
|
+
# ─── input validation ───────────────────────────────────────────────
|
|
149
158
|
if not vectors:
|
|
150
159
|
raise ValueError("Empty vectors list")
|
|
151
160
|
expected = len(vectors[0])
|
|
@@ -153,22 +162,33 @@ class VectorStoreManager(BaseVectorStore):
|
|
|
153
162
|
if len(vec) != expected or not all(isinstance(v, float) for v in vec):
|
|
154
163
|
raise ValueError(f"Vector {i} malformed: expected {expected} floats")
|
|
155
164
|
|
|
156
|
-
#
|
|
165
|
+
# ─── auto-detect vector field ───────────────────────────────────────
|
|
157
166
|
if vector_name is None:
|
|
158
167
|
coll_info = self.client.get_collection(collection_name=store_name)
|
|
159
168
|
v_cfg = coll_info.config.params.vectors
|
|
160
|
-
|
|
161
|
-
if
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
169
|
+
|
|
170
|
+
if isinstance(v_cfg, dict): # modern named-vector schema
|
|
171
|
+
vector_fields = list(v_cfg.keys())
|
|
172
|
+
if len(vector_fields) == 1: # exactly one → safe default
|
|
173
|
+
vector_name = vector_fields[0]
|
|
174
|
+
log.debug(
|
|
175
|
+
"Auto-detected vector_name=%r for store=%s",
|
|
176
|
+
vector_name,
|
|
177
|
+
store_name,
|
|
178
|
+
)
|
|
179
|
+
else: # >1 named fields → ambiguous
|
|
180
|
+
raise ValueError(
|
|
181
|
+
f"Multiple vector fields {vector_fields}; please specify vector_name"
|
|
182
|
+
)
|
|
166
183
|
else:
|
|
167
|
-
|
|
168
|
-
|
|
184
|
+
# legacy single-vector schema → leave vector_name as None
|
|
185
|
+
log.debug(
|
|
186
|
+
"Collection %s uses legacy single-vector schema; "
|
|
187
|
+
"upserting without vector_name",
|
|
188
|
+
store_name,
|
|
169
189
|
)
|
|
170
190
|
|
|
171
|
-
#
|
|
191
|
+
# ─── build points payload ───────────────────────────────────────────
|
|
172
192
|
points = [
|
|
173
193
|
qdrant.PointStruct(
|
|
174
194
|
id=self._generate_vector_id(),
|
|
@@ -178,7 +198,9 @@ class VectorStoreManager(BaseVectorStore):
|
|
|
178
198
|
for txt, vec, meta in zip(texts, vectors, metadata)
|
|
179
199
|
]
|
|
180
200
|
|
|
181
|
-
#
|
|
201
|
+
# ─── upsert with backward-compat for old qdrant-client builds ───────
|
|
202
|
+
import inspect # keep local to avoid top-level dependency if absent elsewhere
|
|
203
|
+
|
|
182
204
|
upsert_sig = inspect.signature(self.client.upsert)
|
|
183
205
|
supports_vector_name = "vector_name" in upsert_sig.parameters
|
|
184
206
|
|
|
@@ -187,14 +209,14 @@ class VectorStoreManager(BaseVectorStore):
|
|
|
187
209
|
"points": points,
|
|
188
210
|
"wait": True,
|
|
189
211
|
}
|
|
190
|
-
if supports_vector_name:
|
|
212
|
+
if supports_vector_name and vector_name is not None:
|
|
191
213
|
upsert_kwargs["vector_name"] = vector_name
|
|
192
214
|
|
|
193
215
|
try:
|
|
194
216
|
self.client.upsert(**upsert_kwargs)
|
|
195
217
|
return {"status": "success", "points_inserted": len(points)}
|
|
196
218
|
except Exception as exc: # noqa: BLE001
|
|
197
|
-
log.error("Add
|
|
219
|
+
log.error("Add-to-store failed: %s", exc, exc_info=True)
|
|
198
220
|
raise VectorStoreError(f"Insertion failed: {exc}") from exc
|
|
199
221
|
|
|
200
222
|
# ------------------------------------------------------------------ #
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: projectdavid
|
|
3
|
-
Version: 1.33.
|
|
3
|
+
Version: 1.33.22
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/clients/vision-file_processor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/utils/function_call_suppressor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid/utils/vector_search_formatter.py
RENAMED
|
File without changes
|
|
File without changes
|
{projectdavid-1.33.20 → projectdavid-1.33.22}/src/projectdavid.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|