diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5d9bde2..0bb2e42 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.37.0" + ".": "3.38.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 561f9fe..485cf29 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-f979eba02e9720ab41111944b4f4441caf9b3f0c56e1d85ac4ddd4a2b0fa7ede.yml -openapi_spec_hash: aacf6838b9ec2431611e87fab118d913 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc/supermemory-new-5e1ac142b427e15ca46d0920c4d65c6e1f464e46ce014e42cd5a716f97b820ab.yml +openapi_spec_hash: f0d9f62796cf1fb5dd79dad7b1c692fd config_hash: cde97ef3188581c5f4924c633ec33ddb diff --git a/CHANGELOG.md b/CHANGELOG.md index ad5c9f8..bad0e98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 3.38.0 (2026-05-08) + +Full Changelog: [v3.37.0...v3.38.0](https://github.com/supermemoryai/python-sdk/compare/v3.37.0...v3.38.0) + +### Features + +* **api:** api update ([25be280](https://github.com/supermemoryai/python-sdk/commit/25be280240889b7ecadc3727aabdf85d614f38ec)) + + +### Chores + +* **internal:** reformat pyproject.toml ([1d58848](https://github.com/supermemoryai/python-sdk/commit/1d58848385ad806699a3c4ef6d40dd606e27f8b1)) + ## 3.37.0 (2026-04-28) Full Changelog: [v3.36.0...v3.37.0](https://github.com/supermemoryai/python-sdk/compare/v3.36.0...v3.37.0) diff --git a/pyproject.toml b/pyproject.toml index 478e8bf..3de4295 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "supermemory" -version = "3.37.0" +version = "3.38.0" description = "The official Python library for the supermemory API" dynamic = ["readme"] license = "Apache-2.0" @@ -168,7 +168,7 @@ show_error_codes = true # # We also exclude our `tests` as mypy doesn't always infer # types correctly and Pyright will still catch any type errors. -exclude = ['src/supermemory/_files.py', '_dev/.*.py', 'tests/.*'] +exclude = ["src/supermemory/_files.py", "_dev/.*.py", "tests/.*"] strict_equality = true implicit_reexport = true diff --git a/src/supermemory/_version.py b/src/supermemory/_version.py index ce33f78..15c5a2a 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.37.0" # x-release-please-version +__version__ = "3.38.0" # x-release-please-version diff --git a/src/supermemory/resources/documents.py b/src/supermemory/resources/documents.py index c193aaf..74ba6a4 100644 --- a/src/supermemory/resources/documents.py +++ b/src/supermemory/resources/documents.py @@ -496,6 +496,8 @@ def upload_file( file: FileTypes, container_tag: str | Omit = omit, container_tags: str | Omit = omit, + custom_id: str | Omit = omit, + entity_context: str | Omit = omit, filepath: str | Omit = omit, file_type: str | Omit = omit, metadata: str | Omit = omit, @@ -521,6 +523,12 @@ def upload_file( '["user_123", "project_123"]') or a single string (e.g., 'user_123'). Single strings will be automatically converted to an array. + custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with + hyphens, underscores, and colons only. + + entity_context: Optional entity context for this container tag. Max 1500 characters. Used during + document processing to guide memory extraction. + filepath: Optional file path for the uploaded file (e.g., '/documents/reports/file.pdf'). Used by supermemoryfs to map documents to filesystem paths. @@ -556,6 +564,8 @@ def upload_file( "file": file, "container_tag": container_tag, "container_tags": container_tags, + "custom_id": custom_id, + "entity_context": entity_context, "filepath": filepath, "file_type": file_type, "metadata": metadata, @@ -1038,6 +1048,8 @@ async def upload_file( file: FileTypes, container_tag: str | Omit = omit, container_tags: str | Omit = omit, + custom_id: str | Omit = omit, + entity_context: str | Omit = omit, filepath: str | Omit = omit, file_type: str | Omit = omit, metadata: str | Omit = omit, @@ -1063,6 +1075,12 @@ async def upload_file( '["user_123", "project_123"]') or a single string (e.g., 'user_123'). Single strings will be automatically converted to an array. + custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with + hyphens, underscores, and colons only. + + entity_context: Optional entity context for this container tag. Max 1500 characters. Used during + document processing to guide memory extraction. + filepath: Optional file path for the uploaded file (e.g., '/documents/reports/file.pdf'). Used by supermemoryfs to map documents to filesystem paths. @@ -1098,6 +1116,8 @@ async def upload_file( "file": file, "container_tag": container_tag, "container_tags": container_tags, + "custom_id": custom_id, + "entity_context": entity_context, "filepath": filepath, "file_type": file_type, "metadata": metadata, diff --git a/src/supermemory/types/document_upload_file_params.py b/src/supermemory/types/document_upload_file_params.py index 507fc87..c23911f 100644 --- a/src/supermemory/types/document_upload_file_params.py +++ b/src/supermemory/types/document_upload_file_params.py @@ -25,6 +25,18 @@ class DocumentUploadFileParams(TypedDict, total=False): converted to an array. """ + custom_id: Annotated[str, PropertyInfo(alias="customId")] + """Optional custom ID of the document. + + Max 100 characters, alphanumeric with hyphens, underscores, and colons only. + """ + + entity_context: Annotated[str, PropertyInfo(alias="entityContext")] + """Optional entity context for this container tag. + + Max 1500 characters. Used during document processing to guide memory extraction. + """ + filepath: str """Optional file path for the uploaded file (e.g., '/documents/reports/file.pdf'). diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py index 684058a..6abdf99 100644 --- a/tests/api_resources/test_documents.py +++ b/tests/api_resources/test_documents.py @@ -438,6 +438,8 @@ def test_method_upload_file_with_all_params(self, client: Supermemory) -> None: file=b"Example data", container_tag="user", container_tags='["user_123", "project_123"]', + custom_id="mem_abc123", + entity_context="This user is a software engineer who prefers concise technical documentation.", filepath="/documents/reports/file.pdf", file_type="image", metadata='{"category": "technology", "isPublic": true, "readingTime": 5}', @@ -891,6 +893,8 @@ async def test_method_upload_file_with_all_params(self, async_client: AsyncSuper file=b"Example data", container_tag="user", container_tags='["user_123", "project_123"]', + custom_id="mem_abc123", + entity_context="This user is a software engineer who prefers concise technical documentation.", filepath="/documents/reports/file.pdf", file_type="image", metadata='{"category": "technology", "isPublic": true, "readingTime": 5}',