supermemory 3.0.0a30__py3-none-any.whl → 3.1.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.

Potentially problematic release.


This version of supermemory might be problematic. Click here for more details.

Files changed (43) hide show
  1. supermemory/__init__.py +3 -1
  2. supermemory/_base_client.py +9 -9
  3. supermemory/_client.py +25 -9
  4. supermemory/_files.py +1 -1
  5. supermemory/_models.py +10 -4
  6. supermemory/_qs.py +7 -7
  7. supermemory/_types.py +18 -11
  8. supermemory/_utils/_transform.py +2 -2
  9. supermemory/_utils/_utils.py +4 -4
  10. supermemory/_version.py +1 -1
  11. supermemory/resources/__init__.py +28 -0
  12. supermemory/resources/connections.py +31 -31
  13. supermemory/resources/documents.py +894 -0
  14. supermemory/resources/memories.py +894 -0
  15. supermemory/resources/search.py +75 -75
  16. supermemory/resources/settings.py +31 -31
  17. supermemory/types/__init__.py +18 -0
  18. supermemory/types/document_add_params.py +69 -0
  19. supermemory/types/document_add_response.py +11 -0
  20. supermemory/types/document_get_response.py +104 -0
  21. supermemory/types/document_list_params.py +111 -0
  22. supermemory/types/document_list_response.py +95 -0
  23. supermemory/types/document_update_params.py +69 -0
  24. supermemory/types/document_update_response.py +11 -0
  25. supermemory/types/document_upload_file_params.py +36 -0
  26. supermemory/types/document_upload_file_response.py +11 -0
  27. supermemory/types/memory_add_params.py +69 -0
  28. supermemory/types/memory_add_response.py +11 -0
  29. supermemory/types/memory_get_response.py +104 -0
  30. supermemory/types/memory_list_params.py +111 -0
  31. supermemory/types/memory_list_response.py +95 -0
  32. supermemory/types/memory_update_params.py +69 -0
  33. supermemory/types/memory_update_response.py +11 -0
  34. supermemory/types/memory_upload_file_params.py +36 -0
  35. supermemory/types/memory_upload_file_response.py +11 -0
  36. supermemory/types/search_documents_params.py +68 -7
  37. supermemory/types/search_execute_params.py +68 -7
  38. supermemory/types/search_memories_params.py +77 -8
  39. {supermemory-3.0.0a30.dist-info → supermemory-3.1.0.dist-info}/METADATA +32 -15
  40. supermemory-3.1.0.dist-info/RECORD +80 -0
  41. supermemory-3.0.0a30.dist-info/RECORD +0 -60
  42. {supermemory-3.0.0a30.dist-info → supermemory-3.1.0.dist-info}/WHEEL +0 -0
  43. {supermemory-3.0.0a30.dist-info → supermemory-3.1.0.dist-info}/licenses/LICENSE +0 -0
@@ -8,7 +8,7 @@ from typing_extensions import Literal
8
8
  import httpx
9
9
 
10
10
  from ..types import search_execute_params, search_memories_params, search_documents_params
11
- from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
11
+ from .._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
12
12
  from .._utils import maybe_transform, async_maybe_transform
13
13
  from .._compat import cached_property
14
14
  from .._resource import SyncAPIResource, AsyncAPIResource
@@ -50,24 +50,24 @@ class SearchResource(SyncAPIResource):
50
50
  self,
51
51
  *,
52
52
  q: str,
53
- categories_filter: List[Literal["technology", "science", "business", "health"]] | NotGiven = NOT_GIVEN,
54
- chunk_threshold: float | NotGiven = NOT_GIVEN,
55
- container_tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
56
- doc_id: str | NotGiven = NOT_GIVEN,
57
- document_threshold: float | NotGiven = NOT_GIVEN,
58
- filters: search_documents_params.Filters | NotGiven = NOT_GIVEN,
59
- include_full_docs: bool | NotGiven = NOT_GIVEN,
60
- include_summary: bool | NotGiven = NOT_GIVEN,
61
- limit: int | NotGiven = NOT_GIVEN,
62
- only_matching_chunks: bool | NotGiven = NOT_GIVEN,
63
- rerank: bool | NotGiven = NOT_GIVEN,
64
- rewrite_query: bool | NotGiven = NOT_GIVEN,
53
+ categories_filter: List[Literal["technology", "science", "business", "health"]] | Omit = omit,
54
+ chunk_threshold: float | Omit = omit,
55
+ container_tags: SequenceNotStr[str] | Omit = omit,
56
+ doc_id: str | Omit = omit,
57
+ document_threshold: float | Omit = omit,
58
+ filters: search_documents_params.Filters | Omit = omit,
59
+ include_full_docs: bool | Omit = omit,
60
+ include_summary: bool | Omit = omit,
61
+ limit: int | Omit = omit,
62
+ only_matching_chunks: bool | Omit = omit,
63
+ rerank: bool | Omit = omit,
64
+ rewrite_query: bool | Omit = omit,
65
65
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
66
66
  # The extra values given here take precedence over values defined on the client or passed to this method.
67
67
  extra_headers: Headers | None = None,
68
68
  extra_query: Query | None = None,
69
69
  extra_body: Body | None = None,
70
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
70
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
71
71
  ) -> SearchDocumentsResponse:
72
72
  """
73
73
  Search memories with advanced filtering
@@ -91,7 +91,7 @@ class SearchResource(SyncAPIResource):
91
91
  most documents, more results), 1 is most sensitive (returns lesser documents,
92
92
  accurate results)
93
93
 
94
- filters: Optional filters to apply to the search
94
+ filters: Optional filters to apply to the search. Can be a JSON string or Query object.
95
95
 
96
96
  include_full_docs: If true, include full document in the response. This is helpful if you want a
97
97
  chatbot to know the full context of the document.
@@ -149,24 +149,24 @@ class SearchResource(SyncAPIResource):
149
149
  self,
150
150
  *,
151
151
  q: str,
152
- categories_filter: List[Literal["technology", "science", "business", "health"]] | NotGiven = NOT_GIVEN,
153
- chunk_threshold: float | NotGiven = NOT_GIVEN,
154
- container_tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
155
- doc_id: str | NotGiven = NOT_GIVEN,
156
- document_threshold: float | NotGiven = NOT_GIVEN,
157
- filters: search_execute_params.Filters | NotGiven = NOT_GIVEN,
158
- include_full_docs: bool | NotGiven = NOT_GIVEN,
159
- include_summary: bool | NotGiven = NOT_GIVEN,
160
- limit: int | NotGiven = NOT_GIVEN,
161
- only_matching_chunks: bool | NotGiven = NOT_GIVEN,
162
- rerank: bool | NotGiven = NOT_GIVEN,
163
- rewrite_query: bool | NotGiven = NOT_GIVEN,
152
+ categories_filter: List[Literal["technology", "science", "business", "health"]] | Omit = omit,
153
+ chunk_threshold: float | Omit = omit,
154
+ container_tags: SequenceNotStr[str] | Omit = omit,
155
+ doc_id: str | Omit = omit,
156
+ document_threshold: float | Omit = omit,
157
+ filters: search_execute_params.Filters | Omit = omit,
158
+ include_full_docs: bool | Omit = omit,
159
+ include_summary: bool | Omit = omit,
160
+ limit: int | Omit = omit,
161
+ only_matching_chunks: bool | Omit = omit,
162
+ rerank: bool | Omit = omit,
163
+ rewrite_query: bool | Omit = omit,
164
164
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
165
165
  # The extra values given here take precedence over values defined on the client or passed to this method.
166
166
  extra_headers: Headers | None = None,
167
167
  extra_query: Query | None = None,
168
168
  extra_body: Body | None = None,
169
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
169
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
170
170
  ) -> SearchExecuteResponse:
171
171
  """
172
172
  Search memories with advanced filtering
@@ -190,7 +190,7 @@ class SearchResource(SyncAPIResource):
190
190
  most documents, more results), 1 is most sensitive (returns lesser documents,
191
191
  accurate results)
192
192
 
193
- filters: Optional filters to apply to the search
193
+ filters: Optional filters to apply to the search. Can be a JSON string or Query object.
194
194
 
195
195
  include_full_docs: If true, include full document in the response. This is helpful if you want a
196
196
  chatbot to know the full context of the document.
@@ -248,19 +248,19 @@ class SearchResource(SyncAPIResource):
248
248
  self,
249
249
  *,
250
250
  q: str,
251
- container_tag: str | NotGiven = NOT_GIVEN,
252
- filters: search_memories_params.Filters | NotGiven = NOT_GIVEN,
253
- include: search_memories_params.Include | NotGiven = NOT_GIVEN,
254
- limit: int | NotGiven = NOT_GIVEN,
255
- rerank: bool | NotGiven = NOT_GIVEN,
256
- rewrite_query: bool | NotGiven = NOT_GIVEN,
257
- threshold: float | NotGiven = NOT_GIVEN,
251
+ container_tag: str | Omit = omit,
252
+ filters: search_memories_params.Filters | Omit = omit,
253
+ include: search_memories_params.Include | Omit = omit,
254
+ limit: int | Omit = omit,
255
+ rerank: bool | Omit = omit,
256
+ rewrite_query: bool | Omit = omit,
257
+ threshold: float | Omit = omit,
258
258
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
259
259
  # The extra values given here take precedence over values defined on the client or passed to this method.
260
260
  extra_headers: Headers | None = None,
261
261
  extra_query: Query | None = None,
262
262
  extra_body: Body | None = None,
263
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
263
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
264
264
  ) -> SearchMemoriesResponse:
265
265
  """
266
266
  Search memory entries - Low latency for conversational
@@ -271,7 +271,7 @@ class SearchResource(SyncAPIResource):
271
271
  container_tag: Optional tag this search should be containerized by. This can be an ID for your
272
272
  user, a project ID, or any other identifier you wish to use to filter memories.
273
273
 
274
- filters: Optional filters to apply to the search
274
+ filters: Optional filters to apply to the search. Can be a JSON string or Query object.
275
275
 
276
276
  limit: Maximum number of results to return
277
277
 
@@ -339,24 +339,24 @@ class AsyncSearchResource(AsyncAPIResource):
339
339
  self,
340
340
  *,
341
341
  q: str,
342
- categories_filter: List[Literal["technology", "science", "business", "health"]] | NotGiven = NOT_GIVEN,
343
- chunk_threshold: float | NotGiven = NOT_GIVEN,
344
- container_tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
345
- doc_id: str | NotGiven = NOT_GIVEN,
346
- document_threshold: float | NotGiven = NOT_GIVEN,
347
- filters: search_documents_params.Filters | NotGiven = NOT_GIVEN,
348
- include_full_docs: bool | NotGiven = NOT_GIVEN,
349
- include_summary: bool | NotGiven = NOT_GIVEN,
350
- limit: int | NotGiven = NOT_GIVEN,
351
- only_matching_chunks: bool | NotGiven = NOT_GIVEN,
352
- rerank: bool | NotGiven = NOT_GIVEN,
353
- rewrite_query: bool | NotGiven = NOT_GIVEN,
342
+ categories_filter: List[Literal["technology", "science", "business", "health"]] | Omit = omit,
343
+ chunk_threshold: float | Omit = omit,
344
+ container_tags: SequenceNotStr[str] | Omit = omit,
345
+ doc_id: str | Omit = omit,
346
+ document_threshold: float | Omit = omit,
347
+ filters: search_documents_params.Filters | Omit = omit,
348
+ include_full_docs: bool | Omit = omit,
349
+ include_summary: bool | Omit = omit,
350
+ limit: int | Omit = omit,
351
+ only_matching_chunks: bool | Omit = omit,
352
+ rerank: bool | Omit = omit,
353
+ rewrite_query: bool | Omit = omit,
354
354
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
355
355
  # The extra values given here take precedence over values defined on the client or passed to this method.
356
356
  extra_headers: Headers | None = None,
357
357
  extra_query: Query | None = None,
358
358
  extra_body: Body | None = None,
359
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
359
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
360
360
  ) -> SearchDocumentsResponse:
361
361
  """
362
362
  Search memories with advanced filtering
@@ -380,7 +380,7 @@ class AsyncSearchResource(AsyncAPIResource):
380
380
  most documents, more results), 1 is most sensitive (returns lesser documents,
381
381
  accurate results)
382
382
 
383
- filters: Optional filters to apply to the search
383
+ filters: Optional filters to apply to the search. Can be a JSON string or Query object.
384
384
 
385
385
  include_full_docs: If true, include full document in the response. This is helpful if you want a
386
386
  chatbot to know the full context of the document.
@@ -438,24 +438,24 @@ class AsyncSearchResource(AsyncAPIResource):
438
438
  self,
439
439
  *,
440
440
  q: str,
441
- categories_filter: List[Literal["technology", "science", "business", "health"]] | NotGiven = NOT_GIVEN,
442
- chunk_threshold: float | NotGiven = NOT_GIVEN,
443
- container_tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
444
- doc_id: str | NotGiven = NOT_GIVEN,
445
- document_threshold: float | NotGiven = NOT_GIVEN,
446
- filters: search_execute_params.Filters | NotGiven = NOT_GIVEN,
447
- include_full_docs: bool | NotGiven = NOT_GIVEN,
448
- include_summary: bool | NotGiven = NOT_GIVEN,
449
- limit: int | NotGiven = NOT_GIVEN,
450
- only_matching_chunks: bool | NotGiven = NOT_GIVEN,
451
- rerank: bool | NotGiven = NOT_GIVEN,
452
- rewrite_query: bool | NotGiven = NOT_GIVEN,
441
+ categories_filter: List[Literal["technology", "science", "business", "health"]] | Omit = omit,
442
+ chunk_threshold: float | Omit = omit,
443
+ container_tags: SequenceNotStr[str] | Omit = omit,
444
+ doc_id: str | Omit = omit,
445
+ document_threshold: float | Omit = omit,
446
+ filters: search_execute_params.Filters | Omit = omit,
447
+ include_full_docs: bool | Omit = omit,
448
+ include_summary: bool | Omit = omit,
449
+ limit: int | Omit = omit,
450
+ only_matching_chunks: bool | Omit = omit,
451
+ rerank: bool | Omit = omit,
452
+ rewrite_query: bool | Omit = omit,
453
453
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
454
454
  # The extra values given here take precedence over values defined on the client or passed to this method.
455
455
  extra_headers: Headers | None = None,
456
456
  extra_query: Query | None = None,
457
457
  extra_body: Body | None = None,
458
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
458
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
459
459
  ) -> SearchExecuteResponse:
460
460
  """
461
461
  Search memories with advanced filtering
@@ -479,7 +479,7 @@ class AsyncSearchResource(AsyncAPIResource):
479
479
  most documents, more results), 1 is most sensitive (returns lesser documents,
480
480
  accurate results)
481
481
 
482
- filters: Optional filters to apply to the search
482
+ filters: Optional filters to apply to the search. Can be a JSON string or Query object.
483
483
 
484
484
  include_full_docs: If true, include full document in the response. This is helpful if you want a
485
485
  chatbot to know the full context of the document.
@@ -537,19 +537,19 @@ class AsyncSearchResource(AsyncAPIResource):
537
537
  self,
538
538
  *,
539
539
  q: str,
540
- container_tag: str | NotGiven = NOT_GIVEN,
541
- filters: search_memories_params.Filters | NotGiven = NOT_GIVEN,
542
- include: search_memories_params.Include | NotGiven = NOT_GIVEN,
543
- limit: int | NotGiven = NOT_GIVEN,
544
- rerank: bool | NotGiven = NOT_GIVEN,
545
- rewrite_query: bool | NotGiven = NOT_GIVEN,
546
- threshold: float | NotGiven = NOT_GIVEN,
540
+ container_tag: str | Omit = omit,
541
+ filters: search_memories_params.Filters | Omit = omit,
542
+ include: search_memories_params.Include | Omit = omit,
543
+ limit: int | Omit = omit,
544
+ rerank: bool | Omit = omit,
545
+ rewrite_query: bool | Omit = omit,
546
+ threshold: float | Omit = omit,
547
547
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
548
548
  # The extra values given here take precedence over values defined on the client or passed to this method.
549
549
  extra_headers: Headers | None = None,
550
550
  extra_query: Query | None = None,
551
551
  extra_body: Body | None = None,
552
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
552
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
553
553
  ) -> SearchMemoriesResponse:
554
554
  """
555
555
  Search memory entries - Low latency for conversational
@@ -560,7 +560,7 @@ class AsyncSearchResource(AsyncAPIResource):
560
560
  container_tag: Optional tag this search should be containerized by. This can be an ID for your
561
561
  user, a project ID, or any other identifier you wish to use to filter memories.
562
562
 
563
- filters: Optional filters to apply to the search
563
+ filters: Optional filters to apply to the search. Can be a JSON string or Query object.
564
564
 
565
565
  limit: Maximum number of results to return
566
566
 
@@ -7,7 +7,7 @@ from typing import Dict, Union, Iterable, Optional
7
7
  import httpx
8
8
 
9
9
  from ..types import setting_update_params
10
- from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
10
+ from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
11
11
  from .._utils import maybe_transform, async_maybe_transform
12
12
  from .._compat import cached_property
13
13
  from .._resource import SyncAPIResource, AsyncAPIResource
@@ -47,25 +47,25 @@ class SettingsResource(SyncAPIResource):
47
47
  def update(
48
48
  self,
49
49
  *,
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
- google_drive_client_id: Optional[str] | NotGiven = NOT_GIVEN,
53
- google_drive_client_secret: Optional[str] | NotGiven = NOT_GIVEN,
54
- google_drive_custom_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
55
- include_items: Union[str, float, bool, Dict[str, object], Iterable[object], None] | NotGiven = NOT_GIVEN,
56
- notion_client_id: Optional[str] | NotGiven = NOT_GIVEN,
57
- notion_client_secret: Optional[str] | NotGiven = NOT_GIVEN,
58
- notion_custom_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
59
- onedrive_client_id: Optional[str] | NotGiven = NOT_GIVEN,
60
- onedrive_client_secret: Optional[str] | NotGiven = NOT_GIVEN,
61
- onedrive_custom_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
62
- should_llm_filter: Optional[bool] | NotGiven = NOT_GIVEN,
50
+ exclude_items: Union[str, float, bool, Dict[str, object], Iterable[object], None] | Omit = omit,
51
+ filter_prompt: Optional[str] | Omit = omit,
52
+ google_drive_client_id: Optional[str] | Omit = omit,
53
+ google_drive_client_secret: Optional[str] | Omit = omit,
54
+ google_drive_custom_key_enabled: Optional[bool] | Omit = omit,
55
+ include_items: Union[str, float, bool, Dict[str, object], Iterable[object], None] | Omit = omit,
56
+ notion_client_id: Optional[str] | Omit = omit,
57
+ notion_client_secret: Optional[str] | Omit = omit,
58
+ notion_custom_key_enabled: Optional[bool] | Omit = omit,
59
+ onedrive_client_id: Optional[str] | Omit = omit,
60
+ onedrive_client_secret: Optional[str] | Omit = omit,
61
+ onedrive_custom_key_enabled: Optional[bool] | Omit = omit,
62
+ should_llm_filter: Optional[bool] | Omit = omit,
63
63
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
64
64
  # The extra values given here take precedence over values defined on the client or passed to this method.
65
65
  extra_headers: Headers | None = None,
66
66
  extra_query: Query | None = None,
67
67
  extra_body: Body | None = None,
68
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
68
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
69
69
  ) -> SettingUpdateResponse:
70
70
  """
71
71
  Update settings for an organization
@@ -113,7 +113,7 @@ class SettingsResource(SyncAPIResource):
113
113
  extra_headers: Headers | None = None,
114
114
  extra_query: Query | None = None,
115
115
  extra_body: Body | None = None,
116
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
116
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
117
117
  ) -> SettingGetResponse:
118
118
  """Get settings for an organization"""
119
119
  return self._get(
@@ -148,25 +148,25 @@ class AsyncSettingsResource(AsyncAPIResource):
148
148
  async def update(
149
149
  self,
150
150
  *,
151
- exclude_items: Union[str, float, bool, Dict[str, object], Iterable[object], None] | NotGiven = NOT_GIVEN,
152
- filter_prompt: Optional[str] | NotGiven = NOT_GIVEN,
153
- google_drive_client_id: Optional[str] | NotGiven = NOT_GIVEN,
154
- google_drive_client_secret: Optional[str] | NotGiven = NOT_GIVEN,
155
- google_drive_custom_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
156
- include_items: Union[str, float, bool, Dict[str, object], Iterable[object], None] | NotGiven = NOT_GIVEN,
157
- notion_client_id: Optional[str] | NotGiven = NOT_GIVEN,
158
- notion_client_secret: Optional[str] | NotGiven = NOT_GIVEN,
159
- notion_custom_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
160
- onedrive_client_id: Optional[str] | NotGiven = NOT_GIVEN,
161
- onedrive_client_secret: Optional[str] | NotGiven = NOT_GIVEN,
162
- onedrive_custom_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
163
- should_llm_filter: Optional[bool] | NotGiven = NOT_GIVEN,
151
+ exclude_items: Union[str, float, bool, Dict[str, object], Iterable[object], None] | Omit = omit,
152
+ filter_prompt: Optional[str] | Omit = omit,
153
+ google_drive_client_id: Optional[str] | Omit = omit,
154
+ google_drive_client_secret: Optional[str] | Omit = omit,
155
+ google_drive_custom_key_enabled: Optional[bool] | Omit = omit,
156
+ include_items: Union[str, float, bool, Dict[str, object], Iterable[object], None] | Omit = omit,
157
+ notion_client_id: Optional[str] | Omit = omit,
158
+ notion_client_secret: Optional[str] | Omit = omit,
159
+ notion_custom_key_enabled: Optional[bool] | Omit = omit,
160
+ onedrive_client_id: Optional[str] | Omit = omit,
161
+ onedrive_client_secret: Optional[str] | Omit = omit,
162
+ onedrive_custom_key_enabled: Optional[bool] | Omit = omit,
163
+ should_llm_filter: Optional[bool] | Omit = omit,
164
164
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
165
165
  # The extra values given here take precedence over values defined on the client or passed to this method.
166
166
  extra_headers: Headers | None = None,
167
167
  extra_query: Query | None = None,
168
168
  extra_body: Body | None = None,
169
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
169
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
170
170
  ) -> SettingUpdateResponse:
171
171
  """
172
172
  Update settings for an organization
@@ -214,7 +214,7 @@ class AsyncSettingsResource(AsyncAPIResource):
214
214
  extra_headers: Headers | None = None,
215
215
  extra_query: Query | None = None,
216
216
  extra_body: Body | None = None,
217
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
217
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
218
218
  ) -> SettingGetResponse:
219
219
  """Get settings for an organization"""
220
220
  return await self._get(
@@ -2,10 +2,23 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from .memory_add_params import MemoryAddParams as MemoryAddParams
6
+ from .memory_list_params import MemoryListParams as MemoryListParams
7
+ from .document_add_params import DocumentAddParams as DocumentAddParams
8
+ from .memory_add_response import MemoryAddResponse as MemoryAddResponse
9
+ from .memory_get_response import MemoryGetResponse as MemoryGetResponse
10
+ from .document_list_params import DocumentListParams as DocumentListParams
11
+ from .memory_list_response import MemoryListResponse as MemoryListResponse
12
+ from .memory_update_params import MemoryUpdateParams as MemoryUpdateParams
5
13
  from .setting_get_response import SettingGetResponse as SettingGetResponse
14
+ from .document_add_response import DocumentAddResponse as DocumentAddResponse
15
+ from .document_get_response import DocumentGetResponse as DocumentGetResponse
6
16
  from .search_execute_params import SearchExecuteParams as SearchExecuteParams
7
17
  from .setting_update_params import SettingUpdateParams as SettingUpdateParams
8
18
  from .connection_list_params import ConnectionListParams as ConnectionListParams
19
+ from .document_list_response import DocumentListResponse as DocumentListResponse
20
+ from .document_update_params import DocumentUpdateParams as DocumentUpdateParams
21
+ from .memory_update_response import MemoryUpdateResponse as MemoryUpdateResponse
9
22
  from .search_memories_params import SearchMemoriesParams as SearchMemoriesParams
10
23
  from .search_documents_params import SearchDocumentsParams as SearchDocumentsParams
11
24
  from .search_execute_response import SearchExecuteResponse as SearchExecuteResponse
@@ -13,12 +26,17 @@ from .setting_update_response import SettingUpdateResponse as SettingUpdateRespo
13
26
  from .connection_create_params import ConnectionCreateParams as ConnectionCreateParams
14
27
  from .connection_import_params import ConnectionImportParams as ConnectionImportParams
15
28
  from .connection_list_response import ConnectionListResponse as ConnectionListResponse
29
+ from .document_update_response import DocumentUpdateResponse as DocumentUpdateResponse
16
30
  from .search_memories_response import SearchMemoriesResponse as SearchMemoriesResponse
31
+ from .memory_upload_file_params import MemoryUploadFileParams as MemoryUploadFileParams
17
32
  from .search_documents_response import SearchDocumentsResponse as SearchDocumentsResponse
18
33
  from .connection_create_response import ConnectionCreateResponse as ConnectionCreateResponse
19
34
  from .connection_import_response import ConnectionImportResponse as ConnectionImportResponse
35
+ from .document_upload_file_params import DocumentUploadFileParams as DocumentUploadFileParams
36
+ from .memory_upload_file_response import MemoryUploadFileResponse as MemoryUploadFileResponse
20
37
  from .connection_get_by_id_response import ConnectionGetByIDResponse as ConnectionGetByIDResponse
21
38
  from .connection_get_by_tags_params import ConnectionGetByTagsParams as ConnectionGetByTagsParams
39
+ from .document_upload_file_response import DocumentUploadFileResponse as DocumentUploadFileResponse
22
40
  from .connection_get_by_tags_response import ConnectionGetByTagsResponse as ConnectionGetByTagsResponse
23
41
  from .connection_delete_by_id_response import ConnectionDeleteByIDResponse as ConnectionDeleteByIDResponse
24
42
  from .connection_list_documents_params import ConnectionListDocumentsParams as ConnectionListDocumentsParams
@@ -0,0 +1,69 @@
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
6
+ from typing_extensions import Required, Annotated, TypedDict
7
+
8
+ from .._types import SequenceNotStr
9
+ from .._utils import PropertyInfo
10
+
11
+ __all__ = ["DocumentAddParams"]
12
+
13
+
14
+ class DocumentAddParams(TypedDict, total=False):
15
+ content: Required[str]
16
+ """The content to extract and process into a document.
17
+
18
+ This can be a URL to a website, a PDF, an image, or a video.
19
+
20
+ Plaintext: Any plaintext format
21
+
22
+ URL: A URL to a website, PDF, image, or video
23
+
24
+ We automatically detect the content type from the url's response format.
25
+ """
26
+
27
+ container_tag: Annotated[str, PropertyInfo(alias="containerTag")]
28
+ """Optional tag this document should be containerized by.
29
+
30
+ This can be an ID for your user, a project ID, or any other identifier you wish
31
+ to use to group documents.
32
+ """
33
+
34
+ container_tags: Annotated[SequenceNotStr[str], PropertyInfo(alias="containerTags")]
35
+ """
36
+ (DEPRECATED: Use containerTag instead) Optional tags this document should be
37
+ containerized by. This can be an ID for your user, a project ID, or any other
38
+ identifier you wish to use to group documents.
39
+ """
40
+
41
+ custom_id: Annotated[str, PropertyInfo(alias="customId")]
42
+ """Optional custom ID of the document.
43
+
44
+ This could be an ID from your database that will uniquely identify this
45
+ document.
46
+ """
47
+
48
+ file_type: Annotated[str, PropertyInfo(alias="fileType")]
49
+ """Optional file type override to force specific processing behavior.
50
+
51
+ Valid values: text, pdf, tweet, google_doc, google_slide, google_sheet, image,
52
+ video, notion_doc, webpage, onedrive
53
+ """
54
+
55
+ metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]]
56
+ """Optional metadata for the document.
57
+
58
+ This is used to store additional information about the document. You can use
59
+ this to store any additional information you need about the document. Metadata
60
+ can be filtered through. Keys must be strings and are case sensitive. Values can
61
+ be strings, numbers, or booleans. You cannot nest objects.
62
+ """
63
+
64
+ mime_type: Annotated[str, PropertyInfo(alias="mimeType")]
65
+ """Required when fileType is 'image' or 'video'.
66
+
67
+ Specifies the exact MIME type to use (e.g., 'image/png', 'image/jpeg',
68
+ 'video/mp4', 'video/webm')
69
+ """
@@ -0,0 +1,11 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .._models import BaseModel
4
+
5
+ __all__ = ["DocumentAddResponse"]
6
+
7
+
8
+ class DocumentAddResponse(BaseModel):
9
+ id: str
10
+
11
+ status: str
@@ -0,0 +1,104 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Dict, List, Union, Optional
4
+ from datetime import datetime
5
+ from typing_extensions import Literal
6
+
7
+ from pydantic import Field as FieldInfo
8
+
9
+ from .._models import BaseModel
10
+
11
+ __all__ = ["DocumentGetResponse"]
12
+
13
+
14
+ class DocumentGetResponse(BaseModel):
15
+ id: str
16
+ """Unique identifier of the document."""
17
+
18
+ connection_id: Optional[str] = FieldInfo(alias="connectionId", default=None)
19
+ """Optional ID of connection the document was created from.
20
+
21
+ This is useful for identifying the source of the document.
22
+ """
23
+
24
+ content: Optional[str] = None
25
+ """The content to extract and process into a document.
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"""
38
+
39
+ custom_id: Optional[str] = FieldInfo(alias="customId", default=None)
40
+ """Optional custom ID of the document.
41
+
42
+ This could be an ID from your database that will uniquely identify this
43
+ document.
44
+ """
45
+
46
+ metadata: Union[str, float, bool, Dict[str, object], List[object], None] = None
47
+ """Optional metadata for the document.
48
+
49
+ This is used to store additional information about the document. You can use
50
+ this to store any additional information you need about the document. Metadata
51
+ can be filtered through. Keys must be strings and are case sensitive. Values can
52
+ be strings, numbers, or booleans. You cannot nest objects.
53
+ """
54
+
55
+ og_image: Optional[str] = FieldInfo(alias="ogImage", default=None)
56
+
57
+ source: Optional[str] = None
58
+ """Source of the document"""
59
+
60
+ status: Literal["unknown", "queued", "extracting", "chunking", "embedding", "indexing", "done", "failed"]
61
+ """Status of the document"""
62
+
63
+ summary: Optional[str] = None
64
+ """Summary of the document content"""
65
+
66
+ summary_embedding_model: Optional[str] = FieldInfo(alias="summaryEmbeddingModel", default=None)
67
+
68
+ summary_embedding_model_new: Optional[str] = FieldInfo(alias="summaryEmbeddingModelNew", default=None)
69
+
70
+ summary_embedding_new: Optional[List[float]] = FieldInfo(alias="summaryEmbeddingNew", default=None)
71
+
72
+ title: Optional[str] = None
73
+ """Title of the document"""
74
+
75
+ type: Literal[
76
+ "text",
77
+ "pdf",
78
+ "tweet",
79
+ "google_doc",
80
+ "google_slide",
81
+ "google_sheet",
82
+ "image",
83
+ "video",
84
+ "notion_doc",
85
+ "webpage",
86
+ "onedrive",
87
+ ]
88
+ """Type of the document"""
89
+
90
+ updated_at: datetime = FieldInfo(alias="updatedAt")
91
+ """Last update timestamp"""
92
+
93
+ container_tags: Optional[List[str]] = FieldInfo(alias="containerTags", default=None)
94
+ """Optional tags this document should be containerized by.
95
+
96
+ This can be an ID for your user, a project ID, or any other identifier you wish
97
+ to use to group documents.
98
+ """
99
+
100
+ raw: None = None
101
+ """Raw content of the document"""
102
+
103
+ url: Optional[str] = None
104
+ """URL of the document"""