Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "3.37.0"
".": "3.38.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/supermemory/_version.py
Original file line number Diff line number Diff line change
@@ -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
20 changes: 20 additions & 0 deletions src/supermemory/resources/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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.

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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.

Expand Down Expand Up @@ -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,
Expand Down
12 changes: 12 additions & 0 deletions src/supermemory/types/document_upload_file_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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').

Expand Down
4 changes: 4 additions & 0 deletions tests/api_resources/test_documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}',
Expand Down Expand Up @@ -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}',
Expand Down