supermemory 3.40.0__tar.gz → 3.41.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.
Files changed (131) hide show
  1. supermemory-3.41.0/.release-please-manifest.json +3 -0
  2. {supermemory-3.40.0 → supermemory-3.41.0}/CHANGELOG.md +8 -0
  3. {supermemory-3.40.0 → supermemory-3.41.0}/PKG-INFO +1 -1
  4. {supermemory-3.40.0 → supermemory-3.41.0}/pyproject.toml +1 -1
  5. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_version.py +1 -1
  6. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/resources/documents.py +10 -0
  7. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/document_batch_add_params.py +12 -0
  8. {supermemory-3.40.0 → supermemory-3.41.0}/tests/api_resources/test_documents.py +78 -74
  9. {supermemory-3.40.0 → supermemory-3.41.0}/tests/api_resources/test_search.py +40 -40
  10. supermemory-3.40.0/.release-please-manifest.json +0 -3
  11. {supermemory-3.40.0 → supermemory-3.41.0}/.gitignore +0 -0
  12. {supermemory-3.40.0 → supermemory-3.41.0}/CONTRIBUTING.md +0 -0
  13. {supermemory-3.40.0 → supermemory-3.41.0}/LICENSE +0 -0
  14. {supermemory-3.40.0 → supermemory-3.41.0}/README.md +0 -0
  15. {supermemory-3.40.0 → supermemory-3.41.0}/SECURITY.md +0 -0
  16. {supermemory-3.40.0 → supermemory-3.41.0}/api.md +0 -0
  17. {supermemory-3.40.0 → supermemory-3.41.0}/bin/check-release-environment +0 -0
  18. {supermemory-3.40.0 → supermemory-3.41.0}/bin/publish-pypi +0 -0
  19. {supermemory-3.40.0 → supermemory-3.41.0}/examples/.keep +0 -0
  20. {supermemory-3.40.0 → supermemory-3.41.0}/noxfile.py +0 -0
  21. {supermemory-3.40.0 → supermemory-3.41.0}/release-please-config.json +0 -0
  22. {supermemory-3.40.0 → supermemory-3.41.0}/requirements-dev.lock +0 -0
  23. {supermemory-3.40.0 → supermemory-3.41.0}/requirements.lock +0 -0
  24. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/__init__.py +0 -0
  25. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_base_client.py +0 -0
  26. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_client.py +0 -0
  27. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_compat.py +0 -0
  28. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_constants.py +0 -0
  29. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_exceptions.py +0 -0
  30. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_files.py +0 -0
  31. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_models.py +0 -0
  32. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_qs.py +0 -0
  33. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_resource.py +0 -0
  34. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_response.py +0 -0
  35. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_streaming.py +0 -0
  36. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_types.py +0 -0
  37. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_utils/__init__.py +0 -0
  38. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_utils/_compat.py +0 -0
  39. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_utils/_datetime_parse.py +0 -0
  40. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_utils/_json.py +0 -0
  41. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_utils/_logs.py +0 -0
  42. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_utils/_path.py +0 -0
  43. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_utils/_proxy.py +0 -0
  44. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_utils/_reflection.py +0 -0
  45. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_utils/_resources_proxy.py +0 -0
  46. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_utils/_streams.py +0 -0
  47. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_utils/_sync.py +0 -0
  48. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_utils/_transform.py +0 -0
  49. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_utils/_typing.py +0 -0
  50. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/_utils/_utils.py +0 -0
  51. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/lib/.keep +0 -0
  52. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/py.typed +0 -0
  53. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/resources/__init__.py +0 -0
  54. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/resources/connections.py +0 -0
  55. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/resources/memories.py +0 -0
  56. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/resources/search.py +0 -0
  57. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/resources/settings.py +0 -0
  58. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/__init__.py +0 -0
  59. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/add_response.py +0 -0
  60. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/client_add_params.py +0 -0
  61. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/client_profile_params.py +0 -0
  62. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/connection_configure_params.py +0 -0
  63. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/connection_configure_response.py +0 -0
  64. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/connection_create_params.py +0 -0
  65. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/connection_create_response.py +0 -0
  66. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/connection_delete_by_id_params.py +0 -0
  67. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/connection_delete_by_id_response.py +0 -0
  68. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/connection_delete_by_provider_params.py +0 -0
  69. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/connection_delete_by_provider_response.py +0 -0
  70. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/connection_get_by_id_response.py +0 -0
  71. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/connection_get_by_tag_params.py +0 -0
  72. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/connection_get_by_tag_response.py +0 -0
  73. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/connection_import_params.py +0 -0
  74. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/connection_import_response.py +0 -0
  75. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/connection_list_documents_params.py +0 -0
  76. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/connection_list_documents_response.py +0 -0
  77. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/connection_list_params.py +0 -0
  78. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/connection_list_response.py +0 -0
  79. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/connection_resources_params.py +0 -0
  80. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/connection_resources_response.py +0 -0
  81. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/document_add_params.py +0 -0
  82. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/document_add_response.py +0 -0
  83. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/document_batch_add_response.py +0 -0
  84. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/document_delete_bulk_params.py +0 -0
  85. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/document_delete_bulk_response.py +0 -0
  86. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/document_get_response.py +0 -0
  87. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/document_list_params.py +0 -0
  88. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/document_list_processing_response.py +0 -0
  89. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/document_list_response.py +0 -0
  90. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/document_update_params.py +0 -0
  91. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/document_update_response.py +0 -0
  92. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/document_upload_file_params.py +0 -0
  93. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/document_upload_file_response.py +0 -0
  94. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/memory_forget_params.py +0 -0
  95. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/memory_forget_response.py +0 -0
  96. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/memory_update_memory_params.py +0 -0
  97. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/memory_update_memory_response.py +0 -0
  98. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/profile_response.py +0 -0
  99. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/search_documents_params.py +0 -0
  100. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/search_documents_response.py +0 -0
  101. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/search_execute_params.py +0 -0
  102. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/search_execute_response.py +0 -0
  103. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/search_memories_params.py +0 -0
  104. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/search_memories_response.py +0 -0
  105. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/setting_get_response.py +0 -0
  106. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/setting_update_params.py +0 -0
  107. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory/types/setting_update_response.py +0 -0
  108. {supermemory-3.40.0 → supermemory-3.41.0}/src/supermemory_new/lib/.keep +0 -0
  109. {supermemory-3.40.0 → supermemory-3.41.0}/tests/__init__.py +0 -0
  110. {supermemory-3.40.0 → supermemory-3.41.0}/tests/api_resources/__init__.py +0 -0
  111. {supermemory-3.40.0 → supermemory-3.41.0}/tests/api_resources/test_client.py +0 -0
  112. {supermemory-3.40.0 → supermemory-3.41.0}/tests/api_resources/test_connections.py +0 -0
  113. {supermemory-3.40.0 → supermemory-3.41.0}/tests/api_resources/test_memories.py +0 -0
  114. {supermemory-3.40.0 → supermemory-3.41.0}/tests/api_resources/test_settings.py +0 -0
  115. {supermemory-3.40.0 → supermemory-3.41.0}/tests/conftest.py +0 -0
  116. {supermemory-3.40.0 → supermemory-3.41.0}/tests/sample_file.txt +0 -0
  117. {supermemory-3.40.0 → supermemory-3.41.0}/tests/test_client.py +0 -0
  118. {supermemory-3.40.0 → supermemory-3.41.0}/tests/test_extract_files.py +0 -0
  119. {supermemory-3.40.0 → supermemory-3.41.0}/tests/test_files.py +0 -0
  120. {supermemory-3.40.0 → supermemory-3.41.0}/tests/test_models.py +0 -0
  121. {supermemory-3.40.0 → supermemory-3.41.0}/tests/test_qs.py +0 -0
  122. {supermemory-3.40.0 → supermemory-3.41.0}/tests/test_required_args.py +0 -0
  123. {supermemory-3.40.0 → supermemory-3.41.0}/tests/test_response.py +0 -0
  124. {supermemory-3.40.0 → supermemory-3.41.0}/tests/test_streaming.py +0 -0
  125. {supermemory-3.40.0 → supermemory-3.41.0}/tests/test_transform.py +0 -0
  126. {supermemory-3.40.0 → supermemory-3.41.0}/tests/test_utils/test_datetime_parse.py +0 -0
  127. {supermemory-3.40.0 → supermemory-3.41.0}/tests/test_utils/test_json.py +0 -0
  128. {supermemory-3.40.0 → supermemory-3.41.0}/tests/test_utils/test_path.py +0 -0
  129. {supermemory-3.40.0 → supermemory-3.41.0}/tests/test_utils/test_proxy.py +0 -0
  130. {supermemory-3.40.0 → supermemory-3.41.0}/tests/test_utils/test_typing.py +0 -0
  131. {supermemory-3.40.0 → supermemory-3.41.0}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "3.41.0"
3
+ }
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.41.0 (2026-05-12)
4
+
5
+ Full Changelog: [v3.40.0...v3.41.0](https://github.com/supermemoryai/python-sdk/compare/v3.40.0...v3.41.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([02a5d82](https://github.com/supermemoryai/python-sdk/commit/02a5d82aaaf3b11183d66ce5adfd154c26ecb324))
10
+
3
11
  ## 3.40.0 (2026-05-11)
4
12
 
5
13
  Full Changelog: [v3.39.0...v3.40.0](https://github.com/supermemoryai/python-sdk/compare/v3.39.0...v3.40.0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: supermemory
3
- Version: 3.40.0
3
+ Version: 3.41.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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "supermemory"
3
- version = "3.40.0"
3
+ version = "3.41.0"
4
4
  description = "The official Python library for the supermemory API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "supermemory"
4
- __version__ = "3.40.0" # x-release-please-version
4
+ __version__ = "3.41.0" # x-release-please-version
@@ -338,6 +338,7 @@ class DocumentsResource(SyncAPIResource):
338
338
  container_tag: str | Omit = omit,
339
339
  container_tags: SequenceNotStr[str] | Omit = omit,
340
340
  content: None | Omit = omit,
341
+ entity_context: str | Omit = omit,
341
342
  filepath: str | Omit = omit,
342
343
  filter_by_metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
343
344
  metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
@@ -363,6 +364,9 @@ class DocumentsResource(SyncAPIResource):
363
364
  containerized by. This can be an ID for your user, a project ID, or any other
364
365
  identifier you wish to use to group documents.
365
366
 
367
+ entity_context: Optional entity context for this container tag. Max 1500 characters. Used during
368
+ document processing to guide memory extraction.
369
+
366
370
  filepath: Optional file path for the document (e.g., '/documents/reports/file.pdf'). Used
367
371
  by supermemoryfs to map documents to filesystem paths.
368
372
 
@@ -396,6 +400,7 @@ class DocumentsResource(SyncAPIResource):
396
400
  "container_tag": container_tag,
397
401
  "container_tags": container_tags,
398
402
  "content": content,
403
+ "entity_context": entity_context,
399
404
  "filepath": filepath,
400
405
  "filter_by_metadata": filter_by_metadata,
401
406
  "metadata": metadata,
@@ -915,6 +920,7 @@ class AsyncDocumentsResource(AsyncAPIResource):
915
920
  container_tag: str | Omit = omit,
916
921
  container_tags: SequenceNotStr[str] | Omit = omit,
917
922
  content: None | Omit = omit,
923
+ entity_context: str | Omit = omit,
918
924
  filepath: str | Omit = omit,
919
925
  filter_by_metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
920
926
  metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
@@ -940,6 +946,9 @@ class AsyncDocumentsResource(AsyncAPIResource):
940
946
  containerized by. This can be an ID for your user, a project ID, or any other
941
947
  identifier you wish to use to group documents.
942
948
 
949
+ entity_context: Optional entity context for this container tag. Max 1500 characters. Used during
950
+ document processing to guide memory extraction.
951
+
943
952
  filepath: Optional file path for the document (e.g., '/documents/reports/file.pdf'). Used
944
953
  by supermemoryfs to map documents to filesystem paths.
945
954
 
@@ -973,6 +982,7 @@ class AsyncDocumentsResource(AsyncAPIResource):
973
982
  "container_tag": container_tag,
974
983
  "container_tags": container_tags,
975
984
  "content": content,
985
+ "entity_context": entity_context,
976
986
  "filepath": filepath,
977
987
  "filter_by_metadata": filter_by_metadata,
978
988
  "metadata": metadata,
@@ -30,6 +30,12 @@ class DocumentBatchAddParams(TypedDict, total=False):
30
30
 
31
31
  content: None
32
32
 
33
+ entity_context: Annotated[str, PropertyInfo(alias="entityContext")]
34
+ """Optional entity context for this container tag.
35
+
36
+ Max 1500 characters. Used during document processing to guide memory extraction.
37
+ """
38
+
33
39
  filepath: str
34
40
  """Optional file path for the document (e.g., '/documents/reports/file.pdf').
35
41
 
@@ -96,6 +102,12 @@ class DocumentsUnionMember0(TypedDict, total=False):
96
102
  document.
97
103
  """
98
104
 
105
+ entity_context: Annotated[str, PropertyInfo(alias="entityContext")]
106
+ """Optional entity context for this container tag.
107
+
108
+ Max 1500 characters. Used during document processing to guide memory extraction.
109
+ """
110
+
99
111
  filepath: str
100
112
  """Optional file path for the document (e.g., '/documents/reports/file.pdf').
101
113
 
@@ -39,22 +39,18 @@ class TestDocuments:
39
39
  def test_method_update_with_all_params(self, client: Supermemory) -> None:
40
40
  document = client.documents.update(
41
41
  id="id",
42
- container_tag="user_123",
43
- container_tags=["user_123", "project_123"],
44
- content="This is a detailed article about machine learning concepts...",
45
- custom_id="mem_abc123",
42
+ container_tag="user_alex",
43
+ container_tags=["_:_k--W2K_1V"],
44
+ content="Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s.",
45
+ custom_id="doc-api-rate-limits",
46
46
  filepath="/documents/reports/file.pdf",
47
47
  filter_by_metadata={
48
48
  "department": "engineering",
49
49
  "region": "us",
50
50
  },
51
51
  metadata={
52
- "category": "technology",
53
- "isPublic": True,
54
- "readingTime": 5,
55
- "source": "web",
56
- "tag_1": "ai",
57
- "tag_2": "machine-learning",
52
+ "source": "upload",
53
+ "language": "en",
58
54
  },
59
55
  task_type="memory",
60
56
  )
@@ -104,8 +100,8 @@ class TestDocuments:
104
100
  @parametrize
105
101
  def test_method_list_with_all_params(self, client: Supermemory) -> None:
106
102
  document = client.documents.list(
107
- container_tags=["user_123", "project_123"],
108
- filepath="/docs/",
103
+ container_tags=["_:_k--W2K_1V"],
104
+ filepath="filepath",
109
105
  filters={
110
106
  "and_": [
111
107
  {
@@ -252,7 +248,11 @@ class TestDocuments:
252
248
  @parametrize
253
249
  def test_method_batch_add(self, client: Supermemory) -> None:
254
250
  document = client.documents.batch_add(
255
- documents=[{"content": "This is a detailed article about machine learning concepts..."}],
251
+ documents=[
252
+ {
253
+ "content": "Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s."
254
+ }
255
+ ],
256
256
  )
257
257
  assert_matches_type(DocumentBatchAddResponse, document, path=["response"])
258
258
 
@@ -262,41 +262,35 @@ class TestDocuments:
262
262
  document = client.documents.batch_add(
263
263
  documents=[
264
264
  {
265
- "content": "This is a detailed article about machine learning concepts...",
266
- "container_tag": "user_123",
267
- "container_tags": ["user_123", "project_123"],
268
- "custom_id": "mem_abc123",
265
+ "content": "Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s.",
266
+ "container_tag": "user_alex",
267
+ "container_tags": ["_:_k--W2K_1V"],
268
+ "custom_id": "doc-api-rate-limits",
269
+ "entity_context": "User's name is {XYZ}",
269
270
  "filepath": "/documents/reports/file.pdf",
270
271
  "filter_by_metadata": {
271
272
  "department": "engineering",
272
273
  "region": "us",
273
274
  },
274
275
  "metadata": {
275
- "category": "technology",
276
- "isPublic": True,
277
- "readingTime": 5,
278
- "source": "web",
279
- "tag_1": "ai",
280
- "tag_2": "machine-learning",
276
+ "source": "upload",
277
+ "language": "en",
281
278
  },
282
279
  "task_type": "memory",
283
280
  }
284
281
  ],
285
- container_tag="user_123",
286
- container_tags=["user_123", "project_123"],
282
+ container_tag="user_alex",
283
+ container_tags=["_:_k--W2K_1V"],
287
284
  content=None,
285
+ entity_context="User's name is {XYZ}",
288
286
  filepath="/documents/reports/file.pdf",
289
287
  filter_by_metadata={
290
288
  "department": "engineering",
291
289
  "region": "us",
292
290
  },
293
291
  metadata={
294
- "category": "technology",
295
- "isPublic": True,
296
- "readingTime": 5,
297
- "source": "web",
298
- "tag_1": "ai",
299
- "tag_2": "machine-learning",
292
+ "source": "upload",
293
+ "language": "en",
300
294
  },
301
295
  task_type="memory",
302
296
  )
@@ -306,7 +300,11 @@ class TestDocuments:
306
300
  @parametrize
307
301
  def test_raw_response_batch_add(self, client: Supermemory) -> None:
308
302
  response = client.documents.with_raw_response.batch_add(
309
- documents=[{"content": "This is a detailed article about machine learning concepts..."}],
303
+ documents=[
304
+ {
305
+ "content": "Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s."
306
+ }
307
+ ],
310
308
  )
311
309
 
312
310
  assert response.is_closed is True
@@ -318,7 +316,11 @@ class TestDocuments:
318
316
  @parametrize
319
317
  def test_streaming_response_batch_add(self, client: Supermemory) -> None:
320
318
  with client.documents.with_streaming_response.batch_add(
321
- documents=[{"content": "This is a detailed article about machine learning concepts..."}],
319
+ documents=[
320
+ {
321
+ "content": "Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s."
322
+ }
323
+ ],
322
324
  ) as response:
323
325
  assert not response.is_closed
324
326
  assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -338,8 +340,8 @@ class TestDocuments:
338
340
  @parametrize
339
341
  def test_method_delete_bulk_with_all_params(self, client: Supermemory) -> None:
340
342
  document = client.documents.delete_bulk(
341
- container_tags=["user_123", "project_123"],
342
- filepath="/docs/old/",
343
+ container_tags=["_:_k--W2K_1V"],
344
+ filepath="filepath",
343
345
  ids=["acxV5LHMEsG2hMSNb4umbn", "bxcV5LHMEsG2hMSNb4umbn"],
344
346
  )
345
347
  assert_matches_type(DocumentDeleteBulkResponse, document, path=["response"])
@@ -450,9 +452,9 @@ class TestDocuments:
450
452
  document = client.documents.upload_file(
451
453
  file=b"Example data",
452
454
  container_tag="user",
453
- container_tags='["user_123", "project_123"]',
455
+ container_tags="containerTags",
454
456
  custom_id="mem_abc123",
455
- entity_context="This user is a software engineer who prefers concise technical documentation.",
457
+ entity_context="User's name is {XYZ}",
456
458
  filepath="/documents/reports/file.pdf",
457
459
  file_type="image",
458
460
  filter_by_metadata='{"department": "engineering"}',
@@ -508,22 +510,18 @@ class TestAsyncDocuments:
508
510
  async def test_method_update_with_all_params(self, async_client: AsyncSupermemory) -> None:
509
511
  document = await async_client.documents.update(
510
512
  id="id",
511
- container_tag="user_123",
512
- container_tags=["user_123", "project_123"],
513
- content="This is a detailed article about machine learning concepts...",
514
- custom_id="mem_abc123",
513
+ container_tag="user_alex",
514
+ container_tags=["_:_k--W2K_1V"],
515
+ content="Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s.",
516
+ custom_id="doc-api-rate-limits",
515
517
  filepath="/documents/reports/file.pdf",
516
518
  filter_by_metadata={
517
519
  "department": "engineering",
518
520
  "region": "us",
519
521
  },
520
522
  metadata={
521
- "category": "technology",
522
- "isPublic": True,
523
- "readingTime": 5,
524
- "source": "web",
525
- "tag_1": "ai",
526
- "tag_2": "machine-learning",
523
+ "source": "upload",
524
+ "language": "en",
527
525
  },
528
526
  task_type="memory",
529
527
  )
@@ -573,8 +571,8 @@ class TestAsyncDocuments:
573
571
  @parametrize
574
572
  async def test_method_list_with_all_params(self, async_client: AsyncSupermemory) -> None:
575
573
  document = await async_client.documents.list(
576
- container_tags=["user_123", "project_123"],
577
- filepath="/docs/",
574
+ container_tags=["_:_k--W2K_1V"],
575
+ filepath="filepath",
578
576
  filters={
579
577
  "and_": [
580
578
  {
@@ -721,7 +719,11 @@ class TestAsyncDocuments:
721
719
  @parametrize
722
720
  async def test_method_batch_add(self, async_client: AsyncSupermemory) -> None:
723
721
  document = await async_client.documents.batch_add(
724
- documents=[{"content": "This is a detailed article about machine learning concepts..."}],
722
+ documents=[
723
+ {
724
+ "content": "Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s."
725
+ }
726
+ ],
725
727
  )
726
728
  assert_matches_type(DocumentBatchAddResponse, document, path=["response"])
727
729
 
@@ -731,41 +733,35 @@ class TestAsyncDocuments:
731
733
  document = await async_client.documents.batch_add(
732
734
  documents=[
733
735
  {
734
- "content": "This is a detailed article about machine learning concepts...",
735
- "container_tag": "user_123",
736
- "container_tags": ["user_123", "project_123"],
737
- "custom_id": "mem_abc123",
736
+ "content": "Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s.",
737
+ "container_tag": "user_alex",
738
+ "container_tags": ["_:_k--W2K_1V"],
739
+ "custom_id": "doc-api-rate-limits",
740
+ "entity_context": "User's name is {XYZ}",
738
741
  "filepath": "/documents/reports/file.pdf",
739
742
  "filter_by_metadata": {
740
743
  "department": "engineering",
741
744
  "region": "us",
742
745
  },
743
746
  "metadata": {
744
- "category": "technology",
745
- "isPublic": True,
746
- "readingTime": 5,
747
- "source": "web",
748
- "tag_1": "ai",
749
- "tag_2": "machine-learning",
747
+ "source": "upload",
748
+ "language": "en",
750
749
  },
751
750
  "task_type": "memory",
752
751
  }
753
752
  ],
754
- container_tag="user_123",
755
- container_tags=["user_123", "project_123"],
753
+ container_tag="user_alex",
754
+ container_tags=["_:_k--W2K_1V"],
756
755
  content=None,
756
+ entity_context="User's name is {XYZ}",
757
757
  filepath="/documents/reports/file.pdf",
758
758
  filter_by_metadata={
759
759
  "department": "engineering",
760
760
  "region": "us",
761
761
  },
762
762
  metadata={
763
- "category": "technology",
764
- "isPublic": True,
765
- "readingTime": 5,
766
- "source": "web",
767
- "tag_1": "ai",
768
- "tag_2": "machine-learning",
763
+ "source": "upload",
764
+ "language": "en",
769
765
  },
770
766
  task_type="memory",
771
767
  )
@@ -775,7 +771,11 @@ class TestAsyncDocuments:
775
771
  @parametrize
776
772
  async def test_raw_response_batch_add(self, async_client: AsyncSupermemory) -> None:
777
773
  response = await async_client.documents.with_raw_response.batch_add(
778
- documents=[{"content": "This is a detailed article about machine learning concepts..."}],
774
+ documents=[
775
+ {
776
+ "content": "Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s."
777
+ }
778
+ ],
779
779
  )
780
780
 
781
781
  assert response.is_closed is True
@@ -787,7 +787,11 @@ class TestAsyncDocuments:
787
787
  @parametrize
788
788
  async def test_streaming_response_batch_add(self, async_client: AsyncSupermemory) -> None:
789
789
  async with async_client.documents.with_streaming_response.batch_add(
790
- documents=[{"content": "This is a detailed article about machine learning concepts..."}],
790
+ documents=[
791
+ {
792
+ "content": "Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s."
793
+ }
794
+ ],
791
795
  ) as response:
792
796
  assert not response.is_closed
793
797
  assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -807,8 +811,8 @@ class TestAsyncDocuments:
807
811
  @parametrize
808
812
  async def test_method_delete_bulk_with_all_params(self, async_client: AsyncSupermemory) -> None:
809
813
  document = await async_client.documents.delete_bulk(
810
- container_tags=["user_123", "project_123"],
811
- filepath="/docs/old/",
814
+ container_tags=["_:_k--W2K_1V"],
815
+ filepath="filepath",
812
816
  ids=["acxV5LHMEsG2hMSNb4umbn", "bxcV5LHMEsG2hMSNb4umbn"],
813
817
  )
814
818
  assert_matches_type(DocumentDeleteBulkResponse, document, path=["response"])
@@ -919,9 +923,9 @@ class TestAsyncDocuments:
919
923
  document = await async_client.documents.upload_file(
920
924
  file=b"Example data",
921
925
  container_tag="user",
922
- container_tags='["user_123", "project_123"]',
926
+ container_tags="containerTags",
923
927
  custom_id="mem_abc123",
924
- entity_context="This user is a software engineer who prefers concise technical documentation.",
928
+ entity_context="User's name is {XYZ}",
925
929
  filepath="/documents/reports/file.pdf",
926
930
  file_type="image",
927
931
  filter_by_metadata='{"department": "engineering"}',
@@ -25,7 +25,7 @@ class TestSearch:
25
25
  @parametrize
26
26
  def test_method_documents(self, client: Supermemory) -> None:
27
27
  search = client.search.documents(
28
- q="machine learning concepts",
28
+ q="what are the API rate limits",
29
29
  )
30
30
  assert_matches_type(SearchDocumentsResponse, search, path=["response"])
31
31
 
@@ -33,14 +33,14 @@ class TestSearch:
33
33
  @parametrize
34
34
  def test_method_documents_with_all_params(self, client: Supermemory) -> None:
35
35
  search = client.search.documents(
36
- q="machine learning concepts",
36
+ q="what are the API rate limits",
37
37
  categories_filter=["string"],
38
38
  chunk_threshold=0.5,
39
- container_tag="user_123",
40
- container_tags=["user_123"],
39
+ container_tag="user_alex",
40
+ container_tags=["_:_k--W2K_1V"],
41
41
  doc_id="docId",
42
42
  document_threshold=0,
43
- filepath="/docs/",
43
+ filepath="filepath",
44
44
  filters={
45
45
  "or_": [
46
46
  {
@@ -66,7 +66,7 @@ class TestSearch:
66
66
  @parametrize
67
67
  def test_raw_response_documents(self, client: Supermemory) -> None:
68
68
  response = client.search.with_raw_response.documents(
69
- q="machine learning concepts",
69
+ q="what are the API rate limits",
70
70
  )
71
71
 
72
72
  assert response.is_closed is True
@@ -78,7 +78,7 @@ class TestSearch:
78
78
  @parametrize
79
79
  def test_streaming_response_documents(self, client: Supermemory) -> None:
80
80
  with client.search.with_streaming_response.documents(
81
- q="machine learning concepts",
81
+ q="what are the API rate limits",
82
82
  ) as response:
83
83
  assert not response.is_closed
84
84
  assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -92,7 +92,7 @@ class TestSearch:
92
92
  @parametrize
93
93
  def test_method_execute(self, client: Supermemory) -> None:
94
94
  search = client.search.execute(
95
- q="machine learning concepts",
95
+ q="what are the API rate limits",
96
96
  )
97
97
  assert_matches_type(SearchExecuteResponse, search, path=["response"])
98
98
 
@@ -100,14 +100,14 @@ class TestSearch:
100
100
  @parametrize
101
101
  def test_method_execute_with_all_params(self, client: Supermemory) -> None:
102
102
  search = client.search.execute(
103
- q="machine learning concepts",
103
+ q="what are the API rate limits",
104
104
  categories_filter=["string"],
105
105
  chunk_threshold=0.5,
106
- container_tag="user_123",
107
- container_tags=["user_123"],
106
+ container_tag="user_alex",
107
+ container_tags=["_:_k--W2K_1V"],
108
108
  doc_id="docId",
109
109
  document_threshold=0,
110
- filepath="/docs/",
110
+ filepath="filepath",
111
111
  filters={
112
112
  "or_": [
113
113
  {
@@ -133,7 +133,7 @@ class TestSearch:
133
133
  @parametrize
134
134
  def test_raw_response_execute(self, client: Supermemory) -> None:
135
135
  response = client.search.with_raw_response.execute(
136
- q="machine learning concepts",
136
+ q="what are the API rate limits",
137
137
  )
138
138
 
139
139
  assert response.is_closed is True
@@ -145,7 +145,7 @@ class TestSearch:
145
145
  @parametrize
146
146
  def test_streaming_response_execute(self, client: Supermemory) -> None:
147
147
  with client.search.with_streaming_response.execute(
148
- q="machine learning concepts",
148
+ q="what are the API rate limits",
149
149
  ) as response:
150
150
  assert not response.is_closed
151
151
  assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -159,7 +159,7 @@ class TestSearch:
159
159
  @parametrize
160
160
  def test_method_memories(self, client: Supermemory) -> None:
161
161
  search = client.search.memories(
162
- q="machine learning concepts",
162
+ q="what are the API rate limits",
163
163
  )
164
164
  assert_matches_type(SearchMemoriesResponse, search, path=["response"])
165
165
 
@@ -167,10 +167,10 @@ class TestSearch:
167
167
  @parametrize
168
168
  def test_method_memories_with_all_params(self, client: Supermemory) -> None:
169
169
  search = client.search.memories(
170
- q="machine learning concepts",
170
+ q="what are the API rate limits",
171
171
  aggregate=False,
172
- container_tag="user_123",
173
- filepath="/docs/",
172
+ container_tag="user_alex",
173
+ filepath="filepath",
174
174
  filters={
175
175
  "or_": [
176
176
  {
@@ -202,7 +202,7 @@ class TestSearch:
202
202
  @parametrize
203
203
  def test_raw_response_memories(self, client: Supermemory) -> None:
204
204
  response = client.search.with_raw_response.memories(
205
- q="machine learning concepts",
205
+ q="what are the API rate limits",
206
206
  )
207
207
 
208
208
  assert response.is_closed is True
@@ -214,7 +214,7 @@ class TestSearch:
214
214
  @parametrize
215
215
  def test_streaming_response_memories(self, client: Supermemory) -> None:
216
216
  with client.search.with_streaming_response.memories(
217
- q="machine learning concepts",
217
+ q="what are the API rate limits",
218
218
  ) as response:
219
219
  assert not response.is_closed
220
220
  assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -234,7 +234,7 @@ class TestAsyncSearch:
234
234
  @parametrize
235
235
  async def test_method_documents(self, async_client: AsyncSupermemory) -> None:
236
236
  search = await async_client.search.documents(
237
- q="machine learning concepts",
237
+ q="what are the API rate limits",
238
238
  )
239
239
  assert_matches_type(SearchDocumentsResponse, search, path=["response"])
240
240
 
@@ -242,14 +242,14 @@ class TestAsyncSearch:
242
242
  @parametrize
243
243
  async def test_method_documents_with_all_params(self, async_client: AsyncSupermemory) -> None:
244
244
  search = await async_client.search.documents(
245
- q="machine learning concepts",
245
+ q="what are the API rate limits",
246
246
  categories_filter=["string"],
247
247
  chunk_threshold=0.5,
248
- container_tag="user_123",
249
- container_tags=["user_123"],
248
+ container_tag="user_alex",
249
+ container_tags=["_:_k--W2K_1V"],
250
250
  doc_id="docId",
251
251
  document_threshold=0,
252
- filepath="/docs/",
252
+ filepath="filepath",
253
253
  filters={
254
254
  "or_": [
255
255
  {
@@ -275,7 +275,7 @@ class TestAsyncSearch:
275
275
  @parametrize
276
276
  async def test_raw_response_documents(self, async_client: AsyncSupermemory) -> None:
277
277
  response = await async_client.search.with_raw_response.documents(
278
- q="machine learning concepts",
278
+ q="what are the API rate limits",
279
279
  )
280
280
 
281
281
  assert response.is_closed is True
@@ -287,7 +287,7 @@ class TestAsyncSearch:
287
287
  @parametrize
288
288
  async def test_streaming_response_documents(self, async_client: AsyncSupermemory) -> None:
289
289
  async with async_client.search.with_streaming_response.documents(
290
- q="machine learning concepts",
290
+ q="what are the API rate limits",
291
291
  ) as response:
292
292
  assert not response.is_closed
293
293
  assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -301,7 +301,7 @@ class TestAsyncSearch:
301
301
  @parametrize
302
302
  async def test_method_execute(self, async_client: AsyncSupermemory) -> None:
303
303
  search = await async_client.search.execute(
304
- q="machine learning concepts",
304
+ q="what are the API rate limits",
305
305
  )
306
306
  assert_matches_type(SearchExecuteResponse, search, path=["response"])
307
307
 
@@ -309,14 +309,14 @@ class TestAsyncSearch:
309
309
  @parametrize
310
310
  async def test_method_execute_with_all_params(self, async_client: AsyncSupermemory) -> None:
311
311
  search = await async_client.search.execute(
312
- q="machine learning concepts",
312
+ q="what are the API rate limits",
313
313
  categories_filter=["string"],
314
314
  chunk_threshold=0.5,
315
- container_tag="user_123",
316
- container_tags=["user_123"],
315
+ container_tag="user_alex",
316
+ container_tags=["_:_k--W2K_1V"],
317
317
  doc_id="docId",
318
318
  document_threshold=0,
319
- filepath="/docs/",
319
+ filepath="filepath",
320
320
  filters={
321
321
  "or_": [
322
322
  {
@@ -342,7 +342,7 @@ class TestAsyncSearch:
342
342
  @parametrize
343
343
  async def test_raw_response_execute(self, async_client: AsyncSupermemory) -> None:
344
344
  response = await async_client.search.with_raw_response.execute(
345
- q="machine learning concepts",
345
+ q="what are the API rate limits",
346
346
  )
347
347
 
348
348
  assert response.is_closed is True
@@ -354,7 +354,7 @@ class TestAsyncSearch:
354
354
  @parametrize
355
355
  async def test_streaming_response_execute(self, async_client: AsyncSupermemory) -> None:
356
356
  async with async_client.search.with_streaming_response.execute(
357
- q="machine learning concepts",
357
+ q="what are the API rate limits",
358
358
  ) as response:
359
359
  assert not response.is_closed
360
360
  assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -368,7 +368,7 @@ class TestAsyncSearch:
368
368
  @parametrize
369
369
  async def test_method_memories(self, async_client: AsyncSupermemory) -> None:
370
370
  search = await async_client.search.memories(
371
- q="machine learning concepts",
371
+ q="what are the API rate limits",
372
372
  )
373
373
  assert_matches_type(SearchMemoriesResponse, search, path=["response"])
374
374
 
@@ -376,10 +376,10 @@ class TestAsyncSearch:
376
376
  @parametrize
377
377
  async def test_method_memories_with_all_params(self, async_client: AsyncSupermemory) -> None:
378
378
  search = await async_client.search.memories(
379
- q="machine learning concepts",
379
+ q="what are the API rate limits",
380
380
  aggregate=False,
381
- container_tag="user_123",
382
- filepath="/docs/",
381
+ container_tag="user_alex",
382
+ filepath="filepath",
383
383
  filters={
384
384
  "or_": [
385
385
  {
@@ -411,7 +411,7 @@ class TestAsyncSearch:
411
411
  @parametrize
412
412
  async def test_raw_response_memories(self, async_client: AsyncSupermemory) -> None:
413
413
  response = await async_client.search.with_raw_response.memories(
414
- q="machine learning concepts",
414
+ q="what are the API rate limits",
415
415
  )
416
416
 
417
417
  assert response.is_closed is True
@@ -423,7 +423,7 @@ class TestAsyncSearch:
423
423
  @parametrize
424
424
  async def test_streaming_response_memories(self, async_client: AsyncSupermemory) -> None:
425
425
  async with async_client.search.with_streaming_response.memories(
426
- q="machine learning concepts",
426
+ q="what are the API rate limits",
427
427
  ) as response:
428
428
  assert not response.is_closed
429
429
  assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -1,3 +0,0 @@
1
- {
2
- ".": "3.40.0"
3
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes