supermemory 3.7.0__py3-none-any.whl

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 (84) hide show
  1. supermemory/__init__.py +102 -0
  2. supermemory/_base_client.py +1995 -0
  3. supermemory/_client.py +683 -0
  4. supermemory/_compat.py +219 -0
  5. supermemory/_constants.py +14 -0
  6. supermemory/_exceptions.py +108 -0
  7. supermemory/_files.py +123 -0
  8. supermemory/_models.py +857 -0
  9. supermemory/_qs.py +150 -0
  10. supermemory/_resource.py +43 -0
  11. supermemory/_response.py +832 -0
  12. supermemory/_streaming.py +331 -0
  13. supermemory/_types.py +260 -0
  14. supermemory/_utils/__init__.py +64 -0
  15. supermemory/_utils/_compat.py +45 -0
  16. supermemory/_utils/_datetime_parse.py +136 -0
  17. supermemory/_utils/_logs.py +25 -0
  18. supermemory/_utils/_proxy.py +65 -0
  19. supermemory/_utils/_reflection.py +42 -0
  20. supermemory/_utils/_resources_proxy.py +24 -0
  21. supermemory/_utils/_streams.py +12 -0
  22. supermemory/_utils/_sync.py +58 -0
  23. supermemory/_utils/_transform.py +457 -0
  24. supermemory/_utils/_typing.py +156 -0
  25. supermemory/_utils/_utils.py +421 -0
  26. supermemory/_version.py +4 -0
  27. supermemory/lib/.keep +4 -0
  28. supermemory/py.typed +0 -0
  29. supermemory/resources/__init__.py +75 -0
  30. supermemory/resources/connections.py +807 -0
  31. supermemory/resources/documents.py +830 -0
  32. supermemory/resources/memories.py +830 -0
  33. supermemory/resources/search.py +657 -0
  34. supermemory/resources/settings.py +278 -0
  35. supermemory/types/__init__.py +51 -0
  36. supermemory/types/add_response.py +13 -0
  37. supermemory/types/client_add_params.py +36 -0
  38. supermemory/types/client_profile_params.py +21 -0
  39. supermemory/types/connection_create_params.py +21 -0
  40. supermemory/types/connection_create_response.py +19 -0
  41. supermemory/types/connection_delete_by_id_response.py +11 -0
  42. supermemory/types/connection_delete_by_provider_params.py +15 -0
  43. supermemory/types/connection_delete_by_provider_response.py +11 -0
  44. supermemory/types/connection_get_by_id_response.py +25 -0
  45. supermemory/types/connection_get_by_tags_params.py +15 -0
  46. supermemory/types/connection_get_by_tags_response.py +25 -0
  47. supermemory/types/connection_import_params.py +15 -0
  48. supermemory/types/connection_import_response.py +7 -0
  49. supermemory/types/connection_list_documents_params.py +15 -0
  50. supermemory/types/connection_list_documents_response.py +29 -0
  51. supermemory/types/connection_list_params.py +15 -0
  52. supermemory/types/connection_list_response.py +29 -0
  53. supermemory/types/document_add_params.py +36 -0
  54. supermemory/types/document_add_response.py +13 -0
  55. supermemory/types/document_get_response.py +103 -0
  56. supermemory/types/document_list_params.py +52 -0
  57. supermemory/types/document_list_response.py +94 -0
  58. supermemory/types/document_update_params.py +55 -0
  59. supermemory/types/document_update_response.py +13 -0
  60. supermemory/types/document_upload_file_params.py +44 -0
  61. supermemory/types/document_upload_file_response.py +13 -0
  62. supermemory/types/memory_add_params.py +36 -0
  63. supermemory/types/memory_add_response.py +13 -0
  64. supermemory/types/memory_get_response.py +103 -0
  65. supermemory/types/memory_list_params.py +52 -0
  66. supermemory/types/memory_list_response.py +94 -0
  67. supermemory/types/memory_update_params.py +55 -0
  68. supermemory/types/memory_update_response.py +13 -0
  69. supermemory/types/memory_upload_file_params.py +44 -0
  70. supermemory/types/memory_upload_file_response.py +13 -0
  71. supermemory/types/profile_response.py +35 -0
  72. supermemory/types/search_documents_params.py +93 -0
  73. supermemory/types/search_documents_response.py +60 -0
  74. supermemory/types/search_execute_params.py +93 -0
  75. supermemory/types/search_execute_response.py +60 -0
  76. supermemory/types/search_memories_params.py +75 -0
  77. supermemory/types/search_memories_response.py +123 -0
  78. supermemory/types/setting_get_response.py +43 -0
  79. supermemory/types/setting_update_params.py +44 -0
  80. supermemory/types/setting_update_response.py +51 -0
  81. supermemory-3.7.0.dist-info/METADATA +447 -0
  82. supermemory-3.7.0.dist-info/RECORD +84 -0
  83. supermemory-3.7.0.dist-info/WHEEL +4 -0
  84. supermemory-3.7.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,123 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Dict, List, Optional
4
+ from typing_extensions import Literal
5
+
6
+ from pydantic import Field as FieldInfo
7
+
8
+ from .._models import BaseModel
9
+
10
+ __all__ = [
11
+ "SearchMemoriesResponse",
12
+ "Result",
13
+ "ResultContext",
14
+ "ResultContextChild",
15
+ "ResultContextParent",
16
+ "ResultDocument",
17
+ ]
18
+
19
+
20
+ class ResultContextChild(BaseModel):
21
+ memory: str
22
+ """The contextual memory content"""
23
+
24
+ relation: Literal["updates", "extends", "derives"]
25
+ """Relation type between this memory and its parent/child"""
26
+
27
+ updated_at: str = FieldInfo(alias="updatedAt")
28
+ """Contextual memory last update date"""
29
+
30
+ metadata: Optional[Dict[str, object]] = None
31
+ """Contextual memory metadata"""
32
+
33
+ version: Optional[float] = None
34
+ """
35
+ Relative version distance from the primary memory (+1 for direct child, +2 for
36
+ grand-child, etc.)
37
+ """
38
+
39
+
40
+ class ResultContextParent(BaseModel):
41
+ memory: str
42
+ """The contextual memory content"""
43
+
44
+ relation: Literal["updates", "extends", "derives"]
45
+ """Relation type between this memory and its parent/child"""
46
+
47
+ updated_at: str = FieldInfo(alias="updatedAt")
48
+ """Contextual memory last update date"""
49
+
50
+ metadata: Optional[Dict[str, object]] = None
51
+ """Contextual memory metadata"""
52
+
53
+ version: Optional[float] = None
54
+ """
55
+ Relative version distance from the primary memory (-1 for direct parent, -2 for
56
+ grand-parent, etc.)
57
+ """
58
+
59
+
60
+ class ResultContext(BaseModel):
61
+ children: Optional[List[ResultContextChild]] = None
62
+
63
+ parents: Optional[List[ResultContextParent]] = None
64
+
65
+
66
+ class ResultDocument(BaseModel):
67
+ id: str
68
+ """Document ID"""
69
+
70
+ created_at: str = FieldInfo(alias="createdAt")
71
+ """Document creation date"""
72
+
73
+ updated_at: str = FieldInfo(alias="updatedAt")
74
+ """Document last update date"""
75
+
76
+ metadata: Optional[Dict[str, object]] = None
77
+ """Document metadata (only included when documents=true)"""
78
+
79
+ summary: Optional[str] = None
80
+ """Document summary (only included when summaries=true)"""
81
+
82
+ title: Optional[str] = None
83
+ """Document title (only included when documents=true)"""
84
+
85
+ type: Optional[str] = None
86
+ """Document type (only included when documents=true)"""
87
+
88
+
89
+ class Result(BaseModel):
90
+ id: str
91
+ """Memory entry ID"""
92
+
93
+ memory: str
94
+ """The memory content"""
95
+
96
+ metadata: Optional[Dict[str, object]] = None
97
+ """Memory metadata"""
98
+
99
+ similarity: float
100
+ """Similarity score between the query and memory entry"""
101
+
102
+ updated_at: str = FieldInfo(alias="updatedAt")
103
+ """Memory last update date"""
104
+
105
+ context: Optional[ResultContext] = None
106
+ """Object containing arrays of parent and child contextual memories"""
107
+
108
+ documents: Optional[List[ResultDocument]] = None
109
+ """Associated documents for this memory entry"""
110
+
111
+ version: Optional[float] = None
112
+ """Version number of this memory entry"""
113
+
114
+
115
+ class SearchMemoriesResponse(BaseModel):
116
+ results: List[Result]
117
+ """Array of matching memory entries with similarity scores"""
118
+
119
+ timing: float
120
+ """Search execution time in milliseconds"""
121
+
122
+ total: float
123
+ """Total number of results returned"""
@@ -0,0 +1,43 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Dict, List, Union, Optional
4
+
5
+ from pydantic import Field as FieldInfo
6
+
7
+ from .._models import BaseModel
8
+
9
+ __all__ = ["SettingGetResponse"]
10
+
11
+
12
+ class SettingGetResponse(BaseModel):
13
+ chunk_size: Optional[int] = FieldInfo(alias="chunkSize", default=None)
14
+
15
+ exclude_items: Union[str, float, bool, Dict[str, object], List[object], None] = FieldInfo(
16
+ alias="excludeItems", default=None
17
+ )
18
+
19
+ filter_prompt: Optional[str] = FieldInfo(alias="filterPrompt", default=None)
20
+
21
+ google_drive_client_id: Optional[str] = FieldInfo(alias="googleDriveClientId", default=None)
22
+
23
+ google_drive_client_secret: Optional[str] = FieldInfo(alias="googleDriveClientSecret", default=None)
24
+
25
+ google_drive_custom_key_enabled: Optional[bool] = FieldInfo(alias="googleDriveCustomKeyEnabled", default=None)
26
+
27
+ include_items: Union[str, float, bool, Dict[str, object], List[object], None] = FieldInfo(
28
+ alias="includeItems", default=None
29
+ )
30
+
31
+ notion_client_id: Optional[str] = FieldInfo(alias="notionClientId", default=None)
32
+
33
+ notion_client_secret: Optional[str] = FieldInfo(alias="notionClientSecret", default=None)
34
+
35
+ notion_custom_key_enabled: Optional[bool] = FieldInfo(alias="notionCustomKeyEnabled", default=None)
36
+
37
+ onedrive_client_id: Optional[str] = FieldInfo(alias="onedriveClientId", default=None)
38
+
39
+ onedrive_client_secret: Optional[str] = FieldInfo(alias="onedriveClientSecret", default=None)
40
+
41
+ onedrive_custom_key_enabled: Optional[bool] = FieldInfo(alias="onedriveCustomKeyEnabled", default=None)
42
+
43
+ should_llm_filter: Optional[bool] = FieldInfo(alias="shouldLLMFilter", default=None)
@@ -0,0 +1,44 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Dict, Union, Iterable, Optional
6
+ from typing_extensions import Annotated, TypedDict
7
+
8
+ from .._utils import PropertyInfo
9
+
10
+ __all__ = ["SettingUpdateParams"]
11
+
12
+
13
+ class SettingUpdateParams(TypedDict, total=False):
14
+ chunk_size: Annotated[Optional[int], PropertyInfo(alias="chunkSize")]
15
+
16
+ exclude_items: Annotated[
17
+ Union[str, float, bool, Dict[str, object], Iterable[object], None], PropertyInfo(alias="excludeItems")
18
+ ]
19
+
20
+ filter_prompt: Annotated[Optional[str], PropertyInfo(alias="filterPrompt")]
21
+
22
+ google_drive_client_id: Annotated[Optional[str], PropertyInfo(alias="googleDriveClientId")]
23
+
24
+ google_drive_client_secret: Annotated[Optional[str], PropertyInfo(alias="googleDriveClientSecret")]
25
+
26
+ google_drive_custom_key_enabled: Annotated[Optional[bool], PropertyInfo(alias="googleDriveCustomKeyEnabled")]
27
+
28
+ include_items: Annotated[
29
+ Union[str, float, bool, Dict[str, object], Iterable[object], None], PropertyInfo(alias="includeItems")
30
+ ]
31
+
32
+ notion_client_id: Annotated[Optional[str], PropertyInfo(alias="notionClientId")]
33
+
34
+ notion_client_secret: Annotated[Optional[str], PropertyInfo(alias="notionClientSecret")]
35
+
36
+ notion_custom_key_enabled: Annotated[Optional[bool], PropertyInfo(alias="notionCustomKeyEnabled")]
37
+
38
+ onedrive_client_id: Annotated[Optional[str], PropertyInfo(alias="onedriveClientId")]
39
+
40
+ onedrive_client_secret: Annotated[Optional[str], PropertyInfo(alias="onedriveClientSecret")]
41
+
42
+ onedrive_custom_key_enabled: Annotated[Optional[bool], PropertyInfo(alias="onedriveCustomKeyEnabled")]
43
+
44
+ should_llm_filter: Annotated[Optional[bool], PropertyInfo(alias="shouldLLMFilter")]
@@ -0,0 +1,51 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Dict, List, Union, Optional
4
+
5
+ from pydantic import Field as FieldInfo
6
+
7
+ from .._models import BaseModel
8
+
9
+ __all__ = ["SettingUpdateResponse", "Updated"]
10
+
11
+
12
+ class Updated(BaseModel):
13
+ chunk_size: Optional[int] = FieldInfo(alias="chunkSize", default=None)
14
+
15
+ exclude_items: Union[str, float, bool, Dict[str, object], List[object], None] = FieldInfo(
16
+ alias="excludeItems", default=None
17
+ )
18
+
19
+ filter_prompt: Optional[str] = FieldInfo(alias="filterPrompt", default=None)
20
+
21
+ google_drive_client_id: Optional[str] = FieldInfo(alias="googleDriveClientId", default=None)
22
+
23
+ google_drive_client_secret: Optional[str] = FieldInfo(alias="googleDriveClientSecret", default=None)
24
+
25
+ google_drive_custom_key_enabled: Optional[bool] = FieldInfo(alias="googleDriveCustomKeyEnabled", default=None)
26
+
27
+ include_items: Union[str, float, bool, Dict[str, object], List[object], None] = FieldInfo(
28
+ alias="includeItems", default=None
29
+ )
30
+
31
+ notion_client_id: Optional[str] = FieldInfo(alias="notionClientId", default=None)
32
+
33
+ notion_client_secret: Optional[str] = FieldInfo(alias="notionClientSecret", default=None)
34
+
35
+ notion_custom_key_enabled: Optional[bool] = FieldInfo(alias="notionCustomKeyEnabled", default=None)
36
+
37
+ onedrive_client_id: Optional[str] = FieldInfo(alias="onedriveClientId", default=None)
38
+
39
+ onedrive_client_secret: Optional[str] = FieldInfo(alias="onedriveClientSecret", default=None)
40
+
41
+ onedrive_custom_key_enabled: Optional[bool] = FieldInfo(alias="onedriveCustomKeyEnabled", default=None)
42
+
43
+ should_llm_filter: Optional[bool] = FieldInfo(alias="shouldLLMFilter", default=None)
44
+
45
+
46
+ class SettingUpdateResponse(BaseModel):
47
+ org_id: str = FieldInfo(alias="orgId")
48
+
49
+ org_slug: str = FieldInfo(alias="orgSlug")
50
+
51
+ updated: Updated