Skip to content

Commit cf6d58b

Browse files
feat(api): api update
1 parent 65d9e06 commit cf6d58b

File tree

5 files changed

+52
-10
lines changed

5 files changed

+52
-10
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: 18
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-d52acd1a525b4bfe9f4befcc3a645f5d1289d75e7bad999cf1330e539b2ed84e.yml
3-
openapi_spec_hash: c34df5406cfa4d245812d30f99d28116
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-cdba3e7c4cacab2e42f8d071222818947c5bbbe25407b59ab303e2ac02d46744.yml
3+
openapi_spec_hash: 870497c8690aabac0a0ad68e4fe09076
44
config_hash: 9b9291a6c872b063900a46386729ba3c

src/supermemory/resources/memories.py

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def update(
5252
self,
5353
id: str,
5454
*,
55+
container_tag: str | NotGiven = NOT_GIVEN,
5556
container_tags: List[str] | NotGiven = NOT_GIVEN,
5657
content: str | NotGiven = NOT_GIVEN,
5758
custom_id: str | NotGiven = NOT_GIVEN,
@@ -67,9 +68,13 @@ def update(
6768
Update a memory with any content type (text, url, file, etc.) and metadata
6869
6970
Args:
70-
container_tags: Optional tags this memory should be containerized by. This can be an ID for your
71+
container_tag: Optional tag this memory should be containerized by. This can be an ID for your
7172
user, a project ID, or any other identifier you wish to use to group memories.
7273
74+
container_tags: (DEPRECATED: Use containerTag instead) Optional tags this memory should be
75+
containerized by. This can be an ID for your user, a project ID, or any other
76+
identifier you wish to use to group memories.
77+
7378
content: The content to extract and process into a memory. This can be a URL to a
7479
website, a PDF, an image, or a video.
7580
@@ -102,6 +107,7 @@ def update(
102107
f"/v3/memories/{id}",
103108
body=maybe_transform(
104109
{
110+
"container_tag": container_tag,
105111
"container_tags": container_tags,
106112
"content": content,
107113
"custom_id": custom_id,
@@ -212,6 +218,7 @@ def delete(
212218
def add(
213219
self,
214220
*,
221+
container_tag: str | NotGiven = NOT_GIVEN,
215222
container_tags: List[str] | NotGiven = NOT_GIVEN,
216223
content: str | NotGiven = NOT_GIVEN,
217224
custom_id: str | NotGiven = NOT_GIVEN,
@@ -227,9 +234,13 @@ def add(
227234
Add a memory with any content type (text, url, file, etc.) and metadata
228235
229236
Args:
230-
container_tags: Optional tags this memory should be containerized by. This can be an ID for your
237+
container_tag: Optional tag this memory should be containerized by. This can be an ID for your
231238
user, a project ID, or any other identifier you wish to use to group memories.
232239
240+
container_tags: (DEPRECATED: Use containerTag instead) Optional tags this memory should be
241+
containerized by. This can be an ID for your user, a project ID, or any other
242+
identifier you wish to use to group memories.
243+
233244
content: The content to extract and process into a memory. This can be a URL to a
234245
website, a PDF, an image, or a video.
235246
@@ -260,6 +271,7 @@ def add(
260271
"/v3/memories",
261272
body=maybe_transform(
262273
{
274+
"container_tag": container_tag,
263275
"container_tags": container_tags,
264276
"content": content,
265277
"custom_id": custom_id,
@@ -376,6 +388,7 @@ async def update(
376388
self,
377389
id: str,
378390
*,
391+
container_tag: str | NotGiven = NOT_GIVEN,
379392
container_tags: List[str] | NotGiven = NOT_GIVEN,
380393
content: str | NotGiven = NOT_GIVEN,
381394
custom_id: str | NotGiven = NOT_GIVEN,
@@ -391,9 +404,13 @@ async def update(
391404
Update a memory with any content type (text, url, file, etc.) and metadata
392405
393406
Args:
394-
container_tags: Optional tags this memory should be containerized by. This can be an ID for your
407+
container_tag: Optional tag this memory should be containerized by. This can be an ID for your
395408
user, a project ID, or any other identifier you wish to use to group memories.
396409
410+
container_tags: (DEPRECATED: Use containerTag instead) Optional tags this memory should be
411+
containerized by. This can be an ID for your user, a project ID, or any other
412+
identifier you wish to use to group memories.
413+
397414
content: The content to extract and process into a memory. This can be a URL to a
398415
website, a PDF, an image, or a video.
399416
@@ -426,6 +443,7 @@ async def update(
426443
f"/v3/memories/{id}",
427444
body=await async_maybe_transform(
428445
{
446+
"container_tag": container_tag,
429447
"container_tags": container_tags,
430448
"content": content,
431449
"custom_id": custom_id,
@@ -536,6 +554,7 @@ async def delete(
536554
async def add(
537555
self,
538556
*,
557+
container_tag: str | NotGiven = NOT_GIVEN,
539558
container_tags: List[str] | NotGiven = NOT_GIVEN,
540559
content: str | NotGiven = NOT_GIVEN,
541560
custom_id: str | NotGiven = NOT_GIVEN,
@@ -551,9 +570,13 @@ async def add(
551570
Add a memory with any content type (text, url, file, etc.) and metadata
552571
553572
Args:
554-
container_tags: Optional tags this memory should be containerized by. This can be an ID for your
573+
container_tag: Optional tag this memory should be containerized by. This can be an ID for your
555574
user, a project ID, or any other identifier you wish to use to group memories.
556575
576+
container_tags: (DEPRECATED: Use containerTag instead) Optional tags this memory should be
577+
containerized by. This can be an ID for your user, a project ID, or any other
578+
identifier you wish to use to group memories.
579+
557580
content: The content to extract and process into a memory. This can be a URL to a
558581
website, a PDF, an image, or a video.
559582
@@ -584,6 +607,7 @@ async def add(
584607
"/v3/memories",
585608
body=await async_maybe_transform(
586609
{
610+
"container_tag": container_tag,
587611
"container_tags": container_tags,
588612
"content": content,
589613
"custom_id": custom_id,

src/supermemory/types/memory_add_params.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,20 @@
1111

1212

1313
class MemoryAddParams(TypedDict, total=False):
14-
container_tags: Annotated[List[str], PropertyInfo(alias="containerTags")]
15-
"""Optional tags this memory should be containerized by.
14+
container_tag: Annotated[str, PropertyInfo(alias="containerTag")]
15+
"""Optional tag this memory should be containerized by.
1616
1717
This can be an ID for your user, a project ID, or any other identifier you wish
1818
to use to group memories.
1919
"""
2020

21+
container_tags: Annotated[List[str], PropertyInfo(alias="containerTags")]
22+
"""
23+
(DEPRECATED: Use containerTag instead) Optional tags this memory should be
24+
containerized by. This can be an ID for your user, a project ID, or any other
25+
identifier you wish to use to group memories.
26+
"""
27+
2128
content: str
2229
"""The content to extract and process into a memory.
2330

src/supermemory/types/memory_update_params.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,20 @@
1111

1212

1313
class MemoryUpdateParams(TypedDict, total=False):
14-
container_tags: Annotated[List[str], PropertyInfo(alias="containerTags")]
15-
"""Optional tags this memory should be containerized by.
14+
container_tag: Annotated[str, PropertyInfo(alias="containerTag")]
15+
"""Optional tag this memory should be containerized by.
1616
1717
This can be an ID for your user, a project ID, or any other identifier you wish
1818
to use to group memories.
1919
"""
2020

21+
container_tags: Annotated[List[str], PropertyInfo(alias="containerTags")]
22+
"""
23+
(DEPRECATED: Use containerTag instead) Optional tags this memory should be
24+
containerized by. This can be an ID for your user, a project ID, or any other
25+
identifier you wish to use to group memories.
26+
"""
27+
2128
content: str
2229
"""The content to extract and process into a memory.
2330

tests/api_resources/test_memories.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def test_method_update(self, client: Supermemory) -> None:
3636
def test_method_update_with_all_params(self, client: Supermemory) -> None:
3737
memory = client.memories.update(
3838
id="id",
39+
container_tag="user_123",
3940
container_tags=["user_123", "project_123"],
4041
content="This is a detailed article about machine learning concepts...",
4142
custom_id="mem_abc123",
@@ -177,6 +178,7 @@ def test_method_add(self, client: Supermemory) -> None:
177178
@parametrize
178179
def test_method_add_with_all_params(self, client: Supermemory) -> None:
179180
memory = client.memories.add(
181+
container_tag="user_123",
180182
container_tags=["user_123", "project_123"],
181183
content="This is a detailed article about machine learning concepts...",
182184
custom_id="mem_abc123",
@@ -317,6 +319,7 @@ async def test_method_update(self, async_client: AsyncSupermemory) -> None:
317319
async def test_method_update_with_all_params(self, async_client: AsyncSupermemory) -> None:
318320
memory = await async_client.memories.update(
319321
id="id",
322+
container_tag="user_123",
320323
container_tags=["user_123", "project_123"],
321324
content="This is a detailed article about machine learning concepts...",
322325
custom_id="mem_abc123",
@@ -458,6 +461,7 @@ async def test_method_add(self, async_client: AsyncSupermemory) -> None:
458461
@parametrize
459462
async def test_method_add_with_all_params(self, async_client: AsyncSupermemory) -> None:
460463
memory = await async_client.memories.add(
464+
container_tag="user_123",
461465
container_tags=["user_123", "project_123"],
462466
content="This is a detailed article about machine learning concepts...",
463467
custom_id="mem_abc123",

0 commit comments

Comments
 (0)