hebbrix 2.0.3__tar.gz → 2.1.0__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.
- {hebbrix-2.0.3 → hebbrix-2.1.0}/PKG-INFO +1 -1
- {hebbrix-2.0.3 → hebbrix-2.1.0}/hebbrix/__init__.py +1 -1
- {hebbrix-2.0.3 → hebbrix-2.1.0}/hebbrix/resources.py +25 -3
- {hebbrix-2.0.3 → hebbrix-2.1.0}/hebbrix.egg-info/PKG-INFO +1 -1
- {hebbrix-2.0.3 → hebbrix-2.1.0}/pyproject.toml +1 -1
- {hebbrix-2.0.3 → hebbrix-2.1.0}/setup.py +1 -1
- {hebbrix-2.0.3 → hebbrix-2.1.0}/MANIFEST.in +0 -0
- {hebbrix-2.0.3 → hebbrix-2.1.0}/README.md +0 -0
- {hebbrix-2.0.3 → hebbrix-2.1.0}/hebbrix/chat.py +0 -0
- {hebbrix-2.0.3 → hebbrix-2.1.0}/hebbrix/client.py +0 -0
- {hebbrix-2.0.3 → hebbrix-2.1.0}/hebbrix/exceptions.py +0 -0
- {hebbrix-2.0.3 → hebbrix-2.1.0}/hebbrix.egg-info/SOURCES.txt +0 -0
- {hebbrix-2.0.3 → hebbrix-2.1.0}/hebbrix.egg-info/dependency_links.txt +0 -0
- {hebbrix-2.0.3 → hebbrix-2.1.0}/hebbrix.egg-info/requires.txt +0 -0
- {hebbrix-2.0.3 → hebbrix-2.1.0}/hebbrix.egg-info/top_level.txt +0 -0
- {hebbrix-2.0.3 → hebbrix-2.1.0}/setup.cfg +0 -0
|
@@ -200,20 +200,41 @@ class MemoriesResource(BaseResource):
|
|
|
200
200
|
source_type: str = "text",
|
|
201
201
|
source_reference: Optional[str] = None,
|
|
202
202
|
metadata: Optional[Dict[str, Any]] = None,
|
|
203
|
+
infer: bool = False,
|
|
203
204
|
) -> Dict[str, Any]:
|
|
204
205
|
"""
|
|
205
|
-
Create a
|
|
206
|
+
Create a memory.
|
|
207
|
+
|
|
208
|
+
By default (``infer=False``) the content is stored verbatim as a single
|
|
209
|
+
memory and the response's ``results[0].id`` is that memory's real,
|
|
210
|
+
immediately-resolvable id — so ``create()`` round-trips with ``get()``.
|
|
211
|
+
|
|
212
|
+
Behavior change (SDK 2.1.0): previously ``create()`` implicitly used the
|
|
213
|
+
server's LLM extract-and-resolve path (``infer=true``), which rewrote the
|
|
214
|
+
content, could emit zero or several fact rows, and — when the server ran
|
|
215
|
+
extraction asynchronously — returned a transient job id that ``get()``
|
|
216
|
+
could not resolve. That transient id is why a create/get round-trip
|
|
217
|
+
failed. Storing verbatim by default makes the returned id stable.
|
|
218
|
+
|
|
219
|
+
Pass ``infer=True`` to opt into fact extraction (``POST /v1/memories``
|
|
220
|
+
with server-side inference). In that mode ``results`` may contain several
|
|
221
|
+
extracted-fact ids, or the response may be ``{"job_id": ...}`` if the
|
|
222
|
+
server extracts asynchronously — poll that job rather than treating it as
|
|
223
|
+
a memory id.
|
|
206
224
|
|
|
207
225
|
Args:
|
|
208
226
|
collection_id: Collection ID
|
|
209
227
|
content: Memory content
|
|
210
|
-
importance: Importance
|
|
228
|
+
importance: Importance hint (0-1)
|
|
211
229
|
source_type: Type of source
|
|
212
230
|
source_reference: Reference to source
|
|
213
231
|
metadata: Optional metadata
|
|
232
|
+
infer: When True, extract facts via the LLM pipeline instead of
|
|
233
|
+
storing ``content`` verbatim. Default False (direct store).
|
|
214
234
|
|
|
215
235
|
Returns:
|
|
216
|
-
Created memory
|
|
236
|
+
Created memory (MemoryAddResponse). With ``infer=False`` (default),
|
|
237
|
+
``results[0].id`` is the real, get-able memory id.
|
|
217
238
|
"""
|
|
218
239
|
return await self.client.post(
|
|
219
240
|
"/v1/memories",
|
|
@@ -224,6 +245,7 @@ class MemoriesResource(BaseResource):
|
|
|
224
245
|
"source_type": source_type,
|
|
225
246
|
"source_reference": source_reference,
|
|
226
247
|
"metadata": metadata or {},
|
|
248
|
+
"infer": infer,
|
|
227
249
|
},
|
|
228
250
|
)
|
|
229
251
|
|
|
@@ -9,7 +9,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
|
|
9
9
|
|
|
10
10
|
setup(
|
|
11
11
|
name="hebbrix",
|
|
12
|
-
version="2.0
|
|
12
|
+
version="2.1.0",
|
|
13
13
|
author="Hebbrix Team",
|
|
14
14
|
author_email="support@hebbrix.com",
|
|
15
15
|
description="Advanced Memory API for AI Agents with Reinforcement Learning - 3-line integration",
|
|
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
|