From 5e2fc3b3b0aabe7f506284ae5922ab0c86b2eafb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2026 17:25:06 +0000 Subject: [PATCH 1/3] feat(api): api update --- .stats.yml | 4 ++-- src/supermemory/resources/search.py | 12 ++++++++++++ src/supermemory/types/search_memories_params.py | 7 +++++++ src/supermemory/types/search_memories_response.py | 3 +++ tests/api_resources/test_search.py | 2 ++ 5 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8b9b0a0..3bafe49 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 26 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-e519a815da9102647222f1f73920926f2d8b63d16995d3687213b604963f5ec5.yml -openapi_spec_hash: 4de453d3c2fca716f7f645d4c2c8f921 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-008c99427a2471a387bd071f936b0a1e352b81cea24a7d329719c28c652738df.yml +openapi_spec_hash: b47b3fdce4626adc8193b4c340e340ed config_hash: f3eb5ca71172780678106f6d46f15dda diff --git a/src/supermemory/resources/search.py b/src/supermemory/resources/search.py index 8891be4..d1f6bd7 100644 --- a/src/supermemory/resources/search.py +++ b/src/supermemory/resources/search.py @@ -245,6 +245,7 @@ def memories( self, *, q: str, + aggregate: bool | Omit = omit, container_tag: str | Omit = omit, filters: search_memories_params.Filters | Omit = omit, include: search_memories_params.Include | Omit = omit, @@ -266,6 +267,10 @@ def memories( Args: q: Search query string + aggregate: If true, aggregates information from multiple memories to create new synthesized + memories. The result will be a mix of aggregated and non-aggregated memories, + reranked by relevance to the query. Works in conjunction with reranking. + container_tag: Optional tag this search should be containerized by. This can be an ID for your user, a project ID, or any other identifier you wish to use to filter memories. @@ -300,6 +305,7 @@ def memories( body=maybe_transform( { "q": q, + "aggregate": aggregate, "container_tag": container_tag, "filters": filters, "include": include, @@ -538,6 +544,7 @@ async def memories( self, *, q: str, + aggregate: bool | Omit = omit, container_tag: str | Omit = omit, filters: search_memories_params.Filters | Omit = omit, include: search_memories_params.Include | Omit = omit, @@ -559,6 +566,10 @@ async def memories( Args: q: Search query string + aggregate: If true, aggregates information from multiple memories to create new synthesized + memories. The result will be a mix of aggregated and non-aggregated memories, + reranked by relevance to the query. Works in conjunction with reranking. + container_tag: Optional tag this search should be containerized by. This can be an ID for your user, a project ID, or any other identifier you wish to use to filter memories. @@ -593,6 +604,7 @@ async def memories( body=await async_maybe_transform( { "q": q, + "aggregate": aggregate, "container_tag": container_tag, "filters": filters, "include": include, diff --git a/src/supermemory/types/search_memories_params.py b/src/supermemory/types/search_memories_params.py index 067390d..a6d3aed 100644 --- a/src/supermemory/types/search_memories_params.py +++ b/src/supermemory/types/search_memories_params.py @@ -332,6 +332,13 @@ class SearchMemoriesParams(TypedDict, total=False): q: Required[str] """Search query string""" + aggregate: bool + """ + If true, aggregates information from multiple memories to create new synthesized + memories. The result will be a mix of aggregated and non-aggregated memories, + reranked by relevance to the query. Works in conjunction with reranking. + """ + container_tag: Annotated[str, PropertyInfo(alias="containerTag")] """Optional tag this search should be containerized by. diff --git a/src/supermemory/types/search_memories_response.py b/src/supermemory/types/search_memories_response.py index 0815f4f..16d6ad4 100644 --- a/src/supermemory/types/search_memories_response.py +++ b/src/supermemory/types/search_memories_response.py @@ -128,6 +128,9 @@ class Result(BaseModel): documents: Optional[List[ResultDocument]] = None """Associated documents for this memory entry""" + is_aggregated: Optional[bool] = FieldInfo(alias="isAggregated", default=None) + """Indicates if this memory was created by aggregating multiple source memories""" + memory: Optional[str] = None """The memory content (only present for memory results)""" diff --git a/tests/api_resources/test_search.py b/tests/api_resources/test_search.py index fcbea88..629296a 100644 --- a/tests/api_resources/test_search.py +++ b/tests/api_resources/test_search.py @@ -164,6 +164,7 @@ def test_method_memories(self, client: Supermemory) -> None: def test_method_memories_with_all_params(self, client: Supermemory) -> None: search = client.search.memories( q="machine learning concepts", + aggregate=False, container_tag="user_123", filters={ "or_": [ @@ -367,6 +368,7 @@ async def test_method_memories(self, async_client: AsyncSupermemory) -> None: async def test_method_memories_with_all_params(self, async_client: AsyncSupermemory) -> None: search = await async_client.search.memories( q="machine learning concepts", + aggregate=False, container_tag="user_123", filters={ "or_": [ From 0eaf416665d0dfb92e0119c54c11f170e0a1fe32 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2026 23:25:17 +0000 Subject: [PATCH 2/3] feat(api): api update --- .stats.yml | 4 ++-- src/supermemory/_client.py | 12 ++++++++++++ src/supermemory/resources/connections.py | 4 ++++ src/supermemory/resources/documents.py | 8 ++++++++ src/supermemory/resources/settings.py | 4 ++++ src/supermemory/types/document_upload_file_params.py | 3 +++ tests/api_resources/test_documents.py | 2 ++ 7 files changed, 35 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3bafe49..47adf13 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 26 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-008c99427a2471a387bd071f936b0a1e352b81cea24a7d329719c28c652738df.yml -openapi_spec_hash: b47b3fdce4626adc8193b4c340e340ed +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-cb825424a78065806e278b10053f1fa86b058c5921cd1897493bbe162a5a46bf.yml +openapi_spec_hash: fcaa9f922c209e43a9be57695f3ce6ad config_hash: f3eb5ca71172780678106f6d46f15dda diff --git a/src/supermemory/_client.py b/src/supermemory/_client.py index 3ee8280..fb27ca9 100644 --- a/src/supermemory/_client.py +++ b/src/supermemory/_client.py @@ -145,12 +145,14 @@ def search(self) -> SearchResource: @cached_property def settings(self) -> SettingsResource: + """Organization settings""" from .resources.settings import SettingsResource return SettingsResource(self) @cached_property def connections(self) -> ConnectionsResource: + """External service integrations""" from .resources.connections import ConnectionsResource return ConnectionsResource(self) @@ -458,12 +460,14 @@ def search(self) -> AsyncSearchResource: @cached_property def settings(self) -> AsyncSettingsResource: + """Organization settings""" from .resources.settings import AsyncSettingsResource return AsyncSettingsResource(self) @cached_property def connections(self) -> AsyncConnectionsResource: + """External service integrations""" from .resources.connections import AsyncConnectionsResource return AsyncConnectionsResource(self) @@ -729,12 +733,14 @@ def search(self) -> search.SearchResourceWithRawResponse: @cached_property def settings(self) -> settings.SettingsResourceWithRawResponse: + """Organization settings""" from .resources.settings import SettingsResourceWithRawResponse return SettingsResourceWithRawResponse(self._client.settings) @cached_property def connections(self) -> connections.ConnectionsResourceWithRawResponse: + """External service integrations""" from .resources.connections import ConnectionsResourceWithRawResponse return ConnectionsResourceWithRawResponse(self._client.connections) @@ -773,12 +779,14 @@ def search(self) -> search.AsyncSearchResourceWithRawResponse: @cached_property def settings(self) -> settings.AsyncSettingsResourceWithRawResponse: + """Organization settings""" from .resources.settings import AsyncSettingsResourceWithRawResponse return AsyncSettingsResourceWithRawResponse(self._client.settings) @cached_property def connections(self) -> connections.AsyncConnectionsResourceWithRawResponse: + """External service integrations""" from .resources.connections import AsyncConnectionsResourceWithRawResponse return AsyncConnectionsResourceWithRawResponse(self._client.connections) @@ -817,12 +825,14 @@ def search(self) -> search.SearchResourceWithStreamingResponse: @cached_property def settings(self) -> settings.SettingsResourceWithStreamingResponse: + """Organization settings""" from .resources.settings import SettingsResourceWithStreamingResponse return SettingsResourceWithStreamingResponse(self._client.settings) @cached_property def connections(self) -> connections.ConnectionsResourceWithStreamingResponse: + """External service integrations""" from .resources.connections import ConnectionsResourceWithStreamingResponse return ConnectionsResourceWithStreamingResponse(self._client.connections) @@ -861,12 +871,14 @@ def search(self) -> search.AsyncSearchResourceWithStreamingResponse: @cached_property def settings(self) -> settings.AsyncSettingsResourceWithStreamingResponse: + """Organization settings""" from .resources.settings import AsyncSettingsResourceWithStreamingResponse return AsyncSettingsResourceWithStreamingResponse(self._client.settings) @cached_property def connections(self) -> connections.AsyncConnectionsResourceWithStreamingResponse: + """External service integrations""" from .resources.connections import AsyncConnectionsResourceWithStreamingResponse return AsyncConnectionsResourceWithStreamingResponse(self._client.connections) diff --git a/src/supermemory/resources/connections.py b/src/supermemory/resources/connections.py index 221b888..6ebc71a 100644 --- a/src/supermemory/resources/connections.py +++ b/src/supermemory/resources/connections.py @@ -43,6 +43,8 @@ class ConnectionsResource(SyncAPIResource): + """External service integrations""" + @cached_property def with_raw_response(self) -> ConnectionsResourceWithRawResponse: """ @@ -457,6 +459,8 @@ def resources( class AsyncConnectionsResource(AsyncAPIResource): + """External service integrations""" + @cached_property def with_raw_response(self) -> AsyncConnectionsResourceWithRawResponse: """ diff --git a/src/supermemory/resources/documents.py b/src/supermemory/resources/documents.py index 2f026ee..44688ff 100644 --- a/src/supermemory/resources/documents.py +++ b/src/supermemory/resources/documents.py @@ -453,6 +453,7 @@ def upload_file( self, *, file: FileTypes, + container_tag: str | Omit = omit, container_tags: str | Omit = omit, file_type: str | Omit = omit, metadata: str | Omit = omit, @@ -471,6 +472,8 @@ def upload_file( Args: file: File to upload and process + container_tag: Optional container tag (e.g., 'user_123'). Use this for a single tag. + container_tags: Optional container tags. Can be either a JSON string of an array (e.g., '["user_123", "project_123"]') or a single string (e.g., 'user_123'). Single strings will be automatically converted to an array. @@ -502,6 +505,7 @@ def upload_file( body = deepcopy_minimal( { "file": file, + "container_tag": container_tag, "container_tags": container_tags, "file_type": file_type, "metadata": metadata, @@ -940,6 +944,7 @@ async def upload_file( self, *, file: FileTypes, + container_tag: str | Omit = omit, container_tags: str | Omit = omit, file_type: str | Omit = omit, metadata: str | Omit = omit, @@ -958,6 +963,8 @@ async def upload_file( Args: file: File to upload and process + container_tag: Optional container tag (e.g., 'user_123'). Use this for a single tag. + container_tags: Optional container tags. Can be either a JSON string of an array (e.g., '["user_123", "project_123"]') or a single string (e.g., 'user_123'). Single strings will be automatically converted to an array. @@ -989,6 +996,7 @@ async def upload_file( body = deepcopy_minimal( { "file": file, + "container_tag": container_tag, "container_tags": container_tags, "file_type": file_type, "metadata": metadata, diff --git a/src/supermemory/resources/settings.py b/src/supermemory/resources/settings.py index 1ff2b01..9bde5d5 100644 --- a/src/supermemory/resources/settings.py +++ b/src/supermemory/resources/settings.py @@ -25,6 +25,8 @@ class SettingsResource(SyncAPIResource): + """Organization settings""" + @cached_property def with_raw_response(self) -> SettingsResourceWithRawResponse: """ @@ -134,6 +136,8 @@ def get( class AsyncSettingsResource(AsyncAPIResource): + """Organization settings""" + @cached_property def with_raw_response(self) -> AsyncSettingsResourceWithRawResponse: """ diff --git a/src/supermemory/types/document_upload_file_params.py b/src/supermemory/types/document_upload_file_params.py index c4ab8ec..f7c9526 100644 --- a/src/supermemory/types/document_upload_file_params.py +++ b/src/supermemory/types/document_upload_file_params.py @@ -14,6 +14,9 @@ class DocumentUploadFileParams(TypedDict, total=False): file: Required[FileTypes] """File to upload and process""" + container_tag: Annotated[str, PropertyInfo(alias="containerTag")] + """Optional container tag (e.g., 'user_123'). Use this for a single tag.""" + container_tags: Annotated[str, PropertyInfo(alias="containerTags")] """Optional container tags. diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py index 53a1503..1e53699 100644 --- a/tests/api_resources/test_documents.py +++ b/tests/api_resources/test_documents.py @@ -426,6 +426,7 @@ def test_method_upload_file(self, client: Supermemory) -> None: def test_method_upload_file_with_all_params(self, client: Supermemory) -> None: document = client.documents.upload_file( file=b"Example data", + container_tag="user", container_tags='["user_123", "project_123"]', file_type="image", metadata='{"category": "technology", "isPublic": true, "readingTime": 5}', @@ -866,6 +867,7 @@ async def test_method_upload_file(self, async_client: AsyncSupermemory) -> None: async def test_method_upload_file_with_all_params(self, async_client: AsyncSupermemory) -> None: document = await async_client.documents.upload_file( file=b"Example data", + container_tag="user", container_tags='["user_123", "project_123"]', file_type="image", metadata='{"category": "technology", "isPublic": true, "readingTime": 5}', From cef70be10b18e42259cee2d4c525de4bcf66ca68 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2026 23:25:55 +0000 Subject: [PATCH 3/3] release: 3.33.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 9 +++++++++ pyproject.toml | 2 +- src/supermemory/_version.py | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 89303d5..df68d3d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.32.0" + ".": "3.33.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 90b535f..f6b636f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 3.33.0 (2026-04-06) + +Full Changelog: [v3.32.0...v3.33.0](https://github.com/supermemoryai/python-sdk/compare/v3.32.0...v3.33.0) + +### Features + +* **api:** api update ([0eaf416](https://github.com/supermemoryai/python-sdk/commit/0eaf416665d0dfb92e0119c54c11f170e0a1fe32)) +* **api:** api update ([5e2fc3b](https://github.com/supermemoryai/python-sdk/commit/5e2fc3b3b0aabe7f506284ae5922ab0c86b2eafb)) + ## 3.32.0 (2026-03-27) Full Changelog: [v3.31.0...v3.32.0](https://github.com/supermemoryai/python-sdk/compare/v3.31.0...v3.32.0) diff --git a/pyproject.toml b/pyproject.toml index 67a7f08..21e0a8f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "supermemory" -version = "3.32.0" +version = "3.33.0" description = "The official Python library for the supermemory API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/supermemory/_version.py b/src/supermemory/_version.py index 94421da..58787e5 100644 --- a/src/supermemory/_version.py +++ b/src/supermemory/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "supermemory" -__version__ = "3.32.0" # x-release-please-version +__version__ = "3.33.0" # x-release-please-version