Skip to content

Commit b20052c

Browse files
feat(api): api update
1 parent a391cb6 commit b20052c

8 files changed

Lines changed: 88 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 26
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc/supermemory-new-c447b3b1739c61ad5c7d154b756a27babca059729c781af4426a48c289f5f0b3.yml
3-
openapi_spec_hash: c498629fb2c104767bf108daca8fcd9d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc/supermemory-new-a02634cf1b1c465ad3c8505ea2402e2a2bef732858a9f4d2337aeea5a99c14bc.yml
3+
openapi_spec_hash: f859a6666196eea26ea9e6078d218129
44
config_hash: cde97ef3188581c5f4924c633ec33ddb

src/supermemory/_client.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ def add(
254254
container_tag: str | Omit = omit,
255255
container_tags: SequenceNotStr[str] | Omit = omit,
256256
custom_id: str | Omit = omit,
257+
dreaming: Literal["instant", "dynamic"] | Omit = omit,
257258
entity_context: str | Omit = omit,
258259
filepath: str | Omit = omit,
259260
filter_by_metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
@@ -279,6 +280,11 @@ def add(
279280
custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
280281
hyphens, underscores, and dots only.
281282
283+
dreaming: Processing mode. "dynamic" (default) groups related documents together so
284+
memories form from coherent, logical units rather than one isolated entry at a
285+
time. "instant" processes each document on its own right away, and bills one
286+
extra operation per document.
287+
282288
entity_context: Optional entity context for this container tag. Max 1500 characters. Used during
283289
document processing to guide memory extraction.
284290
@@ -309,6 +315,7 @@ def add(
309315
"container_tag": container_tag,
310316
"container_tags": container_tags,
311317
"custom_id": custom_id,
318+
"dreaming": dreaming,
312319
"entity_context": entity_context,
313320
"filepath": filepath,
314321
"filter_by_metadata": filter_by_metadata,
@@ -594,6 +601,7 @@ async def add(
594601
container_tag: str | Omit = omit,
595602
container_tags: SequenceNotStr[str] | Omit = omit,
596603
custom_id: str | Omit = omit,
604+
dreaming: Literal["instant", "dynamic"] | Omit = omit,
597605
entity_context: str | Omit = omit,
598606
filepath: str | Omit = omit,
599607
filter_by_metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
@@ -619,6 +627,11 @@ async def add(
619627
custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
620628
hyphens, underscores, and dots only.
621629
630+
dreaming: Processing mode. "dynamic" (default) groups related documents together so
631+
memories form from coherent, logical units rather than one isolated entry at a
632+
time. "instant" processes each document on its own right away, and bills one
633+
extra operation per document.
634+
622635
entity_context: Optional entity context for this container tag. Max 1500 characters. Used during
623636
document processing to guide memory extraction.
624637
@@ -649,6 +662,7 @@ async def add(
649662
"container_tag": container_tag,
650663
"container_tags": container_tags,
651664
"custom_id": custom_id,
665+
"dreaming": dreaming,
652666
"entity_context": entity_context,
653667
"filepath": filepath,
654668
"filter_by_metadata": filter_by_metadata,

src/supermemory/resources/documents.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ def add(
262262
container_tag: str | Omit = omit,
263263
container_tags: SequenceNotStr[str] | Omit = omit,
264264
custom_id: str | Omit = omit,
265+
dreaming: Literal["instant", "dynamic"] | Omit = omit,
265266
entity_context: str | Omit = omit,
266267
filepath: str | Omit = omit,
267268
filter_by_metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
@@ -287,6 +288,11 @@ def add(
287288
custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
288289
hyphens, underscores, and dots only.
289290
291+
dreaming: Processing mode. "dynamic" (default) groups related documents together so
292+
memories form from coherent, logical units rather than one isolated entry at a
293+
time. "instant" processes each document on its own right away, and bills one
294+
extra operation per document.
295+
290296
entity_context: Optional entity context for this container tag. Max 1500 characters. Used during
291297
document processing to guide memory extraction.
292298
@@ -317,6 +323,7 @@ def add(
317323
"container_tag": container_tag,
318324
"container_tags": container_tags,
319325
"custom_id": custom_id,
326+
"dreaming": dreaming,
320327
"entity_context": entity_context,
321328
"filepath": filepath,
322329
"filter_by_metadata": filter_by_metadata,
@@ -338,6 +345,7 @@ def batch_add(
338345
container_tag: str | Omit = omit,
339346
container_tags: SequenceNotStr[str] | Omit = omit,
340347
content: None | Omit = omit,
348+
dreaming: Literal["instant", "dynamic"] | Omit = omit,
341349
entity_context: str | Omit = omit,
342350
filepath: str | Omit = omit,
343351
filter_by_metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
@@ -364,6 +372,11 @@ def batch_add(
364372
containerized by. This can be an ID for your user, a project ID, or any other
365373
identifier you wish to use to group documents.
366374
375+
dreaming: Processing mode. "dynamic" (default) groups related documents together so
376+
memories form from coherent, logical units rather than one isolated entry at a
377+
time. "instant" processes each document on its own right away, and bills one
378+
extra operation per document.
379+
367380
entity_context: Optional entity context for this container tag. Max 1500 characters. Used during
368381
document processing to guide memory extraction.
369382
@@ -400,6 +413,7 @@ def batch_add(
400413
"container_tag": container_tag,
401414
"container_tags": container_tags,
402415
"content": content,
416+
"dreaming": dreaming,
403417
"entity_context": entity_context,
404418
"filepath": filepath,
405419
"filter_by_metadata": filter_by_metadata,
@@ -844,6 +858,7 @@ async def add(
844858
container_tag: str | Omit = omit,
845859
container_tags: SequenceNotStr[str] | Omit = omit,
846860
custom_id: str | Omit = omit,
861+
dreaming: Literal["instant", "dynamic"] | Omit = omit,
847862
entity_context: str | Omit = omit,
848863
filepath: str | Omit = omit,
849864
filter_by_metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
@@ -869,6 +884,11 @@ async def add(
869884
custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
870885
hyphens, underscores, and dots only.
871886
887+
dreaming: Processing mode. "dynamic" (default) groups related documents together so
888+
memories form from coherent, logical units rather than one isolated entry at a
889+
time. "instant" processes each document on its own right away, and bills one
890+
extra operation per document.
891+
872892
entity_context: Optional entity context for this container tag. Max 1500 characters. Used during
873893
document processing to guide memory extraction.
874894
@@ -899,6 +919,7 @@ async def add(
899919
"container_tag": container_tag,
900920
"container_tags": container_tags,
901921
"custom_id": custom_id,
922+
"dreaming": dreaming,
902923
"entity_context": entity_context,
903924
"filepath": filepath,
904925
"filter_by_metadata": filter_by_metadata,
@@ -920,6 +941,7 @@ async def batch_add(
920941
container_tag: str | Omit = omit,
921942
container_tags: SequenceNotStr[str] | Omit = omit,
922943
content: None | Omit = omit,
944+
dreaming: Literal["instant", "dynamic"] | Omit = omit,
923945
entity_context: str | Omit = omit,
924946
filepath: str | Omit = omit,
925947
filter_by_metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
@@ -946,6 +968,11 @@ async def batch_add(
946968
containerized by. This can be an ID for your user, a project ID, or any other
947969
identifier you wish to use to group documents.
948970
971+
dreaming: Processing mode. "dynamic" (default) groups related documents together so
972+
memories form from coherent, logical units rather than one isolated entry at a
973+
time. "instant" processes each document on its own right away, and bills one
974+
extra operation per document.
975+
949976
entity_context: Optional entity context for this container tag. Max 1500 characters. Used during
950977
document processing to guide memory extraction.
951978
@@ -982,6 +1009,7 @@ async def batch_add(
9821009
"container_tag": container_tag,
9831010
"container_tags": container_tags,
9841011
"content": content,
1012+
"dreaming": dreaming,
9851013
"entity_context": entity_context,
9861014
"filepath": filepath,
9871015
"filter_by_metadata": filter_by_metadata,

src/supermemory/types/client_add_params.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ class ClientAddParams(TypedDict, total=False):
3232
Max 100 characters, alphanumeric with hyphens, underscores, and dots only.
3333
"""
3434

35+
dreaming: Literal["instant", "dynamic"]
36+
"""Processing mode.
37+
38+
"dynamic" (default) groups related documents together so memories form from
39+
coherent, logical units rather than one isolated entry at a time. "instant"
40+
processes each document on its own right away, and bills one extra operation per
41+
document.
42+
"""
43+
3544
entity_context: Annotated[str, PropertyInfo(alias="entityContext")]
3645
"""Optional entity context for this container tag.
3746

src/supermemory/types/document_add_params.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ class DocumentAddParams(TypedDict, total=False):
3232
Max 100 characters, alphanumeric with hyphens, underscores, and dots only.
3333
"""
3434

35+
dreaming: Literal["instant", "dynamic"]
36+
"""Processing mode.
37+
38+
"dynamic" (default) groups related documents together so memories form from
39+
coherent, logical units rather than one isolated entry at a time. "instant"
40+
processes each document on its own right away, and bills one extra operation per
41+
document.
42+
"""
43+
3544
entity_context: Annotated[str, PropertyInfo(alias="entityContext")]
3645
"""Optional entity context for this container tag.
3746

src/supermemory/types/document_batch_add_params.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ class DocumentBatchAddParams(TypedDict, total=False):
3030

3131
content: None
3232

33+
dreaming: Literal["instant", "dynamic"]
34+
"""Processing mode.
35+
36+
"dynamic" (default) groups related documents together so memories form from
37+
coherent, logical units rather than one isolated entry at a time. "instant"
38+
processes each document on its own right away, and bills one extra operation per
39+
document.
40+
"""
41+
3342
entity_context: Annotated[str, PropertyInfo(alias="entityContext")]
3443
"""Optional entity context for this container tag.
3544
@@ -102,6 +111,15 @@ class DocumentsUnionMember0(TypedDict, total=False):
102111
document.
103112
"""
104113

114+
dreaming: Literal["instant", "dynamic"]
115+
"""Processing mode.
116+
117+
"dynamic" (default) groups related documents together so memories form from
118+
coherent, logical units rather than one isolated entry at a time. "instant"
119+
processes each document on its own right away, and bills one extra operation per
120+
document.
121+
"""
122+
105123
entity_context: Annotated[str, PropertyInfo(alias="entityContext")]
106124
"""Optional entity context for this container tag.
107125

tests/api_resources/test_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def test_method_add_with_all_params(self, client: Supermemory) -> None:
3333
container_tag="containerTag",
3434
container_tags=["string"],
3535
custom_id="customId",
36+
dreaming="instant",
3637
entity_context="entityContext",
3738
filepath="filepath",
3839
filter_by_metadata={"foo": "string"},
@@ -145,6 +146,7 @@ async def test_method_add_with_all_params(self, async_client: AsyncSupermemory)
145146
container_tag="containerTag",
146147
container_tags=["string"],
147148
custom_id="customId",
149+
dreaming="instant",
148150
entity_context="entityContext",
149151
filepath="filepath",
150152
filter_by_metadata={"foo": "string"},

tests/api_resources/test_documents.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ def test_method_add_with_all_params(self, client: Supermemory) -> None:
210210
container_tag="containerTag",
211211
container_tags=["string"],
212212
custom_id="customId",
213+
dreaming="instant",
213214
entity_context="entityContext",
214215
filepath="filepath",
215216
filter_by_metadata={"foo": "string"},
@@ -266,6 +267,7 @@ def test_method_batch_add_with_all_params(self, client: Supermemory) -> None:
266267
"container_tag": "user_alex",
267268
"container_tags": ["_:_k--W2K_1V"],
268269
"custom_id": "doc-api-rate-limits",
270+
"dreaming": "instant",
269271
"entity_context": "User's name is {XYZ}",
270272
"filepath": "/documents/reports/file.pdf",
271273
"filter_by_metadata": {
@@ -282,6 +284,7 @@ def test_method_batch_add_with_all_params(self, client: Supermemory) -> None:
282284
container_tag="user_alex",
283285
container_tags=["_:_k--W2K_1V"],
284286
content=None,
287+
dreaming="instant",
285288
entity_context="User's name is {XYZ}",
286289
filepath="/documents/reports/file.pdf",
287290
filter_by_metadata={
@@ -681,6 +684,7 @@ async def test_method_add_with_all_params(self, async_client: AsyncSupermemory)
681684
container_tag="containerTag",
682685
container_tags=["string"],
683686
custom_id="customId",
687+
dreaming="instant",
684688
entity_context="entityContext",
685689
filepath="filepath",
686690
filter_by_metadata={"foo": "string"},
@@ -737,6 +741,7 @@ async def test_method_batch_add_with_all_params(self, async_client: AsyncSuperme
737741
"container_tag": "user_alex",
738742
"container_tags": ["_:_k--W2K_1V"],
739743
"custom_id": "doc-api-rate-limits",
744+
"dreaming": "instant",
740745
"entity_context": "User's name is {XYZ}",
741746
"filepath": "/documents/reports/file.pdf",
742747
"filter_by_metadata": {
@@ -753,6 +758,7 @@ async def test_method_batch_add_with_all_params(self, async_client: AsyncSuperme
753758
container_tag="user_alex",
754759
container_tags=["_:_k--W2K_1V"],
755760
content=None,
761+
dreaming="instant",
756762
entity_context="User's name is {XYZ}",
757763
filepath="/documents/reports/file.pdf",
758764
filter_by_metadata={

0 commit comments

Comments
 (0)