supermemory 3.0.0a29__tar.gz → 3.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- supermemory-3.1.0/.release-please-manifest.json +3 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/CHANGELOG.md +39 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/PKG-INFO +18 -8
- {supermemory-3.0.0a29 → supermemory-3.1.0}/README.md +17 -7
- {supermemory-3.0.0a29 → supermemory-3.1.0}/api.md +29 -6
- {supermemory-3.0.0a29 → supermemory-3.1.0}/pyproject.toml +53 -2
- {supermemory-3.0.0a29 → supermemory-3.1.0}/requirements-dev.lock +5 -3
- {supermemory-3.0.0a29 → supermemory-3.1.0}/requirements.lock +5 -2
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/__init__.py +3 -1
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/_base_client.py +12 -12
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/_client.py +17 -9
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/_compat.py +48 -48
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/_models.py +50 -44
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/_qs.py +7 -7
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/_types.py +53 -12
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/_utils/__init__.py +9 -2
- supermemory-3.1.0/src/supermemory/_utils/_compat.py +45 -0
- supermemory-3.1.0/src/supermemory/_utils/_datetime_parse.py +136 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/_utils/_transform.py +13 -3
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/_utils/_typing.py +6 -1
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/_utils/_utils.py +4 -5
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/_version.py +1 -1
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/resources/__init__.py +14 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/resources/connections.py +36 -36
- supermemory-3.1.0/src/supermemory/resources/documents.py +894 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/resources/memories.py +222 -134
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/resources/search.py +79 -79
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/resources/settings.py +31 -31
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/__init__.py +9 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/connection_create_params.py +3 -2
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/connection_delete_by_provider_params.py +2 -2
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/connection_get_by_tags_params.py +2 -2
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/connection_import_params.py +2 -2
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/connection_list_documents_params.py +2 -2
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/connection_list_params.py +2 -2
- supermemory-3.1.0/src/supermemory/types/document_add_params.py +69 -0
- supermemory-3.1.0/src/supermemory/types/document_add_response.py +11 -0
- supermemory-3.1.0/src/supermemory/types/document_get_response.py +104 -0
- supermemory-3.1.0/src/supermemory/types/document_list_params.py +111 -0
- supermemory-3.1.0/src/supermemory/types/document_list_response.py +95 -0
- supermemory-3.1.0/src/supermemory/types/document_update_params.py +69 -0
- supermemory-3.1.0/src/supermemory/types/document_update_response.py +11 -0
- supermemory-3.1.0/src/supermemory/types/document_upload_file_params.py +36 -0
- supermemory-3.1.0/src/supermemory/types/document_upload_file_response.py +11 -0
- supermemory-3.1.0/src/supermemory/types/memory_add_params.py +69 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/memory_get_response.py +21 -20
- supermemory-3.1.0/src/supermemory/types/memory_list_params.py +111 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/memory_list_response.py +18 -17
- supermemory-3.1.0/src/supermemory/types/memory_update_params.py +69 -0
- supermemory-3.1.0/src/supermemory/types/memory_upload_file_params.py +36 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/search_documents_params.py +71 -9
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/search_execute_params.py +71 -9
- supermemory-3.1.0/src/supermemory/types/search_memories_params.py +135 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/search_memories_response.py +10 -7
- supermemory-3.1.0/tests/api_resources/test_documents.py +644 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/tests/api_resources/test_memories.py +70 -12
- {supermemory-3.0.0a29 → supermemory-3.1.0}/tests/api_resources/test_search.py +44 -36
- {supermemory-3.0.0a29 → supermemory-3.1.0}/tests/test_client.py +50 -67
- {supermemory-3.0.0a29 → supermemory-3.1.0}/tests/test_models.py +24 -24
- {supermemory-3.0.0a29 → supermemory-3.1.0}/tests/test_transform.py +17 -10
- supermemory-3.1.0/tests/test_utils/test_datetime_parse.py +110 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/tests/utils.py +13 -5
- supermemory-3.0.0a29/.release-please-manifest.json +0 -3
- supermemory-3.0.0a29/mypy.ini +0 -50
- supermemory-3.0.0a29/src/supermemory/types/memory_add_params.py +0 -53
- supermemory-3.0.0a29/src/supermemory/types/memory_list_params.py +0 -40
- supermemory-3.0.0a29/src/supermemory/types/memory_update_params.py +0 -53
- supermemory-3.0.0a29/src/supermemory/types/memory_upload_file_params.py +0 -16
- supermemory-3.0.0a29/src/supermemory/types/search_memories_params.py +0 -66
- {supermemory-3.0.0a29 → supermemory-3.1.0}/.gitignore +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/CONTRIBUTING.md +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/LICENSE +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/SECURITY.md +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/bin/check-release-environment +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/bin/publish-pypi +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/examples/.keep +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/noxfile.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/release-please-config.json +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/_constants.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/_exceptions.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/_files.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/_resource.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/_response.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/_streaming.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/_utils/_logs.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/_utils/_proxy.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/_utils/_reflection.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/_utils/_resources_proxy.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/_utils/_streams.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/_utils/_sync.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/lib/.keep +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/py.typed +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/connection_create_response.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/connection_delete_by_id_response.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/connection_delete_by_provider_response.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/connection_get_by_id_response.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/connection_get_by_tags_response.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/connection_import_response.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/connection_list_documents_response.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/connection_list_response.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/memory_add_response.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/memory_update_response.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/memory_upload_file_response.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/search_documents_response.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/search_execute_response.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/setting_get_response.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/setting_update_params.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory/types/setting_update_response.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/src/supermemory_new/lib/.keep +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/tests/__init__.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/tests/api_resources/__init__.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/tests/api_resources/test_connections.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/tests/api_resources/test_settings.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/tests/conftest.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/tests/sample_file.txt +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/tests/test_deepcopy.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/tests/test_extract_files.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/tests/test_files.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/tests/test_qs.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/tests/test_required_args.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/tests/test_response.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/tests/test_streaming.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/tests/test_utils/test_proxy.py +0 -0
- {supermemory-3.0.0a29 → supermemory-3.1.0}/tests/test_utils/test_typing.py +0 -0
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.1.0 (2025-09-20)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v3.0.0-alpha.30...v3.1.0](https://github.com/supermemoryai/python-sdk/compare/v3.0.0-alpha.30...v3.1.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([19c5dd3](https://github.com/supermemoryai/python-sdk/commit/19c5dd364b496d9a7858e1764000aba6d71613c6))
|
|
10
|
+
* **api:** api update ([3082481](https://github.com/supermemoryai/python-sdk/commit/30824814233753584a89c56a2efb69d72995be02))
|
|
11
|
+
* **api:** manual updates ([e92cb27](https://github.com/supermemoryai/python-sdk/commit/e92cb27550c2190a6804a2865ae359ff79fa1866))
|
|
12
|
+
* **api:** manual updates ([251fdf1](https://github.com/supermemoryai/python-sdk/commit/251fdf116f5f1b0c1ecfb74bef94ba08f7921dca))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Chores
|
|
16
|
+
|
|
17
|
+
* do not install brew dependencies in ./scripts/bootstrap by default ([fb748cf](https://github.com/supermemoryai/python-sdk/commit/fb748cf2375b1ce1eddd2584503e81d3b8386443))
|
|
18
|
+
* **internal:** update pydantic dependency ([8c480f7](https://github.com/supermemoryai/python-sdk/commit/8c480f70cf3d0e55c4c5bc3b77d83bd6b21c4fdf))
|
|
19
|
+
* **types:** change optional parameter type from NotGiven to Omit ([3031781](https://github.com/supermemoryai/python-sdk/commit/30317810d7089dbdf59f5e143bd66b1a0495b2b6))
|
|
20
|
+
|
|
21
|
+
## 3.0.0-alpha.30 (2025-09-15)
|
|
22
|
+
|
|
23
|
+
Full Changelog: [v3.0.0-alpha.29...v3.0.0-alpha.30](https://github.com/supermemoryai/python-sdk/compare/v3.0.0-alpha.29...v3.0.0-alpha.30)
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **api:** api update ([b7df28e](https://github.com/supermemoryai/python-sdk/commit/b7df28ec025c70d7b8e1544aa1ef0262c0be8a03))
|
|
28
|
+
* **api:** api update ([54cf9c1](https://github.com/supermemoryai/python-sdk/commit/54cf9c13bf3ff378dd6a19a15c9e343e822ab99a))
|
|
29
|
+
* **api:** api update ([4812077](https://github.com/supermemoryai/python-sdk/commit/48120771b2476f2d2863a1614edc222e863ddde4))
|
|
30
|
+
* **api:** api update ([a4f4259](https://github.com/supermemoryai/python-sdk/commit/a4f425943298762bdfb7f3b0421f8d56d2e1473c))
|
|
31
|
+
* **api:** api update ([8412e4d](https://github.com/supermemoryai/python-sdk/commit/8412e4d06b0225fd3707a55b743c401d87b1c0aa))
|
|
32
|
+
* improve future compat with pydantic v3 ([70ea8b7](https://github.com/supermemoryai/python-sdk/commit/70ea8b7206b2e8db3d86f5a1674e7dd2f7a7e67b))
|
|
33
|
+
* **types:** replace List[str] with SequenceNotStr in params ([f4bfda3](https://github.com/supermemoryai/python-sdk/commit/f4bfda34d40ca947eae6a32ea323dafeddf51484))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Chores
|
|
37
|
+
|
|
38
|
+
* **internal:** add Sequence related utils ([d2b96ed](https://github.com/supermemoryai/python-sdk/commit/d2b96ed43577a3d046ffea7cbc87ba6b877beba7))
|
|
39
|
+
* **internal:** move mypy configurations to `pyproject.toml` file ([31832f5](https://github.com/supermemoryai/python-sdk/commit/31832f5046f7b6384c1bb506680319890e3a5194))
|
|
40
|
+
* **tests:** simplify `get_platform` test ([30d8e46](https://github.com/supermemoryai/python-sdk/commit/30d8e464a5d8ceb5cec41a6197c291962b78b0b5))
|
|
41
|
+
|
|
3
42
|
## 3.0.0-alpha.29 (2025-08-27)
|
|
4
43
|
|
|
5
44
|
Full Changelog: [v3.0.0-alpha.28...v3.0.0-alpha.29](https://github.com/supermemoryai/python-sdk/compare/v3.0.0-alpha.28...v3.0.0-alpha.29)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: supermemory
|
|
3
|
-
Version: 3.0
|
|
3
|
+
Version: 3.1.0
|
|
4
4
|
Summary: The official Python library for the supermemory API
|
|
5
5
|
Project-URL: Homepage, https://github.com/supermemoryai/python-sdk
|
|
6
6
|
Project-URL: Repository, https://github.com/supermemoryai/python-sdk
|
|
@@ -52,7 +52,7 @@ The REST API documentation can be found on [docs.supermemory.ai](https://docs.su
|
|
|
52
52
|
|
|
53
53
|
```sh
|
|
54
54
|
# install from PyPI
|
|
55
|
-
pip install
|
|
55
|
+
pip install supermemory
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
## Usage
|
|
@@ -112,7 +112,7 @@ You can enable this by installing `aiohttp`:
|
|
|
112
112
|
|
|
113
113
|
```sh
|
|
114
114
|
# install from PyPI
|
|
115
|
-
pip install
|
|
115
|
+
pip install supermemory[aiohttp]
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
|
|
@@ -195,7 +195,9 @@ from supermemory import Supermemory
|
|
|
195
195
|
client = Supermemory()
|
|
196
196
|
|
|
197
197
|
try:
|
|
198
|
-
client.memories.add(
|
|
198
|
+
client.memories.add(
|
|
199
|
+
content="This is a detailed article about machine learning concepts...",
|
|
200
|
+
)
|
|
199
201
|
except supermemory.APIConnectionError as e:
|
|
200
202
|
print("The server could not be reached")
|
|
201
203
|
print(e.__cause__) # an underlying Exception, likely raised within httpx.
|
|
@@ -238,7 +240,9 @@ client = Supermemory(
|
|
|
238
240
|
)
|
|
239
241
|
|
|
240
242
|
# Or, configure per-request:
|
|
241
|
-
client.with_options(max_retries=5).memories.add(
|
|
243
|
+
client.with_options(max_retries=5).memories.add(
|
|
244
|
+
content="This is a detailed article about machine learning concepts...",
|
|
245
|
+
)
|
|
242
246
|
```
|
|
243
247
|
|
|
244
248
|
### Timeouts
|
|
@@ -261,7 +265,9 @@ client = Supermemory(
|
|
|
261
265
|
)
|
|
262
266
|
|
|
263
267
|
# Override per-request:
|
|
264
|
-
client.with_options(timeout=5.0).memories.add(
|
|
268
|
+
client.with_options(timeout=5.0).memories.add(
|
|
269
|
+
content="This is a detailed article about machine learning concepts...",
|
|
270
|
+
)
|
|
265
271
|
```
|
|
266
272
|
|
|
267
273
|
On timeout, an `APITimeoutError` is thrown.
|
|
@@ -302,7 +308,9 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
|
|
|
302
308
|
from supermemory import Supermemory
|
|
303
309
|
|
|
304
310
|
client = Supermemory()
|
|
305
|
-
response = client.memories.with_raw_response.add(
|
|
311
|
+
response = client.memories.with_raw_response.add(
|
|
312
|
+
content="This is a detailed article about machine learning concepts...",
|
|
313
|
+
)
|
|
306
314
|
print(response.headers.get('X-My-Header'))
|
|
307
315
|
|
|
308
316
|
memory = response.parse() # get the object that `memories.add()` would have returned
|
|
@@ -320,7 +328,9 @@ The above interface eagerly reads the full response body when you make the reque
|
|
|
320
328
|
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
|
|
321
329
|
|
|
322
330
|
```python
|
|
323
|
-
with client.memories.with_streaming_response.add(
|
|
331
|
+
with client.memories.with_streaming_response.add(
|
|
332
|
+
content="This is a detailed article about machine learning concepts...",
|
|
333
|
+
) as response:
|
|
324
334
|
print(response.headers.get("X-My-Header"))
|
|
325
335
|
|
|
326
336
|
for line in response.iter_lines():
|
|
@@ -17,7 +17,7 @@ The REST API documentation can be found on [docs.supermemory.ai](https://docs.su
|
|
|
17
17
|
|
|
18
18
|
```sh
|
|
19
19
|
# install from PyPI
|
|
20
|
-
pip install
|
|
20
|
+
pip install supermemory
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Usage
|
|
@@ -77,7 +77,7 @@ You can enable this by installing `aiohttp`:
|
|
|
77
77
|
|
|
78
78
|
```sh
|
|
79
79
|
# install from PyPI
|
|
80
|
-
pip install
|
|
80
|
+
pip install supermemory[aiohttp]
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
|
|
@@ -160,7 +160,9 @@ from supermemory import Supermemory
|
|
|
160
160
|
client = Supermemory()
|
|
161
161
|
|
|
162
162
|
try:
|
|
163
|
-
client.memories.add(
|
|
163
|
+
client.memories.add(
|
|
164
|
+
content="This is a detailed article about machine learning concepts...",
|
|
165
|
+
)
|
|
164
166
|
except supermemory.APIConnectionError as e:
|
|
165
167
|
print("The server could not be reached")
|
|
166
168
|
print(e.__cause__) # an underlying Exception, likely raised within httpx.
|
|
@@ -203,7 +205,9 @@ client = Supermemory(
|
|
|
203
205
|
)
|
|
204
206
|
|
|
205
207
|
# Or, configure per-request:
|
|
206
|
-
client.with_options(max_retries=5).memories.add(
|
|
208
|
+
client.with_options(max_retries=5).memories.add(
|
|
209
|
+
content="This is a detailed article about machine learning concepts...",
|
|
210
|
+
)
|
|
207
211
|
```
|
|
208
212
|
|
|
209
213
|
### Timeouts
|
|
@@ -226,7 +230,9 @@ client = Supermemory(
|
|
|
226
230
|
)
|
|
227
231
|
|
|
228
232
|
# Override per-request:
|
|
229
|
-
client.with_options(timeout=5.0).memories.add(
|
|
233
|
+
client.with_options(timeout=5.0).memories.add(
|
|
234
|
+
content="This is a detailed article about machine learning concepts...",
|
|
235
|
+
)
|
|
230
236
|
```
|
|
231
237
|
|
|
232
238
|
On timeout, an `APITimeoutError` is thrown.
|
|
@@ -267,7 +273,9 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
|
|
|
267
273
|
from supermemory import Supermemory
|
|
268
274
|
|
|
269
275
|
client = Supermemory()
|
|
270
|
-
response = client.memories.with_raw_response.add(
|
|
276
|
+
response = client.memories.with_raw_response.add(
|
|
277
|
+
content="This is a detailed article about machine learning concepts...",
|
|
278
|
+
)
|
|
271
279
|
print(response.headers.get('X-My-Header'))
|
|
272
280
|
|
|
273
281
|
memory = response.parse() # get the object that `memories.add()` would have returned
|
|
@@ -285,7 +293,9 @@ The above interface eagerly reads the full response body when you make the reque
|
|
|
285
293
|
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
|
|
286
294
|
|
|
287
295
|
```python
|
|
288
|
-
with client.memories.with_streaming_response.add(
|
|
296
|
+
with client.memories.with_streaming_response.add(
|
|
297
|
+
content="This is a detailed article about machine learning concepts...",
|
|
298
|
+
) as response:
|
|
289
299
|
print(response.headers.get("X-My-Header"))
|
|
290
300
|
|
|
291
301
|
for line in response.iter_lines():
|
|
@@ -14,12 +14,35 @@ from supermemory.types import (
|
|
|
14
14
|
|
|
15
15
|
Methods:
|
|
16
16
|
|
|
17
|
-
- <code title="patch /v3/
|
|
18
|
-
- <code title="post /v3/
|
|
19
|
-
- <code title="delete /v3/
|
|
20
|
-
- <code title="post /v3/
|
|
21
|
-
- <code title="get /v3/
|
|
22
|
-
- <code title="post /v3/
|
|
17
|
+
- <code title="patch /v3/documents/{id}">client.memories.<a href="./src/supermemory/resources/memories.py">update</a>(id, \*\*<a href="src/supermemory/types/memory_update_params.py">params</a>) -> <a href="./src/supermemory/types/memory_update_response.py">MemoryUpdateResponse</a></code>
|
|
18
|
+
- <code title="post /v3/documents/list">client.memories.<a href="./src/supermemory/resources/memories.py">list</a>(\*\*<a href="src/supermemory/types/memory_list_params.py">params</a>) -> <a href="./src/supermemory/types/memory_list_response.py">MemoryListResponse</a></code>
|
|
19
|
+
- <code title="delete /v3/documents/{id}">client.memories.<a href="./src/supermemory/resources/memories.py">delete</a>(id) -> None</code>
|
|
20
|
+
- <code title="post /v3/documents">client.memories.<a href="./src/supermemory/resources/memories.py">add</a>(\*\*<a href="src/supermemory/types/memory_add_params.py">params</a>) -> <a href="./src/supermemory/types/memory_add_response.py">MemoryAddResponse</a></code>
|
|
21
|
+
- <code title="get /v3/documents/{id}">client.memories.<a href="./src/supermemory/resources/memories.py">get</a>(id) -> <a href="./src/supermemory/types/memory_get_response.py">MemoryGetResponse</a></code>
|
|
22
|
+
- <code title="post /v3/documents/file">client.memories.<a href="./src/supermemory/resources/memories.py">upload_file</a>(\*\*<a href="src/supermemory/types/memory_upload_file_params.py">params</a>) -> <a href="./src/supermemory/types/memory_upload_file_response.py">MemoryUploadFileResponse</a></code>
|
|
23
|
+
|
|
24
|
+
# Documents
|
|
25
|
+
|
|
26
|
+
Types:
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
from supermemory.types import (
|
|
30
|
+
DocumentUpdateResponse,
|
|
31
|
+
DocumentListResponse,
|
|
32
|
+
DocumentAddResponse,
|
|
33
|
+
DocumentGetResponse,
|
|
34
|
+
DocumentUploadFileResponse,
|
|
35
|
+
)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Methods:
|
|
39
|
+
|
|
40
|
+
- <code title="patch /v3/documents/{id}">client.documents.<a href="./src/supermemory/resources/documents.py">update</a>(id, \*\*<a href="src/supermemory/types/document_update_params.py">params</a>) -> <a href="./src/supermemory/types/document_update_response.py">DocumentUpdateResponse</a></code>
|
|
41
|
+
- <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>
|
|
42
|
+
- <code title="delete /v3/documents/{id}">client.documents.<a href="./src/supermemory/resources/documents.py">delete</a>(id) -> None</code>
|
|
43
|
+
- <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>
|
|
44
|
+
- <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>
|
|
45
|
+
- <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>
|
|
23
46
|
|
|
24
47
|
# Search
|
|
25
48
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "supermemory"
|
|
3
|
-
version = "3.
|
|
3
|
+
version = "3.1.0"
|
|
4
4
|
description = "The official Python library for the supermemory API"
|
|
5
5
|
dynamic = ["readme"]
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -56,7 +56,6 @@ dev-dependencies = [
|
|
|
56
56
|
"dirty-equals>=0.6.0",
|
|
57
57
|
"importlib-metadata>=6.7.0",
|
|
58
58
|
"rich>=13.7.1",
|
|
59
|
-
"nest_asyncio==1.6.0",
|
|
60
59
|
"pytest-xdist>=3.6.1",
|
|
61
60
|
]
|
|
62
61
|
|
|
@@ -157,6 +156,58 @@ reportOverlappingOverload = false
|
|
|
157
156
|
reportImportCycles = false
|
|
158
157
|
reportPrivateUsage = false
|
|
159
158
|
|
|
159
|
+
[tool.mypy]
|
|
160
|
+
pretty = true
|
|
161
|
+
show_error_codes = true
|
|
162
|
+
|
|
163
|
+
# Exclude _files.py because mypy isn't smart enough to apply
|
|
164
|
+
# the correct type narrowing and as this is an internal module
|
|
165
|
+
# it's fine to just use Pyright.
|
|
166
|
+
#
|
|
167
|
+
# We also exclude our `tests` as mypy doesn't always infer
|
|
168
|
+
# types correctly and Pyright will still catch any type errors.
|
|
169
|
+
exclude = ['src/supermemory/_files.py', '_dev/.*.py', 'tests/.*']
|
|
170
|
+
|
|
171
|
+
strict_equality = true
|
|
172
|
+
implicit_reexport = true
|
|
173
|
+
check_untyped_defs = true
|
|
174
|
+
no_implicit_optional = true
|
|
175
|
+
|
|
176
|
+
warn_return_any = true
|
|
177
|
+
warn_unreachable = true
|
|
178
|
+
warn_unused_configs = true
|
|
179
|
+
|
|
180
|
+
# Turn these options off as it could cause conflicts
|
|
181
|
+
# with the Pyright options.
|
|
182
|
+
warn_unused_ignores = false
|
|
183
|
+
warn_redundant_casts = false
|
|
184
|
+
|
|
185
|
+
disallow_any_generics = true
|
|
186
|
+
disallow_untyped_defs = true
|
|
187
|
+
disallow_untyped_calls = true
|
|
188
|
+
disallow_subclassing_any = true
|
|
189
|
+
disallow_incomplete_defs = true
|
|
190
|
+
disallow_untyped_decorators = true
|
|
191
|
+
cache_fine_grained = true
|
|
192
|
+
|
|
193
|
+
# By default, mypy reports an error if you assign a value to the result
|
|
194
|
+
# of a function call that doesn't return anything. We do this in our test
|
|
195
|
+
# cases:
|
|
196
|
+
# ```
|
|
197
|
+
# result = ...
|
|
198
|
+
# assert result is None
|
|
199
|
+
# ```
|
|
200
|
+
# Changing this codegen to make mypy happy would increase complexity
|
|
201
|
+
# and would not be worth it.
|
|
202
|
+
disable_error_code = "func-returns-value,overload-cannot-match"
|
|
203
|
+
|
|
204
|
+
# https://github.com/python/mypy/issues/12162
|
|
205
|
+
[[tool.mypy.overrides]]
|
|
206
|
+
module = "black.files.*"
|
|
207
|
+
ignore_errors = true
|
|
208
|
+
ignore_missing_imports = true
|
|
209
|
+
|
|
210
|
+
|
|
160
211
|
[tool.ruff]
|
|
161
212
|
line-length = 120
|
|
162
213
|
output-format = "grouped"
|
|
@@ -75,7 +75,6 @@ multidict==6.4.4
|
|
|
75
75
|
mypy==1.14.1
|
|
76
76
|
mypy-extensions==1.0.0
|
|
77
77
|
# via mypy
|
|
78
|
-
nest-asyncio==1.6.0
|
|
79
78
|
nodeenv==1.8.0
|
|
80
79
|
# via pyright
|
|
81
80
|
nox==2023.4.22
|
|
@@ -89,9 +88,9 @@ pluggy==1.5.0
|
|
|
89
88
|
propcache==0.3.1
|
|
90
89
|
# via aiohttp
|
|
91
90
|
# via yarl
|
|
92
|
-
pydantic==2.
|
|
91
|
+
pydantic==2.11.9
|
|
93
92
|
# via supermemory
|
|
94
|
-
pydantic-core==2.
|
|
93
|
+
pydantic-core==2.33.2
|
|
95
94
|
# via pydantic
|
|
96
95
|
pygments==2.18.0
|
|
97
96
|
# via rich
|
|
@@ -127,6 +126,9 @@ typing-extensions==4.12.2
|
|
|
127
126
|
# via pydantic-core
|
|
128
127
|
# via pyright
|
|
129
128
|
# via supermemory
|
|
129
|
+
# via typing-inspection
|
|
130
|
+
typing-inspection==0.4.1
|
|
131
|
+
# via pydantic
|
|
130
132
|
virtualenv==20.24.5
|
|
131
133
|
# via nox
|
|
132
134
|
yarl==1.20.0
|
|
@@ -55,9 +55,9 @@ multidict==6.4.4
|
|
|
55
55
|
propcache==0.3.1
|
|
56
56
|
# via aiohttp
|
|
57
57
|
# via yarl
|
|
58
|
-
pydantic==2.
|
|
58
|
+
pydantic==2.11.9
|
|
59
59
|
# via supermemory
|
|
60
|
-
pydantic-core==2.
|
|
60
|
+
pydantic-core==2.33.2
|
|
61
61
|
# via pydantic
|
|
62
62
|
sniffio==1.3.0
|
|
63
63
|
# via anyio
|
|
@@ -68,5 +68,8 @@ typing-extensions==4.12.2
|
|
|
68
68
|
# via pydantic
|
|
69
69
|
# via pydantic-core
|
|
70
70
|
# via supermemory
|
|
71
|
+
# via typing-inspection
|
|
72
|
+
typing-inspection==0.4.1
|
|
73
|
+
# via pydantic
|
|
71
74
|
yarl==1.20.0
|
|
72
75
|
# via aiohttp
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import typing as _t
|
|
4
4
|
|
|
5
5
|
from . import types
|
|
6
|
-
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes
|
|
6
|
+
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes, omit, not_given
|
|
7
7
|
from ._utils import file_from_path
|
|
8
8
|
from ._client import (
|
|
9
9
|
Client,
|
|
@@ -48,7 +48,9 @@ __all__ = [
|
|
|
48
48
|
"ProxiesTypes",
|
|
49
49
|
"NotGiven",
|
|
50
50
|
"NOT_GIVEN",
|
|
51
|
+
"not_given",
|
|
51
52
|
"Omit",
|
|
53
|
+
"omit",
|
|
52
54
|
"SupermemoryError",
|
|
53
55
|
"APIError",
|
|
54
56
|
"APIStatusError",
|
|
@@ -42,7 +42,6 @@ from . import _exceptions
|
|
|
42
42
|
from ._qs import Querystring
|
|
43
43
|
from ._files import to_httpx_files, async_to_httpx_files
|
|
44
44
|
from ._types import (
|
|
45
|
-
NOT_GIVEN,
|
|
46
45
|
Body,
|
|
47
46
|
Omit,
|
|
48
47
|
Query,
|
|
@@ -57,9 +56,10 @@ from ._types import (
|
|
|
57
56
|
RequestOptions,
|
|
58
57
|
HttpxRequestFiles,
|
|
59
58
|
ModelBuilderProtocol,
|
|
59
|
+
not_given,
|
|
60
60
|
)
|
|
61
61
|
from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping
|
|
62
|
-
from ._compat import
|
|
62
|
+
from ._compat import PYDANTIC_V1, model_copy, model_dump
|
|
63
63
|
from ._models import GenericModel, FinalRequestOptions, validate_type, construct_type
|
|
64
64
|
from ._response import (
|
|
65
65
|
APIResponse,
|
|
@@ -145,9 +145,9 @@ class PageInfo:
|
|
|
145
145
|
def __init__(
|
|
146
146
|
self,
|
|
147
147
|
*,
|
|
148
|
-
url: URL | NotGiven =
|
|
149
|
-
json: Body | NotGiven =
|
|
150
|
-
params: Query | NotGiven =
|
|
148
|
+
url: URL | NotGiven = not_given,
|
|
149
|
+
json: Body | NotGiven = not_given,
|
|
150
|
+
params: Query | NotGiven = not_given,
|
|
151
151
|
) -> None:
|
|
152
152
|
self.url = url
|
|
153
153
|
self.json = json
|
|
@@ -232,7 +232,7 @@ class BaseSyncPage(BasePage[_T], Generic[_T]):
|
|
|
232
232
|
model: Type[_T],
|
|
233
233
|
options: FinalRequestOptions,
|
|
234
234
|
) -> None:
|
|
235
|
-
if
|
|
235
|
+
if (not PYDANTIC_V1) and getattr(self, "__pydantic_private__", None) is None:
|
|
236
236
|
self.__pydantic_private__ = {}
|
|
237
237
|
|
|
238
238
|
self._model = model
|
|
@@ -320,7 +320,7 @@ class BaseAsyncPage(BasePage[_T], Generic[_T]):
|
|
|
320
320
|
client: AsyncAPIClient,
|
|
321
321
|
options: FinalRequestOptions,
|
|
322
322
|
) -> None:
|
|
323
|
-
if
|
|
323
|
+
if (not PYDANTIC_V1) and getattr(self, "__pydantic_private__", None) is None:
|
|
324
324
|
self.__pydantic_private__ = {}
|
|
325
325
|
|
|
326
326
|
self._model = model
|
|
@@ -595,7 +595,7 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
|
595
595
|
# we internally support defining a temporary header to override the
|
|
596
596
|
# default `cast_to` type for use with `.with_raw_response` and `.with_streaming_response`
|
|
597
597
|
# see _response.py for implementation details
|
|
598
|
-
override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER,
|
|
598
|
+
override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, not_given)
|
|
599
599
|
if is_given(override_cast_to):
|
|
600
600
|
options.headers = headers
|
|
601
601
|
return cast(Type[ResponseT], override_cast_to)
|
|
@@ -825,7 +825,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
825
825
|
version: str,
|
|
826
826
|
base_url: str | URL,
|
|
827
827
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
828
|
-
timeout: float | Timeout | None | NotGiven =
|
|
828
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
|
829
829
|
http_client: httpx.Client | None = None,
|
|
830
830
|
custom_headers: Mapping[str, str] | None = None,
|
|
831
831
|
custom_query: Mapping[str, object] | None = None,
|
|
@@ -1356,7 +1356,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1356
1356
|
base_url: str | URL,
|
|
1357
1357
|
_strict_response_validation: bool,
|
|
1358
1358
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
1359
|
-
timeout: float | Timeout | None | NotGiven =
|
|
1359
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
|
1360
1360
|
http_client: httpx.AsyncClient | None = None,
|
|
1361
1361
|
custom_headers: Mapping[str, str] | None = None,
|
|
1362
1362
|
custom_query: Mapping[str, object] | None = None,
|
|
@@ -1818,8 +1818,8 @@ def make_request_options(
|
|
|
1818
1818
|
extra_query: Query | None = None,
|
|
1819
1819
|
extra_body: Body | None = None,
|
|
1820
1820
|
idempotency_key: str | None = None,
|
|
1821
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
1822
|
-
post_parser: PostParser | NotGiven =
|
|
1821
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1822
|
+
post_parser: PostParser | NotGiven = not_given,
|
|
1823
1823
|
) -> RequestOptions:
|
|
1824
1824
|
"""Create a dict of type RequestOptions without keys of NotGiven values."""
|
|
1825
1825
|
options: RequestOptions = {}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
|
-
from typing import Any,
|
|
6
|
+
from typing import Any, Mapping
|
|
7
7
|
from typing_extensions import Self, override
|
|
8
8
|
|
|
9
9
|
import httpx
|
|
@@ -11,17 +11,17 @@ import httpx
|
|
|
11
11
|
from . import _exceptions
|
|
12
12
|
from ._qs import Querystring
|
|
13
13
|
from ._types import (
|
|
14
|
-
NOT_GIVEN,
|
|
15
14
|
Omit,
|
|
16
15
|
Timeout,
|
|
17
16
|
NotGiven,
|
|
18
17
|
Transport,
|
|
19
18
|
ProxiesTypes,
|
|
20
19
|
RequestOptions,
|
|
20
|
+
not_given,
|
|
21
21
|
)
|
|
22
22
|
from ._utils import is_given, get_async_library
|
|
23
23
|
from ._version import __version__
|
|
24
|
-
from .resources import search, memories, settings, connections
|
|
24
|
+
from .resources import search, memories, settings, documents, connections
|
|
25
25
|
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
|
|
26
26
|
from ._exceptions import APIStatusError, SupermemoryError
|
|
27
27
|
from ._base_client import (
|
|
@@ -44,6 +44,7 @@ __all__ = [
|
|
|
44
44
|
|
|
45
45
|
class Supermemory(SyncAPIClient):
|
|
46
46
|
memories: memories.MemoriesResource
|
|
47
|
+
documents: documents.DocumentsResource
|
|
47
48
|
search: search.SearchResource
|
|
48
49
|
settings: settings.SettingsResource
|
|
49
50
|
connections: connections.ConnectionsResource
|
|
@@ -58,7 +59,7 @@ class Supermemory(SyncAPIClient):
|
|
|
58
59
|
*,
|
|
59
60
|
api_key: str | None = None,
|
|
60
61
|
base_url: str | httpx.URL | None = None,
|
|
61
|
-
timeout:
|
|
62
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
|
62
63
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
63
64
|
default_headers: Mapping[str, str] | None = None,
|
|
64
65
|
default_query: Mapping[str, object] | None = None,
|
|
@@ -105,6 +106,7 @@ class Supermemory(SyncAPIClient):
|
|
|
105
106
|
)
|
|
106
107
|
|
|
107
108
|
self.memories = memories.MemoriesResource(self)
|
|
109
|
+
self.documents = documents.DocumentsResource(self)
|
|
108
110
|
self.search = search.SearchResource(self)
|
|
109
111
|
self.settings = settings.SettingsResource(self)
|
|
110
112
|
self.connections = connections.ConnectionsResource(self)
|
|
@@ -136,9 +138,9 @@ class Supermemory(SyncAPIClient):
|
|
|
136
138
|
*,
|
|
137
139
|
api_key: str | None = None,
|
|
138
140
|
base_url: str | httpx.URL | None = None,
|
|
139
|
-
timeout: float | Timeout | None | NotGiven =
|
|
141
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
|
140
142
|
http_client: httpx.Client | None = None,
|
|
141
|
-
max_retries: int | NotGiven =
|
|
143
|
+
max_retries: int | NotGiven = not_given,
|
|
142
144
|
default_headers: Mapping[str, str] | None = None,
|
|
143
145
|
set_default_headers: Mapping[str, str] | None = None,
|
|
144
146
|
default_query: Mapping[str, object] | None = None,
|
|
@@ -218,6 +220,7 @@ class Supermemory(SyncAPIClient):
|
|
|
218
220
|
|
|
219
221
|
class AsyncSupermemory(AsyncAPIClient):
|
|
220
222
|
memories: memories.AsyncMemoriesResource
|
|
223
|
+
documents: documents.AsyncDocumentsResource
|
|
221
224
|
search: search.AsyncSearchResource
|
|
222
225
|
settings: settings.AsyncSettingsResource
|
|
223
226
|
connections: connections.AsyncConnectionsResource
|
|
@@ -232,7 +235,7 @@ class AsyncSupermemory(AsyncAPIClient):
|
|
|
232
235
|
*,
|
|
233
236
|
api_key: str | None = None,
|
|
234
237
|
base_url: str | httpx.URL | None = None,
|
|
235
|
-
timeout:
|
|
238
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
|
236
239
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
237
240
|
default_headers: Mapping[str, str] | None = None,
|
|
238
241
|
default_query: Mapping[str, object] | None = None,
|
|
@@ -279,6 +282,7 @@ class AsyncSupermemory(AsyncAPIClient):
|
|
|
279
282
|
)
|
|
280
283
|
|
|
281
284
|
self.memories = memories.AsyncMemoriesResource(self)
|
|
285
|
+
self.documents = documents.AsyncDocumentsResource(self)
|
|
282
286
|
self.search = search.AsyncSearchResource(self)
|
|
283
287
|
self.settings = settings.AsyncSettingsResource(self)
|
|
284
288
|
self.connections = connections.AsyncConnectionsResource(self)
|
|
@@ -310,9 +314,9 @@ class AsyncSupermemory(AsyncAPIClient):
|
|
|
310
314
|
*,
|
|
311
315
|
api_key: str | None = None,
|
|
312
316
|
base_url: str | httpx.URL | None = None,
|
|
313
|
-
timeout: float | Timeout | None | NotGiven =
|
|
317
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
|
314
318
|
http_client: httpx.AsyncClient | None = None,
|
|
315
|
-
max_retries: int | NotGiven =
|
|
319
|
+
max_retries: int | NotGiven = not_given,
|
|
316
320
|
default_headers: Mapping[str, str] | None = None,
|
|
317
321
|
set_default_headers: Mapping[str, str] | None = None,
|
|
318
322
|
default_query: Mapping[str, object] | None = None,
|
|
@@ -393,6 +397,7 @@ class AsyncSupermemory(AsyncAPIClient):
|
|
|
393
397
|
class SupermemoryWithRawResponse:
|
|
394
398
|
def __init__(self, client: Supermemory) -> None:
|
|
395
399
|
self.memories = memories.MemoriesResourceWithRawResponse(client.memories)
|
|
400
|
+
self.documents = documents.DocumentsResourceWithRawResponse(client.documents)
|
|
396
401
|
self.search = search.SearchResourceWithRawResponse(client.search)
|
|
397
402
|
self.settings = settings.SettingsResourceWithRawResponse(client.settings)
|
|
398
403
|
self.connections = connections.ConnectionsResourceWithRawResponse(client.connections)
|
|
@@ -401,6 +406,7 @@ class SupermemoryWithRawResponse:
|
|
|
401
406
|
class AsyncSupermemoryWithRawResponse:
|
|
402
407
|
def __init__(self, client: AsyncSupermemory) -> None:
|
|
403
408
|
self.memories = memories.AsyncMemoriesResourceWithRawResponse(client.memories)
|
|
409
|
+
self.documents = documents.AsyncDocumentsResourceWithRawResponse(client.documents)
|
|
404
410
|
self.search = search.AsyncSearchResourceWithRawResponse(client.search)
|
|
405
411
|
self.settings = settings.AsyncSettingsResourceWithRawResponse(client.settings)
|
|
406
412
|
self.connections = connections.AsyncConnectionsResourceWithRawResponse(client.connections)
|
|
@@ -409,6 +415,7 @@ class AsyncSupermemoryWithRawResponse:
|
|
|
409
415
|
class SupermemoryWithStreamedResponse:
|
|
410
416
|
def __init__(self, client: Supermemory) -> None:
|
|
411
417
|
self.memories = memories.MemoriesResourceWithStreamingResponse(client.memories)
|
|
418
|
+
self.documents = documents.DocumentsResourceWithStreamingResponse(client.documents)
|
|
412
419
|
self.search = search.SearchResourceWithStreamingResponse(client.search)
|
|
413
420
|
self.settings = settings.SettingsResourceWithStreamingResponse(client.settings)
|
|
414
421
|
self.connections = connections.ConnectionsResourceWithStreamingResponse(client.connections)
|
|
@@ -417,6 +424,7 @@ class SupermemoryWithStreamedResponse:
|
|
|
417
424
|
class AsyncSupermemoryWithStreamedResponse:
|
|
418
425
|
def __init__(self, client: AsyncSupermemory) -> None:
|
|
419
426
|
self.memories = memories.AsyncMemoriesResourceWithStreamingResponse(client.memories)
|
|
427
|
+
self.documents = documents.AsyncDocumentsResourceWithStreamingResponse(client.documents)
|
|
420
428
|
self.search = search.AsyncSearchResourceWithStreamingResponse(client.search)
|
|
421
429
|
self.settings = settings.AsyncSettingsResourceWithStreamingResponse(client.settings)
|
|
422
430
|
self.connections = connections.AsyncConnectionsResourceWithStreamingResponse(client.connections)
|