Skip to content

Commit 27dcd49

Browse files
feat(api): api update
1 parent cf6d58b commit 27dcd49

File tree

5 files changed

+10
-52
lines changed

5 files changed

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

src/supermemory/resources/memories.py

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def update(
5252
self,
5353
id: str,
5454
*,
55-
container_tag: str | NotGiven = NOT_GIVEN,
5655
container_tags: List[str] | NotGiven = NOT_GIVEN,
5756
content: str | NotGiven = NOT_GIVEN,
5857
custom_id: str | NotGiven = NOT_GIVEN,
@@ -68,13 +67,9 @@ def update(
6867
Update a memory with any content type (text, url, file, etc.) and metadata
6968
7069
Args:
71-
container_tag: Optional tag this memory should be containerized by. This can be an ID for your
70+
container_tags: Optional tags this memory should be containerized by. This can be an ID for your
7271
user, a project ID, or any other identifier you wish to use to group memories.
7372
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-
7873
content: The content to extract and process into a memory. This can be a URL to a
7974
website, a PDF, an image, or a video.
8075
@@ -107,7 +102,6 @@ def update(
107102
f"/v3/memories/{id}",
108103
body=maybe_transform(
109104
{
110-
"container_tag": container_tag,
111105
"container_tags": container_tags,
112106
"content": content,
113107
"custom_id": custom_id,
@@ -218,7 +212,6 @@ def delete(
218212
def add(
219213
self,
220214
*,
221-
container_tag: str | NotGiven = NOT_GIVEN,
222215
container_tags: List[str] | NotGiven = NOT_GIVEN,
223216
content: str | NotGiven = NOT_GIVEN,
224217
custom_id: str | NotGiven = NOT_GIVEN,
@@ -234,13 +227,9 @@ def add(
234227
Add a memory with any content type (text, url, file, etc.) and metadata
235228
236229
Args:
237-
container_tag: Optional tag this memory should be containerized by. This can be an ID for your
230+
container_tags: Optional tags this memory should be containerized by. This can be an ID for your
238231
user, a project ID, or any other identifier you wish to use to group memories.
239232
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-
244233
content: The content to extract and process into a memory. This can be a URL to a
245234
website, a PDF, an image, or a video.
246235
@@ -271,7 +260,6 @@ def add(
271260
"/v3/memories",
272261
body=maybe_transform(
273262
{
274-
"container_tag": container_tag,
275263
"container_tags": container_tags,
276264
"content": content,
277265
"custom_id": custom_id,
@@ -388,7 +376,6 @@ async def update(
388376
self,
389377
id: str,
390378
*,
391-
container_tag: str | NotGiven = NOT_GIVEN,
392379
container_tags: List[str] | NotGiven = NOT_GIVEN,
393380
content: str | NotGiven = NOT_GIVEN,
394381
custom_id: str | NotGiven = NOT_GIVEN,
@@ -404,13 +391,9 @@ async def update(
404391
Update a memory with any content type (text, url, file, etc.) and metadata
405392
406393
Args:
407-
container_tag: Optional tag this memory should be containerized by. This can be an ID for your
394+
container_tags: Optional tags this memory should be containerized by. This can be an ID for your
408395
user, a project ID, or any other identifier you wish to use to group memories.
409396
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-
414397
content: The content to extract and process into a memory. This can be a URL to a
415398
website, a PDF, an image, or a video.
416399
@@ -443,7 +426,6 @@ async def update(
443426
f"/v3/memories/{id}",
444427
body=await async_maybe_transform(
445428
{
446-
"container_tag": container_tag,
447429
"container_tags": container_tags,
448430
"content": content,
449431
"custom_id": custom_id,
@@ -554,7 +536,6 @@ async def delete(
554536
async def add(
555537
self,
556538
*,
557-
container_tag: str | NotGiven = NOT_GIVEN,
558539
container_tags: List[str] | NotGiven = NOT_GIVEN,
559540
content: str | NotGiven = NOT_GIVEN,
560541
custom_id: str | NotGiven = NOT_GIVEN,
@@ -570,13 +551,9 @@ async def add(
570551
Add a memory with any content type (text, url, file, etc.) and metadata
571552
572553
Args:
573-
container_tag: Optional tag this memory should be containerized by. This can be an ID for your
554+
container_tags: Optional tags this memory should be containerized by. This can be an ID for your
574555
user, a project ID, or any other identifier you wish to use to group memories.
575556
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-
580557
content: The content to extract and process into a memory. This can be a URL to a
581558
website, a PDF, an image, or a video.
582559
@@ -607,7 +584,6 @@ async def add(
607584
"/v3/memories",
608585
body=await async_maybe_transform(
609586
{
610-
"container_tag": container_tag,
611587
"container_tags": container_tags,
612588
"content": content,
613589
"custom_id": custom_id,

src/supermemory/types/memory_add_params.py

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

1212

1313
class MemoryAddParams(TypedDict, total=False):
14-
container_tag: Annotated[str, PropertyInfo(alias="containerTag")]
15-
"""Optional tag this memory should be containerized by.
14+
container_tags: Annotated[List[str], PropertyInfo(alias="containerTags")]
15+
"""Optional tags 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-
2821
content: str
2922
"""The content to extract and process into a memory.
3023

src/supermemory/types/memory_update_params.py

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

1212

1313
class MemoryUpdateParams(TypedDict, total=False):
14-
container_tag: Annotated[str, PropertyInfo(alias="containerTag")]
15-
"""Optional tag this memory should be containerized by.
14+
container_tags: Annotated[List[str], PropertyInfo(alias="containerTags")]
15+
"""Optional tags 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-
2821
content: str
2922
"""The content to extract and process into a memory.
3023

tests/api_resources/test_memories.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ 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",
4039
container_tags=["user_123", "project_123"],
4140
content="This is a detailed article about machine learning concepts...",
4241
custom_id="mem_abc123",
@@ -178,7 +177,6 @@ def test_method_add(self, client: Supermemory) -> None:
178177
@parametrize
179178
def test_method_add_with_all_params(self, client: Supermemory) -> None:
180179
memory = client.memories.add(
181-
container_tag="user_123",
182180
container_tags=["user_123", "project_123"],
183181
content="This is a detailed article about machine learning concepts...",
184182
custom_id="mem_abc123",
@@ -319,7 +317,6 @@ async def test_method_update(self, async_client: AsyncSupermemory) -> None:
319317
async def test_method_update_with_all_params(self, async_client: AsyncSupermemory) -> None:
320318
memory = await async_client.memories.update(
321319
id="id",
322-
container_tag="user_123",
323320
container_tags=["user_123", "project_123"],
324321
content="This is a detailed article about machine learning concepts...",
325322
custom_id="mem_abc123",
@@ -461,7 +458,6 @@ async def test_method_add(self, async_client: AsyncSupermemory) -> None:
461458
@parametrize
462459
async def test_method_add_with_all_params(self, async_client: AsyncSupermemory) -> None:
463460
memory = await async_client.memories.add(
464-
container_tag="user_123",
465461
container_tags=["user_123", "project_123"],
466462
content="This is a detailed article about machine learning concepts...",
467463
custom_id="mem_abc123",

0 commit comments

Comments
 (0)