openvector_dev 0.1.2__py3-none-any.whl → 0.1.4__py3-none-any.whl
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.
- lein_vector/api/__init__.py +0 -1
- lein_vector/short_term.py +3 -2
- {openvector_dev-0.1.2.dist-info → openvector_dev-0.1.4.dist-info}/METADATA +1 -1
- {openvector_dev-0.1.2.dist-info → openvector_dev-0.1.4.dist-info}/RECORD +5 -5
- {openvector_dev-0.1.2.dist-info → openvector_dev-0.1.4.dist-info}/WHEEL +0 -0
lein_vector/api/__init__.py
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
from .facade import MemoryFacade as Memory
|
lein_vector/short_term.py
CHANGED
@@ -6,14 +6,15 @@ class ShortTermMemory:
|
|
6
6
|
def __init__(self, maxlen: int = 10):
|
7
7
|
self._buffer: deque = deque(maxlen=maxlen)
|
8
8
|
|
9
|
-
def add(self, role: str, text: str, ts: Optional[datetime] = None) -> None:
|
9
|
+
def add(self, role: str, text: str, ts: Optional[datetime] = None, **extra) -> None:
|
10
10
|
"""Добавить сообщение в память (роль, текст, ts - время, по умолчанию now)."""
|
11
11
|
if ts is None:
|
12
12
|
ts = datetime.now()
|
13
13
|
self._buffer.append({
|
14
14
|
"role": role,
|
15
15
|
"text": text,
|
16
|
-
"ts": ts
|
16
|
+
"ts": ts,
|
17
|
+
**extra
|
17
18
|
})
|
18
19
|
|
19
20
|
def window(self, n: Optional[int] = None) -> List[Dict]:
|
@@ -1,5 +1,5 @@
|
|
1
1
|
lein_vector/__init__.py,sha256=wQVJu6E6SYyBD1B59WlpTBy0qZuo9aj3sVTnpGYtiIk,411
|
2
|
-
lein_vector/api/__init__.py,sha256=
|
2
|
+
lein_vector/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
lein_vector/api/facade.py,sha256=nwwbwKLVGG9O1VVOJLOm1gLaIGHrLOAW-Lw_lhj6sPk,5717
|
4
4
|
lein_vector/bases/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
lein_vector/bases/embeding_provider_abc.py,sha256=eWdyxto-5uhSU61pR28537UGZ6oeJ7Y5wol3abLg828,304
|
@@ -10,7 +10,7 @@ lein_vector/qdrant_adapter.py,sha256=jPeFfoS70xfHLXd4oOgInj5pyCIMGCo3xt8cqjFUvgw
|
|
10
10
|
lein_vector/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
11
|
lein_vector/schemas/chunk.py,sha256=yt2Lb9zL9IJypQTJACVDlHkkS9_3clDoPpvn_5NBTi8,1198
|
12
12
|
lein_vector/sentence_transformer.py,sha256=F2o2-UhLLr5fI-HXJeRQ-drjrNgzhV0D9zN2svHIyOs,2473
|
13
|
-
lein_vector/short_term.py,sha256=
|
14
|
-
openvector_dev-0.1.
|
15
|
-
openvector_dev-0.1.
|
16
|
-
openvector_dev-0.1.
|
13
|
+
lein_vector/short_term.py,sha256=nVVZeXE_KR8NTmbBGZWedcA0N8Xo65cLP2cYSh0VeTE,1944
|
14
|
+
openvector_dev-0.1.4.dist-info/METADATA,sha256=CFQGTIFnAzQbylvnN4UvoLLgw9anI2T0AYFOv-D2s6c,3129
|
15
|
+
openvector_dev-0.1.4.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
16
|
+
openvector_dev-0.1.4.dist-info/RECORD,,
|
File without changes
|