diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 27d2fbb..078b9e2 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/.stats.yml b/.stats.yml index fa22dd0..6e2570c 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/CHANGELOG.md b/CHANGELOG.md index 0a6f9c7..1c81513 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 e7dcc47..c1c60c5 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 3beee28..09e03d3 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 diff --git a/src/supermemory/types/search_memories_params.py b/src/supermemory/types/search_memories_params.py index 20328dc..e41511a 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 9f78cf4..cc0e689 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 0cdb87c..36860ea 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,