memorysync 1.9.1__tar.gz → 1.9.2__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.5
2
2
  Name: memorysync
3
- Version: 1.9.1
3
+ Version: 1.9.2
4
4
  Summary: Official Python client for the MemorySync API.
5
5
  Project-URL: Homepage, https://memorysync.io
6
6
  Project-URL: Documentation, https://docs.memorysync.io
@@ -0,0 +1 @@
1
+ __version__ = "1.9.2"
@@ -512,7 +512,7 @@ class MemorySyncClient:
512
512
  memory_ids: Iterable[int],
513
513
  *,
514
514
  lossless: bool = False,
515
- ) -> Memory:
515
+ ) -> AddResult:
516
516
  ids = list(memory_ids)
517
517
  if not ids:
518
518
  raise ValidationError("summarize() requires memory_ids")
@@ -521,6 +521,11 @@ class MemorySyncClient:
521
521
  "/memory/summarize",
522
522
  json={"memory_ids": ids, "lossless": lossless},
523
523
  )
524
+ # Summarize persists a summary memory, so the server meters it as an
525
+ # add — over-quota calls answer the same silent envelope as add().
526
+ skipped = _as_skipped(raw, default_reason="no_high_value_content")
527
+ if skipped is not None:
528
+ return skipped
524
529
  return Memory.from_dict(raw)
525
530
 
526
531
  def compose(
@@ -1321,7 +1326,7 @@ class AsyncMemorySyncClient:
1321
1326
  memory_ids: Iterable[int],
1322
1327
  *,
1323
1328
  lossless: bool = False,
1324
- ) -> Memory:
1329
+ ) -> AddResult:
1325
1330
  ids = list(memory_ids)
1326
1331
  if not ids:
1327
1332
  raise ValidationError("summarize() requires memory_ids")
@@ -1330,6 +1335,11 @@ class AsyncMemorySyncClient:
1330
1335
  "/memory/summarize",
1331
1336
  json={"memory_ids": ids, "lossless": lossless},
1332
1337
  )
1338
+ # Summarize persists a summary memory, so the server meters it as an
1339
+ # add — over-quota calls answer the same silent envelope as add().
1340
+ skipped = _as_skipped(raw, default_reason="no_high_value_content")
1341
+ if skipped is not None:
1342
+ return skipped
1333
1343
  return Memory.from_dict(raw)
1334
1344
 
1335
1345
  async def compose(
@@ -1 +0,0 @@
1
- __version__ = "1.9.1"
File without changes
File without changes
File without changes
File without changes