supermemory 0.1.0a1__py3-none-any.whl → 3.0.0a2__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.
- supermemory/__init__.py +7 -1
- supermemory/_base_client.py +44 -2
- supermemory/_client.py +21 -29
- supermemory/_models.py +2 -0
- supermemory/_types.py +2 -0
- supermemory/_utils/_proxy.py +4 -1
- supermemory/_utils/_resources_proxy.py +24 -0
- supermemory/_version.py +1 -1
- supermemory/resources/__init__.py +26 -40
- supermemory/resources/{connection.py → connections.py} +86 -80
- supermemory/resources/{memory.py → memories.py} +224 -176
- supermemory/resources/settings.py +102 -19
- supermemory/types/__init__.py +6 -7
- supermemory/types/connection_create_params.py +7 -2
- supermemory/types/connection_create_response.py +7 -1
- supermemory/types/connection_get_response.py +25 -0
- supermemory/types/memory_add_params.py +46 -0
- supermemory/types/{memory_create_response.py → memory_add_response.py} +2 -2
- supermemory/types/memory_get_response.py +79 -9
- supermemory/types/memory_update_params.py +46 -0
- supermemory/types/{memory_delete_response.py → memory_update_response.py} +5 -3
- supermemory/types/setting_get_response.py +45 -0
- supermemory/types/setting_update_params.py +28 -12
- supermemory/types/setting_update_response.py +31 -13
- {supermemory-0.1.0a1.dist-info → supermemory-3.0.0a2.dist-info}/METADATA +52 -15
- supermemory-3.0.0a2.dist-info/RECORD +46 -0
- supermemory/resources/search.py +0 -254
- supermemory/types/memory_create_params.py +0 -23
- supermemory/types/memory_list_params.py +0 -24
- supermemory/types/memory_list_response.py +0 -59
- supermemory/types/search_execute_params.py +0 -56
- supermemory/types/search_execute_response.py +0 -52
- supermemory-0.1.0a1.dist-info/RECORD +0 -47
- {supermemory-0.1.0a1.dist-info → supermemory-3.0.0a2.dist-info}/WHEEL +0 -0
- {supermemory-0.1.0a1.dist-info → supermemory-3.0.0a2.dist-info}/licenses/LICENSE +0 -0
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
4
|
|
5
|
-
from typing import
|
5
|
+
from typing import Dict, Union, Iterable, Optional
|
6
6
|
|
7
7
|
import httpx
|
8
8
|
|
@@ -18,6 +18,7 @@ from .._response import (
|
|
18
18
|
async_to_streamed_response_wrapper,
|
19
19
|
)
|
20
20
|
from .._base_client import make_request_options
|
21
|
+
from ..types.setting_get_response import SettingGetResponse
|
21
22
|
from ..types.setting_update_response import SettingUpdateResponse
|
22
23
|
|
23
24
|
__all__ = ["SettingsResource", "AsyncSettingsResource"]
|
@@ -46,12 +47,20 @@ class SettingsResource(SyncAPIResource):
|
|
46
47
|
def update(
|
47
48
|
self,
|
48
49
|
*,
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
50
|
+
exclude_items: Union[str, float, bool, Dict[str, object], Iterable[object], None] | NotGiven = NOT_GIVEN,
|
51
|
+
filter_prompt: Optional[str] | NotGiven = NOT_GIVEN,
|
52
|
+
filter_tags: Union[str, float, bool, Dict[str, object], Iterable[object], None] | NotGiven = NOT_GIVEN,
|
53
|
+
google_drive_client_id: Optional[str] | NotGiven = NOT_GIVEN,
|
54
|
+
google_drive_client_secret: Optional[str] | NotGiven = NOT_GIVEN,
|
55
|
+
google_drive_custom_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
|
56
|
+
include_items: Union[str, float, bool, Dict[str, object], Iterable[object], None] | NotGiven = NOT_GIVEN,
|
57
|
+
notion_client_id: Optional[str] | NotGiven = NOT_GIVEN,
|
58
|
+
notion_client_secret: Optional[str] | NotGiven = NOT_GIVEN,
|
59
|
+
notion_custom_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
|
60
|
+
onedrive_client_id: Optional[str] | NotGiven = NOT_GIVEN,
|
61
|
+
onedrive_client_secret: Optional[str] | NotGiven = NOT_GIVEN,
|
62
|
+
onedrive_custom_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
|
63
|
+
should_llm_filter: Optional[bool] | NotGiven = NOT_GIVEN,
|
55
64
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
56
65
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
57
66
|
extra_headers: Headers | None = None,
|
@@ -71,15 +80,23 @@ class SettingsResource(SyncAPIResource):
|
|
71
80
|
|
72
81
|
timeout: Override the client-level default timeout for this request, in seconds
|
73
82
|
"""
|
74
|
-
return self.
|
75
|
-
"/settings",
|
83
|
+
return self._patch(
|
84
|
+
"/v3/settings",
|
76
85
|
body=maybe_transform(
|
77
86
|
{
|
78
|
-
"categories": categories,
|
79
87
|
"exclude_items": exclude_items,
|
80
88
|
"filter_prompt": filter_prompt,
|
81
89
|
"filter_tags": filter_tags,
|
90
|
+
"google_drive_client_id": google_drive_client_id,
|
91
|
+
"google_drive_client_secret": google_drive_client_secret,
|
92
|
+
"google_drive_custom_key_enabled": google_drive_custom_key_enabled,
|
82
93
|
"include_items": include_items,
|
94
|
+
"notion_client_id": notion_client_id,
|
95
|
+
"notion_client_secret": notion_client_secret,
|
96
|
+
"notion_custom_key_enabled": notion_custom_key_enabled,
|
97
|
+
"onedrive_client_id": onedrive_client_id,
|
98
|
+
"onedrive_client_secret": onedrive_client_secret,
|
99
|
+
"onedrive_custom_key_enabled": onedrive_custom_key_enabled,
|
83
100
|
"should_llm_filter": should_llm_filter,
|
84
101
|
},
|
85
102
|
setting_update_params.SettingUpdateParams,
|
@@ -90,6 +107,25 @@ class SettingsResource(SyncAPIResource):
|
|
90
107
|
cast_to=SettingUpdateResponse,
|
91
108
|
)
|
92
109
|
|
110
|
+
def get(
|
111
|
+
self,
|
112
|
+
*,
|
113
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
114
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
115
|
+
extra_headers: Headers | None = None,
|
116
|
+
extra_query: Query | None = None,
|
117
|
+
extra_body: Body | None = None,
|
118
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
119
|
+
) -> SettingGetResponse:
|
120
|
+
"""Get settings for an organization"""
|
121
|
+
return self._get(
|
122
|
+
"/v3/settings",
|
123
|
+
options=make_request_options(
|
124
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
125
|
+
),
|
126
|
+
cast_to=SettingGetResponse,
|
127
|
+
)
|
128
|
+
|
93
129
|
|
94
130
|
class AsyncSettingsResource(AsyncAPIResource):
|
95
131
|
@cached_property
|
@@ -114,12 +150,20 @@ class AsyncSettingsResource(AsyncAPIResource):
|
|
114
150
|
async def update(
|
115
151
|
self,
|
116
152
|
*,
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
153
|
+
exclude_items: Union[str, float, bool, Dict[str, object], Iterable[object], None] | NotGiven = NOT_GIVEN,
|
154
|
+
filter_prompt: Optional[str] | NotGiven = NOT_GIVEN,
|
155
|
+
filter_tags: Union[str, float, bool, Dict[str, object], Iterable[object], None] | NotGiven = NOT_GIVEN,
|
156
|
+
google_drive_client_id: Optional[str] | NotGiven = NOT_GIVEN,
|
157
|
+
google_drive_client_secret: Optional[str] | NotGiven = NOT_GIVEN,
|
158
|
+
google_drive_custom_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
|
159
|
+
include_items: Union[str, float, bool, Dict[str, object], Iterable[object], None] | NotGiven = NOT_GIVEN,
|
160
|
+
notion_client_id: Optional[str] | NotGiven = NOT_GIVEN,
|
161
|
+
notion_client_secret: Optional[str] | NotGiven = NOT_GIVEN,
|
162
|
+
notion_custom_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
|
163
|
+
onedrive_client_id: Optional[str] | NotGiven = NOT_GIVEN,
|
164
|
+
onedrive_client_secret: Optional[str] | NotGiven = NOT_GIVEN,
|
165
|
+
onedrive_custom_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
|
166
|
+
should_llm_filter: Optional[bool] | NotGiven = NOT_GIVEN,
|
123
167
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
124
168
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
125
169
|
extra_headers: Headers | None = None,
|
@@ -139,15 +183,23 @@ class AsyncSettingsResource(AsyncAPIResource):
|
|
139
183
|
|
140
184
|
timeout: Override the client-level default timeout for this request, in seconds
|
141
185
|
"""
|
142
|
-
return await self.
|
143
|
-
"/settings",
|
186
|
+
return await self._patch(
|
187
|
+
"/v3/settings",
|
144
188
|
body=await async_maybe_transform(
|
145
189
|
{
|
146
|
-
"categories": categories,
|
147
190
|
"exclude_items": exclude_items,
|
148
191
|
"filter_prompt": filter_prompt,
|
149
192
|
"filter_tags": filter_tags,
|
193
|
+
"google_drive_client_id": google_drive_client_id,
|
194
|
+
"google_drive_client_secret": google_drive_client_secret,
|
195
|
+
"google_drive_custom_key_enabled": google_drive_custom_key_enabled,
|
150
196
|
"include_items": include_items,
|
197
|
+
"notion_client_id": notion_client_id,
|
198
|
+
"notion_client_secret": notion_client_secret,
|
199
|
+
"notion_custom_key_enabled": notion_custom_key_enabled,
|
200
|
+
"onedrive_client_id": onedrive_client_id,
|
201
|
+
"onedrive_client_secret": onedrive_client_secret,
|
202
|
+
"onedrive_custom_key_enabled": onedrive_custom_key_enabled,
|
151
203
|
"should_llm_filter": should_llm_filter,
|
152
204
|
},
|
153
205
|
setting_update_params.SettingUpdateParams,
|
@@ -158,6 +210,25 @@ class AsyncSettingsResource(AsyncAPIResource):
|
|
158
210
|
cast_to=SettingUpdateResponse,
|
159
211
|
)
|
160
212
|
|
213
|
+
async def get(
|
214
|
+
self,
|
215
|
+
*,
|
216
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
217
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
218
|
+
extra_headers: Headers | None = None,
|
219
|
+
extra_query: Query | None = None,
|
220
|
+
extra_body: Body | None = None,
|
221
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
222
|
+
) -> SettingGetResponse:
|
223
|
+
"""Get settings for an organization"""
|
224
|
+
return await self._get(
|
225
|
+
"/v3/settings",
|
226
|
+
options=make_request_options(
|
227
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
228
|
+
),
|
229
|
+
cast_to=SettingGetResponse,
|
230
|
+
)
|
231
|
+
|
161
232
|
|
162
233
|
class SettingsResourceWithRawResponse:
|
163
234
|
def __init__(self, settings: SettingsResource) -> None:
|
@@ -166,6 +237,9 @@ class SettingsResourceWithRawResponse:
|
|
166
237
|
self.update = to_raw_response_wrapper(
|
167
238
|
settings.update,
|
168
239
|
)
|
240
|
+
self.get = to_raw_response_wrapper(
|
241
|
+
settings.get,
|
242
|
+
)
|
169
243
|
|
170
244
|
|
171
245
|
class AsyncSettingsResourceWithRawResponse:
|
@@ -175,6 +249,9 @@ class AsyncSettingsResourceWithRawResponse:
|
|
175
249
|
self.update = async_to_raw_response_wrapper(
|
176
250
|
settings.update,
|
177
251
|
)
|
252
|
+
self.get = async_to_raw_response_wrapper(
|
253
|
+
settings.get,
|
254
|
+
)
|
178
255
|
|
179
256
|
|
180
257
|
class SettingsResourceWithStreamingResponse:
|
@@ -184,6 +261,9 @@ class SettingsResourceWithStreamingResponse:
|
|
184
261
|
self.update = to_streamed_response_wrapper(
|
185
262
|
settings.update,
|
186
263
|
)
|
264
|
+
self.get = to_streamed_response_wrapper(
|
265
|
+
settings.get,
|
266
|
+
)
|
187
267
|
|
188
268
|
|
189
269
|
class AsyncSettingsResourceWithStreamingResponse:
|
@@ -193,3 +273,6 @@ class AsyncSettingsResourceWithStreamingResponse:
|
|
193
273
|
self.update = async_to_streamed_response_wrapper(
|
194
274
|
settings.update,
|
195
275
|
)
|
276
|
+
self.get = async_to_streamed_response_wrapper(
|
277
|
+
settings.get,
|
278
|
+
)
|
supermemory/types/__init__.py
CHANGED
@@ -2,15 +2,14 @@
|
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
4
|
|
5
|
-
from .
|
5
|
+
from .memory_add_params import MemoryAddParams as MemoryAddParams
|
6
|
+
from .memory_add_response import MemoryAddResponse as MemoryAddResponse
|
6
7
|
from .memory_get_response import MemoryGetResponse as MemoryGetResponse
|
7
|
-
from .
|
8
|
-
from .
|
9
|
-
from .search_execute_params import SearchExecuteParams as SearchExecuteParams
|
8
|
+
from .memory_update_params import MemoryUpdateParams as MemoryUpdateParams
|
9
|
+
from .setting_get_response import SettingGetResponse as SettingGetResponse
|
10
10
|
from .setting_update_params import SettingUpdateParams as SettingUpdateParams
|
11
|
-
from .
|
12
|
-
from .
|
13
|
-
from .search_execute_response import SearchExecuteResponse as SearchExecuteResponse
|
11
|
+
from .memory_update_response import MemoryUpdateResponse as MemoryUpdateResponse
|
12
|
+
from .connection_get_response import ConnectionGetResponse as ConnectionGetResponse
|
14
13
|
from .setting_update_response import SettingUpdateResponse as SettingUpdateResponse
|
15
14
|
from .connection_create_params import ConnectionCreateParams as ConnectionCreateParams
|
16
15
|
from .connection_create_response import ConnectionCreateResponse as ConnectionCreateResponse
|
@@ -2,7 +2,8 @@
|
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
4
|
|
5
|
-
from
|
5
|
+
from typing import Dict, List, Union, Optional
|
6
|
+
from typing_extensions import Annotated, TypedDict
|
6
7
|
|
7
8
|
from .._utils import PropertyInfo
|
8
9
|
|
@@ -10,6 +11,10 @@ __all__ = ["ConnectionCreateParams"]
|
|
10
11
|
|
11
12
|
|
12
13
|
class ConnectionCreateParams(TypedDict, total=False):
|
13
|
-
|
14
|
+
container_tags: Annotated[List[str], PropertyInfo(alias="containerTags")]
|
15
|
+
|
16
|
+
document_limit: Annotated[int, PropertyInfo(alias="documentLimit")]
|
17
|
+
|
18
|
+
metadata: Optional[Dict[str, Union[str, float, bool]]]
|
14
19
|
|
15
20
|
redirect_url: Annotated[str, PropertyInfo(alias="redirectUrl")]
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
2
|
|
3
|
+
from typing import Optional
|
4
|
+
|
3
5
|
from pydantic import Field as FieldInfo
|
4
6
|
|
5
7
|
from .._models import BaseModel
|
@@ -8,6 +10,10 @@ __all__ = ["ConnectionCreateResponse"]
|
|
8
10
|
|
9
11
|
|
10
12
|
class ConnectionCreateResponse(BaseModel):
|
13
|
+
id: str
|
14
|
+
|
15
|
+
auth_link: str = FieldInfo(alias="authLink")
|
16
|
+
|
11
17
|
expires_in: str = FieldInfo(alias="expiresIn")
|
12
18
|
|
13
|
-
|
19
|
+
redirects_to: Optional[str] = FieldInfo(alias="redirectsTo", default=None)
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import Dict, Optional
|
4
|
+
|
5
|
+
from pydantic import Field as FieldInfo
|
6
|
+
|
7
|
+
from .._models import BaseModel
|
8
|
+
|
9
|
+
__all__ = ["ConnectionGetResponse"]
|
10
|
+
|
11
|
+
|
12
|
+
class ConnectionGetResponse(BaseModel):
|
13
|
+
id: str
|
14
|
+
|
15
|
+
created_at: float = FieldInfo(alias="createdAt")
|
16
|
+
|
17
|
+
provider: str
|
18
|
+
|
19
|
+
document_limit: Optional[float] = FieldInfo(alias="documentLimit", default=None)
|
20
|
+
|
21
|
+
email: Optional[str] = None
|
22
|
+
|
23
|
+
expires_at: Optional[float] = FieldInfo(alias="expiresAt", default=None)
|
24
|
+
|
25
|
+
metadata: Optional[Dict[str, object]] = None
|
@@ -0,0 +1,46 @@
|
|
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, List, Union
|
6
|
+
from typing_extensions import Required, Annotated, TypedDict
|
7
|
+
|
8
|
+
from .._utils import PropertyInfo
|
9
|
+
|
10
|
+
__all__ = ["MemoryAddParams"]
|
11
|
+
|
12
|
+
|
13
|
+
class MemoryAddParams(TypedDict, total=False):
|
14
|
+
content: Required[str]
|
15
|
+
"""The content to extract and process into a memory.
|
16
|
+
|
17
|
+
This can be a URL to a website, a PDF, an image, or a video.
|
18
|
+
|
19
|
+
Plaintext: Any plaintext format
|
20
|
+
|
21
|
+
URL: A URL to a website, PDF, image, or video
|
22
|
+
|
23
|
+
We automatically detect the content type from the url's response format.
|
24
|
+
"""
|
25
|
+
|
26
|
+
container_tags: Annotated[List[str], PropertyInfo(alias="containerTags")]
|
27
|
+
"""Optional tags this memory should be containerized by.
|
28
|
+
|
29
|
+
This can be an ID for your user, a project ID, or any other identifier you wish
|
30
|
+
to use to group memories.
|
31
|
+
"""
|
32
|
+
|
33
|
+
custom_id: Annotated[str, PropertyInfo(alias="customId")]
|
34
|
+
"""Optional custom ID of the memory.
|
35
|
+
|
36
|
+
This could be an ID from your database that will uniquely identify this memory.
|
37
|
+
"""
|
38
|
+
|
39
|
+
metadata: Dict[str, Union[str, float, bool]]
|
40
|
+
"""Optional metadata for the memory.
|
41
|
+
|
42
|
+
This is used to store additional information about the memory. You can use this
|
43
|
+
to store any additional information you need about the memory. Metadata can be
|
44
|
+
filtered through. Keys must be strings and are case sensitive. Values can be
|
45
|
+
strings, numbers, or booleans. You cannot nest objects.
|
46
|
+
"""
|
@@ -1,27 +1,97 @@
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
2
|
|
3
|
-
from typing import Dict, Optional
|
3
|
+
from typing import Dict, List, Union, Optional
|
4
|
+
from datetime import datetime
|
5
|
+
from typing_extensions import Literal
|
4
6
|
|
5
7
|
from pydantic import Field as FieldInfo
|
6
8
|
|
7
9
|
from .._models import BaseModel
|
8
10
|
|
9
|
-
__all__ = ["MemoryGetResponse"
|
11
|
+
__all__ = ["MemoryGetResponse"]
|
10
12
|
|
11
13
|
|
12
|
-
class
|
13
|
-
|
14
|
+
class MemoryGetResponse(BaseModel):
|
15
|
+
id: str
|
16
|
+
"""Unique identifier of the memory."""
|
17
|
+
|
18
|
+
connection_id: Optional[str] = FieldInfo(alias="connectionId", default=None)
|
19
|
+
"""Optional ID of connection the memory was created from.
|
20
|
+
|
21
|
+
This is useful for identifying the source of the memory.
|
22
|
+
"""
|
23
|
+
|
24
|
+
content: Optional[str] = None
|
25
|
+
"""The content to extract and process into a memory.
|
26
|
+
|
27
|
+
This can be a URL to a website, a PDF, an image, or a video.
|
28
|
+
|
29
|
+
Plaintext: Any plaintext format
|
30
|
+
|
31
|
+
URL: A URL to a website, PDF, image, or video
|
32
|
+
|
33
|
+
We automatically detect the content type from the url's response format.
|
34
|
+
"""
|
35
|
+
|
36
|
+
created_at: datetime = FieldInfo(alias="createdAt")
|
37
|
+
"""Creation timestamp"""
|
14
38
|
|
15
|
-
|
39
|
+
custom_id: Optional[str] = FieldInfo(alias="customId", default=None)
|
40
|
+
"""Optional custom ID of the memory.
|
16
41
|
|
17
|
-
|
42
|
+
This could be an ID from your database that will uniquely identify this memory.
|
43
|
+
"""
|
44
|
+
|
45
|
+
metadata: Union[str, float, bool, Dict[str, object], List[object], None] = None
|
46
|
+
"""Optional metadata for the memory.
|
47
|
+
|
48
|
+
This is used to store additional information about the memory. You can use this
|
49
|
+
to store any additional information you need about the memory. Metadata can be
|
50
|
+
filtered through. Keys must be strings and are case sensitive. Values can be
|
51
|
+
strings, numbers, or booleans. You cannot nest objects.
|
52
|
+
"""
|
53
|
+
|
54
|
+
og_image: Optional[str] = FieldInfo(alias="ogImage", default=None)
|
55
|
+
|
56
|
+
source: Optional[str] = None
|
57
|
+
"""Source of the memory"""
|
58
|
+
|
59
|
+
status: Literal["unknown", "queued", "extracting", "chunking", "embedding", "indexing", "done", "failed"]
|
60
|
+
"""Status of the memory"""
|
18
61
|
|
19
62
|
summary: Optional[str] = None
|
63
|
+
"""Summary of the memory content"""
|
20
64
|
|
21
65
|
title: Optional[str] = None
|
66
|
+
"""Title of the memory"""
|
22
67
|
|
68
|
+
type: Literal[
|
69
|
+
"text",
|
70
|
+
"pdf",
|
71
|
+
"tweet",
|
72
|
+
"google_doc",
|
73
|
+
"google_slide",
|
74
|
+
"google_sheet",
|
75
|
+
"image",
|
76
|
+
"video",
|
77
|
+
"notion_doc",
|
78
|
+
"webpage",
|
79
|
+
"onedrive",
|
80
|
+
]
|
81
|
+
"""Type of the memory"""
|
23
82
|
|
24
|
-
|
25
|
-
|
83
|
+
updated_at: datetime = FieldInfo(alias="updatedAt")
|
84
|
+
"""Last update timestamp"""
|
85
|
+
|
86
|
+
url: Optional[str] = None
|
87
|
+
"""URL of the memory"""
|
88
|
+
|
89
|
+
container_tags: Optional[List[str]] = FieldInfo(alias="containerTags", default=None)
|
90
|
+
"""Optional tags this memory should be containerized by.
|
91
|
+
|
92
|
+
This can be an ID for your user, a project ID, or any other identifier you wish
|
93
|
+
to use to group memories.
|
94
|
+
"""
|
26
95
|
|
27
|
-
|
96
|
+
raw: None = None
|
97
|
+
"""Raw content of the memory"""
|
@@ -0,0 +1,46 @@
|
|
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, List, Union
|
6
|
+
from typing_extensions import Required, Annotated, TypedDict
|
7
|
+
|
8
|
+
from .._utils import PropertyInfo
|
9
|
+
|
10
|
+
__all__ = ["MemoryUpdateParams"]
|
11
|
+
|
12
|
+
|
13
|
+
class MemoryUpdateParams(TypedDict, total=False):
|
14
|
+
content: Required[str]
|
15
|
+
"""The content to extract and process into a memory.
|
16
|
+
|
17
|
+
This can be a URL to a website, a PDF, an image, or a video.
|
18
|
+
|
19
|
+
Plaintext: Any plaintext format
|
20
|
+
|
21
|
+
URL: A URL to a website, PDF, image, or video
|
22
|
+
|
23
|
+
We automatically detect the content type from the url's response format.
|
24
|
+
"""
|
25
|
+
|
26
|
+
container_tags: Annotated[List[str], PropertyInfo(alias="containerTags")]
|
27
|
+
"""Optional tags this memory should be containerized by.
|
28
|
+
|
29
|
+
This can be an ID for your user, a project ID, or any other identifier you wish
|
30
|
+
to use to group memories.
|
31
|
+
"""
|
32
|
+
|
33
|
+
custom_id: Annotated[str, PropertyInfo(alias="customId")]
|
34
|
+
"""Optional custom ID of the memory.
|
35
|
+
|
36
|
+
This could be an ID from your database that will uniquely identify this memory.
|
37
|
+
"""
|
38
|
+
|
39
|
+
metadata: Dict[str, Union[str, float, bool]]
|
40
|
+
"""Optional metadata for the memory.
|
41
|
+
|
42
|
+
This is used to store additional information about the memory. You can use this
|
43
|
+
to store any additional information you need about the memory. Metadata can be
|
44
|
+
filtered through. Keys must be strings and are case sensitive. Values can be
|
45
|
+
strings, numbers, or booleans. You cannot nest objects.
|
46
|
+
"""
|
@@ -0,0 +1,45 @@
|
|
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
|
+
exclude_items: Union[str, float, bool, Dict[str, object], List[object], None] = FieldInfo(
|
14
|
+
alias="excludeItems", default=None
|
15
|
+
)
|
16
|
+
|
17
|
+
filter_prompt: Optional[str] = FieldInfo(alias="filterPrompt", default=None)
|
18
|
+
|
19
|
+
filter_tags: Union[str, float, bool, Dict[str, object], List[object], None] = FieldInfo(
|
20
|
+
alias="filterTags", default=None
|
21
|
+
)
|
22
|
+
|
23
|
+
google_drive_client_id: Optional[str] = FieldInfo(alias="googleDriveClientId", default=None)
|
24
|
+
|
25
|
+
google_drive_client_secret: Optional[str] = FieldInfo(alias="googleDriveClientSecret", default=None)
|
26
|
+
|
27
|
+
google_drive_custom_key_enabled: Optional[bool] = FieldInfo(alias="googleDriveCustomKeyEnabled", default=None)
|
28
|
+
|
29
|
+
include_items: Union[str, float, bool, Dict[str, object], List[object], None] = FieldInfo(
|
30
|
+
alias="includeItems", default=None
|
31
|
+
)
|
32
|
+
|
33
|
+
notion_client_id: Optional[str] = FieldInfo(alias="notionClientId", default=None)
|
34
|
+
|
35
|
+
notion_client_secret: Optional[str] = FieldInfo(alias="notionClientSecret", default=None)
|
36
|
+
|
37
|
+
notion_custom_key_enabled: Optional[bool] = FieldInfo(alias="notionCustomKeyEnabled", default=None)
|
38
|
+
|
39
|
+
onedrive_client_id: Optional[str] = FieldInfo(alias="onedriveClientId", default=None)
|
40
|
+
|
41
|
+
onedrive_client_secret: Optional[str] = FieldInfo(alias="onedriveClientSecret", default=None)
|
42
|
+
|
43
|
+
onedrive_custom_key_enabled: Optional[bool] = FieldInfo(alias="onedriveCustomKeyEnabled", default=None)
|
44
|
+
|
45
|
+
should_llm_filter: Optional[bool] = FieldInfo(alias="shouldLLMFilter", default=None)
|
@@ -2,29 +2,45 @@
|
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
4
|
|
5
|
-
from typing import
|
6
|
-
from typing_extensions import
|
5
|
+
from typing import Dict, Union, Iterable, Optional
|
6
|
+
from typing_extensions import Annotated, TypedDict
|
7
7
|
|
8
8
|
from .._utils import PropertyInfo
|
9
9
|
|
10
|
-
__all__ = ["SettingUpdateParams"
|
10
|
+
__all__ = ["SettingUpdateParams"]
|
11
11
|
|
12
12
|
|
13
13
|
class SettingUpdateParams(TypedDict, total=False):
|
14
|
-
|
14
|
+
exclude_items: Annotated[
|
15
|
+
Union[str, float, bool, Dict[str, object], Iterable[object], None], PropertyInfo(alias="excludeItems")
|
16
|
+
]
|
15
17
|
|
16
|
-
|
18
|
+
filter_prompt: Annotated[Optional[str], PropertyInfo(alias="filterPrompt")]
|
17
19
|
|
18
|
-
|
20
|
+
filter_tags: Annotated[
|
21
|
+
Union[str, float, bool, Dict[str, object], Iterable[object], None], PropertyInfo(alias="filterTags")
|
22
|
+
]
|
19
23
|
|
20
|
-
|
24
|
+
google_drive_client_id: Annotated[Optional[str], PropertyInfo(alias="googleDriveClientId")]
|
21
25
|
|
22
|
-
|
26
|
+
google_drive_client_secret: Annotated[Optional[str], PropertyInfo(alias="googleDriveClientSecret")]
|
23
27
|
|
24
|
-
|
28
|
+
google_drive_custom_key_enabled: Annotated[Optional[bool], PropertyInfo(alias="googleDriveCustomKeyEnabled")]
|
25
29
|
|
30
|
+
include_items: Annotated[
|
31
|
+
Union[str, float, bool, Dict[str, object], Iterable[object], None], PropertyInfo(alias="includeItems")
|
32
|
+
]
|
26
33
|
|
27
|
-
|
28
|
-
score: Required[float]
|
34
|
+
notion_client_id: Annotated[Optional[str], PropertyInfo(alias="notionClientId")]
|
29
35
|
|
30
|
-
|
36
|
+
notion_client_secret: Annotated[Optional[str], PropertyInfo(alias="notionClientSecret")]
|
37
|
+
|
38
|
+
notion_custom_key_enabled: Annotated[Optional[bool], PropertyInfo(alias="notionCustomKeyEnabled")]
|
39
|
+
|
40
|
+
onedrive_client_id: Annotated[Optional[str], PropertyInfo(alias="onedriveClientId")]
|
41
|
+
|
42
|
+
onedrive_client_secret: Annotated[Optional[str], PropertyInfo(alias="onedriveClientSecret")]
|
43
|
+
|
44
|
+
onedrive_custom_key_enabled: Annotated[Optional[bool], PropertyInfo(alias="onedriveCustomKeyEnabled")]
|
45
|
+
|
46
|
+
should_llm_filter: Annotated[Optional[bool], PropertyInfo(alias="shouldLLMFilter")]
|