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.2.0"
".": "3.3.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: 18
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-f35c8c3182ef17698350347936848877f3ed8a8af8fcfdc3471506309ff0b9ce.yml
openapi_spec_hash: f58c1f9350390517a31e0f241245adc3
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-0606bdf6929173c39cecc0ce0da252d509a38fbc98e7b8ddd64bdee5812625b9.yml
openapi_spec_hash: c6c376e6d59b3c01e38559a2a74b075e
config_hash: 5deef1e3a49e3a7816348fbf7ba259bf
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 3.3.0 (2025-09-21)

Full Changelog: [v3.2.0...v3.3.0](https://github.com/supermemoryai/python-sdk/compare/v3.2.0...v3.3.0)

### Features

* **api:** api update ([fd86dc5](https://github.com/supermemoryai/python-sdk/commit/fd86dc5ee1a83000113c7dcc8ba678af94d825bd))

## 3.2.0 (2025-09-21)

Full Changelog: [v3.1.0...v3.2.0](https://github.com/supermemoryai/python-sdk/compare/v3.1.0...v3.2.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "supermemory"
version = "3.2.0"
version = "3.3.0"
description = "The official Python library for the supermemory API"
dynamic = ["readme"]
license = "Apache-2.0"
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.2.0" # x-release-please-version
__version__ = "3.3.0" # x-release-please-version
12 changes: 12 additions & 0 deletions src/supermemory/resources/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ def upload_file(
file: FileTypes,
container_tags: str | Omit = omit,
file_type: str | Omit = omit,
metadata: str | Omit = omit,
mime_type: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand All @@ -378,6 +379,10 @@ def upload_file(
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
notion_doc, webpage, onedrive

metadata: Optional metadata for the document as a JSON string. This is used to store
additional information about the document. Keys must be strings and values can
be strings, numbers, or booleans.

mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')

Expand All @@ -394,6 +399,7 @@ def upload_file(
"file": file,
"container_tags": container_tags,
"file_type": file_type,
"metadata": metadata,
"mime_type": mime_type,
}
)
Expand Down Expand Up @@ -741,6 +747,7 @@ async def upload_file(
file: FileTypes,
container_tags: str | Omit = omit,
file_type: str | Omit = omit,
metadata: str | Omit = omit,
mime_type: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand All @@ -763,6 +770,10 @@ async def upload_file(
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
notion_doc, webpage, onedrive

metadata: Optional metadata for the document as a JSON string. This is used to store
additional information about the document. Keys must be strings and values can
be strings, numbers, or booleans.

mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')

Expand All @@ -779,6 +790,7 @@ async def upload_file(
"file": file,
"container_tags": container_tags,
"file_type": file_type,
"metadata": metadata,
"mime_type": mime_type,
}
)
Expand Down
12 changes: 12 additions & 0 deletions src/supermemory/resources/memories.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ def upload_file(
file: FileTypes,
container_tags: str | Omit = omit,
file_type: str | Omit = omit,
metadata: str | Omit = omit,
mime_type: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand All @@ -378,6 +379,10 @@ def upload_file(
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
notion_doc, webpage, onedrive

metadata: Optional metadata for the document as a JSON string. This is used to store
additional information about the document. Keys must be strings and values can
be strings, numbers, or booleans.

mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')

Expand All @@ -394,6 +399,7 @@ def upload_file(
"file": file,
"container_tags": container_tags,
"file_type": file_type,
"metadata": metadata,
"mime_type": mime_type,
}
)
Expand Down Expand Up @@ -741,6 +747,7 @@ async def upload_file(
file: FileTypes,
container_tags: str | Omit = omit,
file_type: str | Omit = omit,
metadata: str | Omit = omit,
mime_type: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand All @@ -763,6 +770,10 @@ async def upload_file(
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
notion_doc, webpage, onedrive

metadata: Optional metadata for the document as a JSON string. This is used to store
additional information about the document. Keys must be strings and values can
be strings, numbers, or booleans.

mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')

Expand All @@ -779,6 +790,7 @@ async def upload_file(
"file": file,
"container_tags": container_tags,
"file_type": file_type,
"metadata": metadata,
"mime_type": mime_type,
}
)
Expand Down
7 changes: 7 additions & 0 deletions src/supermemory/types/document_upload_file_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ class DocumentUploadFileParams(TypedDict, total=False):
video, notion_doc, webpage, onedrive
"""

metadata: str
"""Optional metadata for the document as a JSON string.

This is used to store additional information about the document. Keys must be
strings and values can be strings, numbers, or booleans.
"""

mime_type: Annotated[str, PropertyInfo(alias="mimeType")]
"""Required when fileType is 'image' or 'video'.

Expand Down
7 changes: 7 additions & 0 deletions src/supermemory/types/memory_upload_file_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ class MemoryUploadFileParams(TypedDict, total=False):
video, notion_doc, webpage, onedrive
"""

metadata: str
"""Optional metadata for the document as a JSON string.

This is used to store additional information about the document. Keys must be
strings and values can be strings, numbers, or booleans.
"""

mime_type: Annotated[str, PropertyInfo(alias="mimeType")]
"""Required when fileType is 'image' or 'video'.

Expand Down
2 changes: 2 additions & 0 deletions tests/api_resources/test_documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ def test_method_upload_file_with_all_params(self, client: Supermemory) -> None:
file=b"raw file contents",
container_tags='["user_123", "project_123"]',
file_type="image",
metadata='{"category": "technology", "isPublic": true, "readingTime": 5}',
mime_type="image/png",
)
assert_matches_type(DocumentUploadFileResponse, document, path=["response"])
Expand Down Expand Up @@ -613,6 +614,7 @@ async def test_method_upload_file_with_all_params(self, async_client: AsyncSuper
file=b"raw file contents",
container_tags='["user_123", "project_123"]',
file_type="image",
metadata='{"category": "technology", "isPublic": true, "readingTime": 5}',
mime_type="image/png",
)
assert_matches_type(DocumentUploadFileResponse, document, path=["response"])
Expand Down
2 changes: 2 additions & 0 deletions tests/api_resources/test_memories.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ def test_method_upload_file_with_all_params(self, client: Supermemory) -> None:
file=b"raw file contents",
container_tags='["user_123", "project_123"]',
file_type="image",
metadata='{"category": "technology", "isPublic": true, "readingTime": 5}',
mime_type="image/png",
)
assert_matches_type(MemoryUploadFileResponse, memory, path=["response"])
Expand Down Expand Up @@ -613,6 +614,7 @@ async def test_method_upload_file_with_all_params(self, async_client: AsyncSuper
file=b"raw file contents",
container_tags='["user_123", "project_123"]',
file_type="image",
metadata='{"category": "technology", "isPublic": true, "readingTime": 5}',
mime_type="image/png",
)
assert_matches_type(MemoryUploadFileResponse, memory, path=["response"])
Expand Down