Skip to content

Commit 5c48767

Browse files
feat(api): api update
1 parent 002a748 commit 5c48767

File tree

5 files changed

+23
-2
lines changed

5 files changed

+23
-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: 18
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-b95fdde5f2544bce843df7bb502b9205217caaf71a28ed7f784a3d481d13d874.yml
3-
openapi_spec_hash: 39d70b150e54ccd103e6063506521ace
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-de994787885a5ec28fb19f069715a257ea4e4f1bcff2b25c4b33e928779c6454.yml
3+
openapi_spec_hash: 7b831b4614b8d9b8caddcaa096bf3817
44
config_hash: 9b9291a6c872b063900a46386729ba3c

src/supermemory/resources/memories.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ def list(
126126
*,
127127
container_tags: List[str] | NotGiven = NOT_GIVEN,
128128
filters: str | NotGiven = NOT_GIVEN,
129+
include_content: bool | NotGiven = NOT_GIVEN,
129130
limit: Union[str, float] | NotGiven = NOT_GIVEN,
130131
order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
131132
page: Union[str, float] | NotGiven = NOT_GIVEN,
@@ -146,6 +147,9 @@ def list(
146147
147148
filters: Optional filters to apply to the search
148149
150+
include_content: Whether to include the content field in the response. Warning: This can make
151+
responses significantly larger.
152+
149153
limit: Number of items per page
150154
151155
order: Sort order
@@ -168,6 +172,7 @@ def list(
168172
{
169173
"container_tags": container_tags,
170174
"filters": filters,
175+
"include_content": include_content,
171176
"limit": limit,
172177
"order": order,
173178
"page": page,
@@ -462,6 +467,7 @@ async def list(
462467
*,
463468
container_tags: List[str] | NotGiven = NOT_GIVEN,
464469
filters: str | NotGiven = NOT_GIVEN,
470+
include_content: bool | NotGiven = NOT_GIVEN,
465471
limit: Union[str, float] | NotGiven = NOT_GIVEN,
466472
order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
467473
page: Union[str, float] | NotGiven = NOT_GIVEN,
@@ -482,6 +488,9 @@ async def list(
482488
483489
filters: Optional filters to apply to the search
484490
491+
include_content: Whether to include the content field in the response. Warning: This can make
492+
responses significantly larger.
493+
485494
limit: Number of items per page
486495
487496
order: Sort order
@@ -504,6 +513,7 @@ async def list(
504513
{
505514
"container_tags": container_tags,
506515
"filters": filters,
516+
"include_content": include_content,
507517
"limit": limit,
508518
"order": order,
509519
"page": page,

src/supermemory/types/memory_list_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ class MemoryListParams(TypedDict, total=False):
2121
filters: str
2222
"""Optional filters to apply to the search"""
2323

24+
include_content: Annotated[bool, PropertyInfo(alias="includeContent")]
25+
"""Whether to include the content field in the response.
26+
27+
Warning: This can make responses significantly larger.
28+
"""
29+
2430
limit: Union[str, float]
2531
"""Number of items per page"""
2632

src/supermemory/types/memory_list_response.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ class Memory(BaseModel):
7373
to use to group memories.
7474
"""
7575

76+
content: Optional[str] = None
77+
"""Content of the memory (only included when includeContent=true)"""
78+
7679

7780
class Pagination(BaseModel):
7881
current_page: float = FieldInfo(alias="currentPage")

tests/api_resources/test_memories.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ def test_method_list_with_all_params(self, client: Supermemory) -> None:
9797
memory = client.memories.list(
9898
container_tags=["user_123", "project_123"],
9999
filters='{"AND":[{"key":"group","negate":false,"value":"jira_users"},{"filterType":"numeric","key":"timestamp","negate":false,"numericOperator":">","value":"1742745777"}]}',
100+
include_content=False,
100101
limit=10,
101102
order="desc",
102103
page=1,
@@ -380,6 +381,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncSupermemory)
380381
memory = await async_client.memories.list(
381382
container_tags=["user_123", "project_123"],
382383
filters='{"AND":[{"key":"group","negate":false,"value":"jira_users"},{"filterType":"numeric","key":"timestamp","negate":false,"numericOperator":">","value":"1742745777"}]}',
384+
include_content=False,
383385
limit=10,
384386
order="desc",
385387
page=1,

0 commit comments

Comments
 (0)