Skip to content

Commit 3c680a2

Browse files
feat(api): api update
1 parent b20cd94 commit 3c680a2

File tree

10 files changed

+56
-2
lines changed

10 files changed

+56
-2
lines changed

.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%2Fsupermemory-new-228aa031e151ca6ab0d83088f067b165e13605944950869825bb68b940d2882f.yml
3-
openapi_spec_hash: db114c74a43b04b89ef63d1ec10cb8a8
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-c52fac62512bd29d68804cbd226eebe5ad4e6b07a94a0db480e89d0049293e6e.yml
3+
openapi_spec_hash: 655aacb90af901248f2629ede34595da
44
config_hash: 4bcc46df5333a2be6812a59a40afdb5e

src/supermemory/_client.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ def add(
241241
container_tag: str | Omit = omit,
242242
container_tags: SequenceNotStr[str] | Omit = omit,
243243
custom_id: str | Omit = omit,
244+
entity_context: str | Omit = omit,
244245
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
245246
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
246247
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -262,6 +263,9 @@ def add(
262263
custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
263264
hyphens and underscores only.
264265
266+
entity_context: Optional entity context for this container tag. Max 1500 characters. Used during
267+
document processing to guide memory extraction.
268+
265269
metadata: Optional metadata for the document.
266270
267271
extra_headers: Send extra headers
@@ -280,6 +284,7 @@ def add(
280284
"container_tag": container_tag,
281285
"container_tags": container_tags,
282286
"custom_id": custom_id,
287+
"entity_context": entity_context,
283288
"metadata": metadata,
284289
},
285290
client_add_params.ClientAddParams,
@@ -544,6 +549,7 @@ async def add(
544549
container_tag: str | Omit = omit,
545550
container_tags: SequenceNotStr[str] | Omit = omit,
546551
custom_id: str | Omit = omit,
552+
entity_context: str | Omit = omit,
547553
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
548554
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
549555
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -565,6 +571,9 @@ async def add(
565571
custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
566572
hyphens and underscores only.
567573
574+
entity_context: Optional entity context for this container tag. Max 1500 characters. Used during
575+
document processing to guide memory extraction.
576+
568577
metadata: Optional metadata for the document.
569578
570579
extra_headers: Send extra headers
@@ -583,6 +592,7 @@ async def add(
583592
"container_tag": container_tag,
584593
"container_tags": container_tags,
585594
"custom_id": custom_id,
595+
"entity_context": entity_context,
586596
"metadata": metadata,
587597
},
588598
client_add_params.ClientAddParams,

src/supermemory/resources/documents.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ def add(
239239
container_tag: str | Omit = omit,
240240
container_tags: SequenceNotStr[str] | Omit = omit,
241241
custom_id: str | Omit = omit,
242+
entity_context: str | Omit = omit,
242243
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
243244
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
244245
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -260,6 +261,9 @@ def add(
260261
custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
261262
hyphens and underscores only.
262263
264+
entity_context: Optional entity context for this container tag. Max 1500 characters. Used during
265+
document processing to guide memory extraction.
266+
263267
metadata: Optional metadata for the document.
264268
265269
extra_headers: Send extra headers
@@ -278,6 +282,7 @@ def add(
278282
"container_tag": container_tag,
279283
"container_tags": container_tags,
280284
"custom_id": custom_id,
285+
"entity_context": entity_context,
281286
"metadata": metadata,
282287
},
283288
document_add_params.DocumentAddParams,
@@ -721,6 +726,7 @@ async def add(
721726
container_tag: str | Omit = omit,
722727
container_tags: SequenceNotStr[str] | Omit = omit,
723728
custom_id: str | Omit = omit,
729+
entity_context: str | Omit = omit,
724730
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
725731
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
726732
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -742,6 +748,9 @@ async def add(
742748
custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
743749
hyphens and underscores only.
744750
751+
entity_context: Optional entity context for this container tag. Max 1500 characters. Used during
752+
document processing to guide memory extraction.
753+
745754
metadata: Optional metadata for the document.
746755
747756
extra_headers: Send extra headers
@@ -760,6 +769,7 @@ async def add(
760769
"container_tag": container_tag,
761770
"container_tags": container_tags,
762771
"custom_id": custom_id,
772+
"entity_context": entity_context,
763773
"metadata": metadata,
764774
},
765775
document_add_params.DocumentAddParams,

src/supermemory/resources/memories.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ def add(
238238
container_tag: str | Omit = omit,
239239
container_tags: SequenceNotStr[str] | Omit = omit,
240240
custom_id: str | Omit = omit,
241+
entity_context: str | Omit = omit,
241242
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
242243
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
243244
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -259,6 +260,9 @@ def add(
259260
custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
260261
hyphens and underscores only.
261262
263+
entity_context: Optional entity context for this container tag. Max 1500 characters. Used during
264+
document processing to guide memory extraction.
265+
262266
metadata: Optional metadata for the document.
263267
264268
extra_headers: Send extra headers
@@ -277,6 +281,7 @@ def add(
277281
"container_tag": container_tag,
278282
"container_tags": container_tags,
279283
"custom_id": custom_id,
284+
"entity_context": entity_context,
280285
"metadata": metadata,
281286
},
282287
memory_add_params.MemoryAddParams,
@@ -709,6 +714,7 @@ async def add(
709714
container_tag: str | Omit = omit,
710715
container_tags: SequenceNotStr[str] | Omit = omit,
711716
custom_id: str | Omit = omit,
717+
entity_context: str | Omit = omit,
712718
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
713719
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
714720
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -730,6 +736,9 @@ async def add(
730736
custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
731737
hyphens and underscores only.
732738
739+
entity_context: Optional entity context for this container tag. Max 1500 characters. Used during
740+
document processing to guide memory extraction.
741+
733742
metadata: Optional metadata for the document.
734743
735744
extra_headers: Send extra headers
@@ -748,6 +757,7 @@ async def add(
748757
"container_tag": container_tag,
749758
"container_tags": container_tags,
750759
"custom_id": custom_id,
760+
"entity_context": entity_context,
751761
"metadata": metadata,
752762
},
753763
memory_add_params.MemoryAddParams,

src/supermemory/types/client_add_params.py

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

35+
entity_context: Annotated[str, PropertyInfo(alias="entityContext")]
36+
"""Optional entity context for this container tag.
37+
38+
Max 1500 characters. Used during document processing to guide memory extraction.
39+
"""
40+
3541
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]]
3642
"""Optional metadata for the document."""

src/supermemory/types/document_add_params.py

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

35+
entity_context: Annotated[str, PropertyInfo(alias="entityContext")]
36+
"""Optional entity context for this container tag.
37+
38+
Max 1500 characters. Used during document processing to guide memory extraction.
39+
"""
40+
3541
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]]
3642
"""Optional metadata for the document."""

src/supermemory/types/memory_add_params.py

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

35+
entity_context: Annotated[str, PropertyInfo(alias="entityContext")]
36+
"""Optional entity context for this container tag.
37+
38+
Max 1500 characters. Used during document processing to guide memory extraction.
39+
"""
40+
3541
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]]
3642
"""Optional metadata for the document."""

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+
entity_context="entityContext",
3637
metadata={"foo": "string"},
3738
)
3839
assert_matches_type(AddResponse, client_, path=["response"])
@@ -129,6 +130,7 @@ async def test_method_add_with_all_params(self, async_client: AsyncSupermemory)
129130
container_tag="containerTag",
130131
container_tags=["string"],
131132
custom_id="customId",
133+
entity_context="entityContext",
132134
metadata={"foo": "string"},
133135
)
134136
assert_matches_type(AddResponse, client, path=["response"])

tests/api_resources/test_documents.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ def test_method_add_with_all_params(self, client: Supermemory) -> None:
207207
container_tag="containerTag",
208208
container_tags=["string"],
209209
custom_id="customId",
210+
entity_context="entityContext",
210211
metadata={"foo": "string"},
211212
)
212213
assert_matches_type(DocumentAddResponse, document, path=["response"])
@@ -646,6 +647,7 @@ async def test_method_add_with_all_params(self, async_client: AsyncSupermemory)
646647
container_tag="containerTag",
647648
container_tags=["string"],
648649
custom_id="customId",
650+
entity_context="entityContext",
649651
metadata={"foo": "string"},
650652
)
651653
assert_matches_type(DocumentAddResponse, document, path=["response"])

tests/api_resources/test_memories.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ def test_method_add_with_all_params(self, client: Supermemory) -> None:
206206
container_tag="containerTag",
207207
container_tags=["string"],
208208
custom_id="customId",
209+
entity_context="entityContext",
209210
metadata={"foo": "string"},
210211
)
211212
assert_matches_type(MemoryAddResponse, memory, path=["response"])
@@ -606,6 +607,7 @@ async def test_method_add_with_all_params(self, async_client: AsyncSupermemory)
606607
container_tag="containerTag",
607608
container_tags=["string"],
608609
custom_id="customId",
610+
entity_context="entityContext",
609611
metadata={"foo": "string"},
610612
)
611613
assert_matches_type(MemoryAddResponse, memory, path=["response"])

0 commit comments

Comments
 (0)