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.9.0"
".": "3.10.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 24
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-3856961a8959b60dbf0b6912d69c23390fbbca1c5e31028dd0decc85234dd285.yml
openapi_spec_hash: 988a7d6d7cef81ceb4acda3ef9f8c21e
config_hash: 7dd9730225e87663fd62814dcfe62ba7
configured_endpoints: 26
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-c42d5f3942d6e32b6d1ed95d40bf6cca87aa8c715343444b97e0c68d44646878.yml
openapi_spec_hash: 952074229d1f810fe95aeee711db8ca4
config_hash: fc55f26858b03415a5838ec2731c1cc3
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 3.10.0 (2025-12-10)

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

### Features

* **api:** api update ([4b30459](https://github.com/supermemoryai/python-sdk/commit/4b3045968d0fccd106e87a1aa3f4c7c49a1475fe))
* **api:** api update ([8225250](https://github.com/supermemoryai/python-sdk/commit/822525089de88691c334f32b8ae3bf71096894e9))
* **api:** manual updates ([3691dfd](https://github.com/supermemoryai/python-sdk/commit/3691dfd45b9c8c15e8d318adc4b79e8c8ae9ed27))
* **api:** manual updates ([be8efa6](https://github.com/supermemoryai/python-sdk/commit/be8efa6ea1c7fdb58428741e7938540e266cbdc2))
* **api:** manual updates ([094162f](https://github.com/supermemoryai/python-sdk/commit/094162f52b3eba730f85176acfb5b5f34267449f))
* **api:** manual updates ([13a8b89](https://github.com/supermemoryai/python-sdk/commit/13a8b89e35e60356537d1c59c6721043e45d7577))
* **api:** manual updates ([acee529](https://github.com/supermemoryai/python-sdk/commit/acee529be2cdc01a6452cf3981575ece4905465a))
* **api:** manual updates ([ca75227](https://github.com/supermemoryai/python-sdk/commit/ca75227ff922f6d25d4a12e045066fe6545454af))

## 3.9.0 (2025-12-09)

Full Changelog: [v3.8.0...v3.9.0](https://github.com/supermemoryai/python-sdk/compare/v3.8.0...v3.9.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ from supermemory import Supermemory

client = Supermemory()

response = client.search(
response = client.search.memories(
q="machine learning concepts",
include={},
)
Expand Down
7 changes: 5 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
Types:

```python
from supermemory.types import AddResponse, ProfileResponse, SearchResponse
from supermemory.types import AddResponse, ProfileResponse
```

Methods:

- <code title="post /v3/documents">client.<a href="./src/supermemory/_client.py">add</a>(\*\*<a href="src/supermemory/types/client_add_params.py">params</a>) -> <a href="./src/supermemory/types/add_response.py">AddResponse</a></code>
- <code title="post /v4/profile">client.<a href="./src/supermemory/_client.py">profile</a>(\*\*<a href="src/supermemory/types/client_profile_params.py">params</a>) -> <a href="./src/supermemory/types/profile_response.py">ProfileResponse</a></code>
- <code title="post /v4/search">client.<a href="./src/supermemory/_client.py">search</a>(\*\*<a href="src/supermemory/types/client_search_params.py">params</a>) -> <a href="./src/supermemory/types/search_response.py">SearchResponse</a></code>

# Memories

Expand Down Expand Up @@ -48,8 +47,10 @@ from supermemory.types import (
DocumentUpdateResponse,
DocumentListResponse,
DocumentAddResponse,
DocumentBatchAddResponse,
DocumentDeleteBulkResponse,
DocumentGetResponse,
DocumentListProcessingResponse,
DocumentUploadFileResponse,
)
```
Expand All @@ -60,8 +61,10 @@ Methods:
- <code title="post /v3/documents/list">client.documents.<a href="./src/supermemory/resources/documents.py">list</a>(\*\*<a href="src/supermemory/types/document_list_params.py">params</a>) -> <a href="./src/supermemory/types/document_list_response.py">DocumentListResponse</a></code>
- <code title="delete /v3/documents/{id}">client.documents.<a href="./src/supermemory/resources/documents.py">delete</a>(id) -> None</code>
- <code title="post /v3/documents">client.documents.<a href="./src/supermemory/resources/documents.py">add</a>(\*\*<a href="src/supermemory/types/document_add_params.py">params</a>) -> <a href="./src/supermemory/types/document_add_response.py">DocumentAddResponse</a></code>
- <code title="post /v3/documents/batch">client.documents.<a href="./src/supermemory/resources/documents.py">batch_add</a>(\*\*<a href="src/supermemory/types/document_batch_add_params.py">params</a>) -> <a href="./src/supermemory/types/document_batch_add_response.py">DocumentBatchAddResponse</a></code>
- <code title="delete /v3/documents/bulk">client.documents.<a href="./src/supermemory/resources/documents.py">delete_bulk</a>(\*\*<a href="src/supermemory/types/document_delete_bulk_params.py">params</a>) -> <a href="./src/supermemory/types/document_delete_bulk_response.py">DocumentDeleteBulkResponse</a></code>
- <code title="get /v3/documents/{id}">client.documents.<a href="./src/supermemory/resources/documents.py">get</a>(id) -> <a href="./src/supermemory/types/document_get_response.py">DocumentGetResponse</a></code>
- <code title="get /v3/documents/processing">client.documents.<a href="./src/supermemory/resources/documents.py">list_processing</a>() -> <a href="./src/supermemory/types/document_list_processing_response.py">DocumentListProcessingResponse</a></code>
- <code title="post /v3/documents/file">client.documents.<a href="./src/supermemory/resources/documents.py">upload_file</a>(\*\*<a href="src/supermemory/types/document_upload_file_params.py">params</a>) -> <a href="./src/supermemory/types/document_upload_file_response.py">DocumentUploadFileResponse</a></code>

# Search
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.9.0"
version = "3.10.0"
description = "The official Python library for the supermemory API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
155 changes: 1 addition & 154 deletions src/supermemory/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from . import _exceptions
from ._qs import Querystring
from .types import client_add_params, client_search_params, client_profile_params
from .types import client_add_params, client_profile_params
from ._types import (
Body,
Omit,
Expand Down Expand Up @@ -48,7 +48,6 @@
make_request_options,
)
from .types.add_response import AddResponse
from .types.search_response import SearchResponse
from .types.profile_response import ProfileResponse

__all__ = [
Expand Down Expand Up @@ -305,76 +304,6 @@ def profile(
cast_to=ProfileResponse,
)

def search(
self,
*,
q: str,
container_tag: str | Omit = omit,
filters: client_search_params.Filters | Omit = omit,
include: client_search_params.Include | Omit = omit,
limit: int | Omit = omit,
rerank: bool | Omit = omit,
rewrite_query: bool | Omit = omit,
threshold: float | 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.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SearchResponse:
"""
Search memory entries - Low latency for conversational

Args:
q: Search query string

container_tag: Optional tag this search should be containerized by. This can be an ID for your
user, a project ID, or any other identifier you wish to use to filter memories.

filters: Optional filters to apply to the search. Can be a JSON string or Query object.

limit: Maximum number of results to return

rerank: If true, rerank the results based on the query. This is helpful if you want to
ensure the most relevant results are returned.

rewrite_query: If true, rewrites the query to make it easier to find documents. This increases
the latency by about 400ms

threshold: Threshold / sensitivity for memories selection. 0 is least sensitive (returns
most memories, more results), 1 is most sensitive (returns lesser memories,
accurate results)

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
return self.post(
"/v4/search",
body=maybe_transform(
{
"q": q,
"container_tag": container_tag,
"filters": filters,
"include": include,
"limit": limit,
"rerank": rerank,
"rewrite_query": rewrite_query,
"threshold": threshold,
},
client_search_params.ClientSearchParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=SearchResponse,
)

@override
def _make_status_error(
self,
Expand Down Expand Up @@ -651,76 +580,6 @@ async def profile(
cast_to=ProfileResponse,
)

async def search(
self,
*,
q: str,
container_tag: str | Omit = omit,
filters: client_search_params.Filters | Omit = omit,
include: client_search_params.Include | Omit = omit,
limit: int | Omit = omit,
rerank: bool | Omit = omit,
rewrite_query: bool | Omit = omit,
threshold: float | 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.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SearchResponse:
"""
Search memory entries - Low latency for conversational

Args:
q: Search query string

container_tag: Optional tag this search should be containerized by. This can be an ID for your
user, a project ID, or any other identifier you wish to use to filter memories.

filters: Optional filters to apply to the search. Can be a JSON string or Query object.

limit: Maximum number of results to return

rerank: If true, rerank the results based on the query. This is helpful if you want to
ensure the most relevant results are returned.

rewrite_query: If true, rewrites the query to make it easier to find documents. This increases
the latency by about 400ms

threshold: Threshold / sensitivity for memories selection. 0 is least sensitive (returns
most memories, more results), 1 is most sensitive (returns lesser memories,
accurate results)

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
return await self.post(
"/v4/search",
body=await async_maybe_transform(
{
"q": q,
"container_tag": container_tag,
"filters": filters,
"include": include,
"limit": limit,
"rerank": rerank,
"rewrite_query": rewrite_query,
"threshold": threshold,
},
client_search_params.ClientSearchParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=SearchResponse,
)

@override
def _make_status_error(
self,
Expand Down Expand Up @@ -769,9 +628,6 @@ def __init__(self, client: Supermemory) -> None:
self.profile = to_raw_response_wrapper(
client.profile,
)
self.search = to_raw_response_wrapper(
client.search,
)


class AsyncSupermemoryWithRawResponse:
Expand All @@ -788,9 +644,6 @@ def __init__(self, client: AsyncSupermemory) -> None:
self.profile = async_to_raw_response_wrapper(
client.profile,
)
self.search = async_to_raw_response_wrapper(
client.search,
)


class SupermemoryWithStreamedResponse:
Expand All @@ -807,9 +660,6 @@ def __init__(self, client: Supermemory) -> None:
self.profile = to_streamed_response_wrapper(
client.profile,
)
self.search = to_streamed_response_wrapper(
client.search,
)


class AsyncSupermemoryWithStreamedResponse:
Expand All @@ -826,9 +676,6 @@ def __init__(self, client: AsyncSupermemory) -> None:
self.profile = async_to_streamed_response_wrapper(
client.profile,
)
self.search = async_to_streamed_response_wrapper(
client.search,
)


Client = Supermemory
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.9.0" # x-release-please-version
__version__ = "3.10.0" # x-release-please-version
Loading