From a6a18ce48bb1f1f80f4cfe6a9c3b0c9ff4f9fbcb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 27 Nov 2025 16:21:13 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 4 ++-- .../types/search_memories_params.py | 6 ++++++ .../types/search_memories_response.py | 18 ++++++++++++++++++ tests/api_resources/test_search.py | 2 ++ 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index fa22dd06..6e2570c9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 19 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-ebd5e757d0e76cb83013e01a1e0bb3dba62beb83b2a2ffa28d148ea032e96fd0.yml -openapi_spec_hash: f930474a6ad230545154244045cc602e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-8f3109ed6b4537d66c1d430e552cb6d90323c2b495487132f5c5fc7fb0f91478.yml +openapi_spec_hash: e2f06a2c0e73fb52262924ecd4027a6c config_hash: ec08a36e60458b4d83e71798a8043484 diff --git a/src/supermemory/types/search_memories_params.py b/src/supermemory/types/search_memories_params.py index 20328dc7..e41511a7 100644 --- a/src/supermemory/types/search_memories_params.py +++ b/src/supermemory/types/search_memories_params.py @@ -61,6 +61,12 @@ class FiltersAnd(TypedDict, total=False): class Include(TypedDict, total=False): + chunks: bool + """ + If true, fetch and return chunks from documents associated with the found + memories. Performs vector search on chunks within those documents. + """ + documents: bool forgotten_memories: Annotated[bool, PropertyInfo(alias="forgottenMemories")] diff --git a/src/supermemory/types/search_memories_response.py b/src/supermemory/types/search_memories_response.py index 9f78cf40..cc0e6896 100644 --- a/src/supermemory/types/search_memories_response.py +++ b/src/supermemory/types/search_memories_response.py @@ -10,6 +10,7 @@ __all__ = [ "SearchMemoriesResponse", "Result", + "ResultChunk", "ResultContext", "ResultContextChild", "ResultContextParent", @@ -17,6 +18,20 @@ ] +class ResultChunk(BaseModel): + content: str + """Content of the chunk""" + + document_id: str = FieldInfo(alias="documentId") + """ID of the document this chunk belongs to""" + + position: float + """Position of chunk in the document (0-indexed)""" + + score: float + """Similarity score between the query and chunk""" + + class ResultContextChild(BaseModel): memory: str """The contextual memory content""" @@ -102,6 +117,9 @@ class Result(BaseModel): updated_at: str = FieldInfo(alias="updatedAt") """Memory last update date""" + chunks: Optional[List[ResultChunk]] = None + """Relevant chunks from associated documents (only included when chunks=true)""" + context: Optional[ResultContext] = None """Object containing arrays of parent and child contextual memories""" diff --git a/tests/api_resources/test_search.py b/tests/api_resources/test_search.py index 0cdb87c7..36860eaa 100644 --- a/tests/api_resources/test_search.py +++ b/tests/api_resources/test_search.py @@ -145,6 +145,7 @@ def test_method_memories_with_all_params(self, client: Supermemory) -> None: container_tag="user_123", filters={"or_": [{}]}, include={ + "chunks": False, "documents": True, "forgotten_memories": False, "related_memories": True, @@ -313,6 +314,7 @@ async def test_method_memories_with_all_params(self, async_client: AsyncSupermem container_tag="user_123", filters={"or_": [{}]}, include={ + "chunks": False, "documents": True, "forgotten_memories": False, "related_memories": True, From f167fbe733dab6d81900414349eaf58d935efc8f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 27 Nov 2025 16:21:31 +0000 Subject: [PATCH 2/2] release: 3.8.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/supermemory/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 27d2fbbc..078b9e28 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.7.0" + ".": "3.8.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a6f9c74..1c815133 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 3.8.0 (2025-11-27) + +Full Changelog: [v3.7.0...v3.8.0](https://github.com/supermemoryai/python-sdk/compare/v3.7.0...v3.8.0) + +### Features + +* **api:** api update ([a6a18ce](https://github.com/supermemoryai/python-sdk/commit/a6a18ce48bb1f1f80f4cfe6a9c3b0c9ff4f9fbcb)) + ## 3.7.0 (2025-11-26) Full Changelog: [v3.6.0...v3.7.0](https://github.com/supermemoryai/python-sdk/compare/v3.6.0...v3.7.0) diff --git a/pyproject.toml b/pyproject.toml index e7dcc47a..c1c60c59 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "supermemory" -version = "3.7.0" +version = "3.8.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 3beee285..09e03d3e 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.7.0" # x-release-please-version +__version__ = "3.8.0" # x-release-please-version