Skip to content

Commit 79ca8d5

Browse files
feat(api): api update
1 parent c02d7c2 commit 79ca8d5

4 files changed

Lines changed: 27 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-00a4c56b1ae197e7ddbeae4fe05ae0864d282829f1f9ee8601f39ea3859969d3.yml
3-
openapi_spec_hash: 27f6e2fad48855513fa4d8b18b25e249
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc/supermemory-new-c602bac0c6d453b4c4699348569c3e0f1264bb94dac5a312464fcbd41f0bd0c5.yml
3+
openapi_spec_hash: 9e8e8093f200aa49ec05b9b61a51a7aa
44
config_hash: cde97ef3188581c5f4924c633ec33ddb

src/supermemory/resources/documents.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,7 @@ def upload_file(
535535
container_tag: str | Omit = omit,
536536
container_tags: str | Omit = omit,
537537
custom_id: str | Omit = omit,
538+
dreaming: Literal["instant", "dynamic"] | Omit = omit,
538539
entity_context: str | Omit = omit,
539540
filepath: str | Omit = omit,
540541
file_type: str | Omit = omit,
@@ -565,6 +566,11 @@ def upload_file(
565566
custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
566567
hyphens, underscores, and colons only.
567568
569+
dreaming: Processing mode. "dynamic" (default) groups related documents together so
570+
memories form from coherent, logical units rather than one isolated entry at a
571+
time. "instant" processes each document on its own right away, and bills one
572+
extra operation per document.
573+
568574
entity_context: Optional entity context for this container tag. Max 1500 characters. Used during
569575
document processing to guide memory extraction.
570576
@@ -608,6 +614,7 @@ def upload_file(
608614
"container_tag": container_tag,
609615
"container_tags": container_tags,
610616
"custom_id": custom_id,
617+
"dreaming": dreaming,
611618
"entity_context": entity_context,
612619
"filepath": filepath,
613620
"file_type": file_type,
@@ -1131,6 +1138,7 @@ async def upload_file(
11311138
container_tag: str | Omit = omit,
11321139
container_tags: str | Omit = omit,
11331140
custom_id: str | Omit = omit,
1141+
dreaming: Literal["instant", "dynamic"] | Omit = omit,
11341142
entity_context: str | Omit = omit,
11351143
filepath: str | Omit = omit,
11361144
file_type: str | Omit = omit,
@@ -1161,6 +1169,11 @@ async def upload_file(
11611169
custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
11621170
hyphens, underscores, and colons only.
11631171
1172+
dreaming: Processing mode. "dynamic" (default) groups related documents together so
1173+
memories form from coherent, logical units rather than one isolated entry at a
1174+
time. "instant" processes each document on its own right away, and bills one
1175+
extra operation per document.
1176+
11641177
entity_context: Optional entity context for this container tag. Max 1500 characters. Used during
11651178
document processing to guide memory extraction.
11661179
@@ -1204,6 +1217,7 @@ async def upload_file(
12041217
"container_tag": container_tag,
12051218
"container_tags": container_tags,
12061219
"custom_id": custom_id,
1220+
"dreaming": dreaming,
12071221
"entity_context": entity_context,
12081222
"filepath": filepath,
12091223
"file_type": file_type,

src/supermemory/types/document_upload_file_params.py

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

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

tests/api_resources/test_documents.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ def test_method_upload_file_with_all_params(self, client: Supermemory) -> None:
457457
container_tag="user",
458458
container_tags="containerTags",
459459
custom_id="mem_abc123",
460+
dreaming="instant",
460461
entity_context="User's name is {XYZ}",
461462
filepath="/documents/reports/file.pdf",
462463
file_type="image",
@@ -931,6 +932,7 @@ async def test_method_upload_file_with_all_params(self, async_client: AsyncSuper
931932
container_tag="user",
932933
container_tags="containerTags",
933934
custom_id="mem_abc123",
935+
dreaming="instant",
934936
entity_context="User's name is {XYZ}",
935937
filepath="/documents/reports/file.pdf",
936938
file_type="image",

0 commit comments

Comments
 (0)