trace-memory 1.0.3__tar.gz → 1.0.4__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.
- {trace_memory-1.0.3/trace_memory.egg-info → trace_memory-1.0.4}/PKG-INFO +4 -1
- {trace_memory-1.0.3 → trace_memory-1.0.4}/README.md +3 -0
- {trace_memory-1.0.3 → trace_memory-1.0.4}/pyproject.toml +1 -1
- {trace_memory-1.0.3 → trace_memory-1.0.4}/trace_memory/ctree.py +29 -0
- {trace_memory-1.0.3 → trace_memory-1.0.4/trace_memory.egg-info}/PKG-INFO +4 -1
- {trace_memory-1.0.3 → trace_memory-1.0.4}/LICENSE +0 -0
- {trace_memory-1.0.3 → trace_memory-1.0.4}/NOTICE +0 -0
- {trace_memory-1.0.3 → trace_memory-1.0.4}/setup.cfg +0 -0
- {trace_memory-1.0.3 → trace_memory-1.0.4}/trace_memory/__init__.py +0 -0
- {trace_memory-1.0.3 → trace_memory-1.0.4}/trace_memory/_llm_utils.py +0 -0
- {trace_memory-1.0.3 → trace_memory-1.0.4}/trace_memory/prompt_synthesizer.py +0 -0
- {trace_memory-1.0.3 → trace_memory-1.0.4}/trace_memory/vector_db.py +0 -0
- {trace_memory-1.0.3 → trace_memory-1.0.4}/trace_memory.egg-info/SOURCES.txt +0 -0
- {trace_memory-1.0.3 → trace_memory-1.0.4}/trace_memory.egg-info/dependency_links.txt +0 -0
- {trace_memory-1.0.3 → trace_memory-1.0.4}/trace_memory.egg-info/requires.txt +0 -0
- {trace_memory-1.0.3 → trace_memory-1.0.4}/trace_memory.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: trace-memory
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.4
|
|
4
4
|
Summary: TRACE — Temporal Retrieval And Context Engine: self-healing hierarchical memory for LLM agents.
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Project-URL: Homepage, https://github.com/husain34/TRACE
|
|
@@ -495,6 +495,9 @@ vdb = VectorDatabase("path/to/session.db") # creates the DB if it doesn't exist
|
|
|
495
495
|
|
|
496
496
|
Store an embedded past conversation message for cross-thread recall.
|
|
497
497
|
|
|
498
|
+
> [!NOTE]
|
|
499
|
+
> As of TRACE 1.0.4, `CTree.add()` calls this **automatically** behind the scenes. You only need to call this manually if you are managing the Vector DB independently of a CTree.
|
|
500
|
+
|
|
498
501
|
```python
|
|
499
502
|
from trace_memory import ConversationVector
|
|
500
503
|
import time, uuid
|
|
@@ -466,6 +466,9 @@ vdb = VectorDatabase("path/to/session.db") # creates the DB if it doesn't exist
|
|
|
466
466
|
|
|
467
467
|
Store an embedded past conversation message for cross-thread recall.
|
|
468
468
|
|
|
469
|
+
> [!NOTE]
|
|
470
|
+
> As of TRACE 1.0.4, `CTree.add()` calls this **automatically** behind the scenes. You only need to call this manually if you are managing the Vector DB independently of a CTree.
|
|
471
|
+
|
|
469
472
|
```python
|
|
470
473
|
from trace_memory import ConversationVector
|
|
471
474
|
import time, uuid
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "trace-memory"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.4"
|
|
8
8
|
description = "TRACE — Temporal Retrieval And Context Engine: self-healing hierarchical memory for LLM agents."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "Apache-2.0" }
|
|
@@ -427,6 +427,35 @@ class CTree:
|
|
|
427
427
|
else:
|
|
428
428
|
self._add_message(msg_dict)
|
|
429
429
|
|
|
430
|
+
if self.vdb:
|
|
431
|
+
from .vector_db import ConversationVector
|
|
432
|
+
import uuid
|
|
433
|
+
|
|
434
|
+
ancestors = self.get_ancestors(self.current_node, include_self=True, exclude_root=False)
|
|
435
|
+
thread_path = " → ".join([n.topic_name for n in ancestors]) if ancestors else "ROOT"
|
|
436
|
+
|
|
437
|
+
start_idx = msg_dict["index"]
|
|
438
|
+
for i, msg in enumerate(messages):
|
|
439
|
+
role = msg.get("role", "")
|
|
440
|
+
text = msg.get("content", "")
|
|
441
|
+
if not text or not isinstance(text, str):
|
|
442
|
+
continue
|
|
443
|
+
|
|
444
|
+
try:
|
|
445
|
+
embed_vec = self.embed_fn(text)
|
|
446
|
+
c_vec = ConversationVector(
|
|
447
|
+
message_id=str(uuid.uuid4()),
|
|
448
|
+
message_index=start_idx + i,
|
|
449
|
+
role=role,
|
|
450
|
+
text=text,
|
|
451
|
+
embedding=embed_vec,
|
|
452
|
+
timestamp=time.time(),
|
|
453
|
+
thread_path=thread_path
|
|
454
|
+
)
|
|
455
|
+
self.vdb.add_conversation_message(c_vec)
|
|
456
|
+
except Exception:
|
|
457
|
+
pass
|
|
458
|
+
|
|
430
459
|
if self.auto_save_path:
|
|
431
460
|
self.save(self.auto_save_path, save_conversation=True)
|
|
432
461
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: trace-memory
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.4
|
|
4
4
|
Summary: TRACE — Temporal Retrieval And Context Engine: self-healing hierarchical memory for LLM agents.
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Project-URL: Homepage, https://github.com/husain34/TRACE
|
|
@@ -495,6 +495,9 @@ vdb = VectorDatabase("path/to/session.db") # creates the DB if it doesn't exist
|
|
|
495
495
|
|
|
496
496
|
Store an embedded past conversation message for cross-thread recall.
|
|
497
497
|
|
|
498
|
+
> [!NOTE]
|
|
499
|
+
> As of TRACE 1.0.4, `CTree.add()` calls this **automatically** behind the scenes. You only need to call this manually if you are managing the Vector DB independently of a CTree.
|
|
500
|
+
|
|
498
501
|
```python
|
|
499
502
|
from trace_memory import ConversationVector
|
|
500
503
|
import time, uuid
|
|
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
|