openvector_dev 0.1.14__tar.gz → 0.1.15__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: openvector_dev
3
- Version: 0.1.14
3
+ Version: 0.1.15
4
4
  Summary:
5
5
  Author: p00ler
6
6
  Author-email: liveitspain@gmail.com
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "openvector_dev"
3
- version = "0.1.14"
3
+ version = "0.1.15"
4
4
  description = ""
5
5
  authors = [
6
6
  {name = "p00ler",email = "liveitspain@gmail.com"}
@@ -243,12 +243,22 @@ class Memory:
243
243
 
244
244
  async def delete_memory(self, user_id: int, bot: str) -> None:
245
245
  """
246
- Удаляет
247
- :param user_id: Идентификатор пользователя.
248
- :param bot: Codename бота
246
+ Полная очистка памяти данного (user_id, bot):
247
+ short-term (Redis)
248
+ long-term (Qdrant)
249
+ • внутренние счётчики фасада (_msg_no, _gift_fail)
249
250
  """
251
+ # 1) short-term (Redis list)
252
+ await self.short.clear(user_id=user_id, bot=bot)
253
+
254
+ # 2) long-term (Qdrant)
250
255
  await self.long.delete_all(user_id, bot)
251
256
 
257
+ # 3) локальные счётчики
258
+ self._msg_no.pop((user_id, bot), None)
259
+ self._gift_fail.pop((user_id, bot), None)
260
+
261
+
252
262
  @staticmethod
253
263
  def _chunk_texts(chunks: Sequence[Chunk | ChunkPayload]) -> list[str]:
254
264
  """