supermemory 3.0.0a29__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 (51) hide show
  1. supermemory/__init__.py +3 -1
  2. supermemory/_base_client.py +12 -12
  3. supermemory/_client.py +17 -9
  4. supermemory/_compat.py +48 -48
  5. supermemory/_models.py +50 -44
  6. supermemory/_qs.py +7 -7
  7. supermemory/_types.py +53 -12
  8. supermemory/_utils/__init__.py +9 -2
  9. supermemory/_utils/_compat.py +45 -0
  10. supermemory/_utils/_datetime_parse.py +136 -0
  11. supermemory/_utils/_transform.py +13 -3
  12. supermemory/_utils/_typing.py +6 -1
  13. supermemory/_utils/_utils.py +4 -5
  14. supermemory/_version.py +1 -1
  15. supermemory/resources/__init__.py +14 -0
  16. supermemory/resources/connections.py +36 -36
  17. supermemory/resources/documents.py +894 -0
  18. supermemory/resources/memories.py +222 -134
  19. supermemory/resources/search.py +79 -79
  20. supermemory/resources/settings.py +31 -31
  21. supermemory/types/__init__.py +9 -0
  22. supermemory/types/connection_create_params.py +3 -2
  23. supermemory/types/connection_delete_by_provider_params.py +2 -2
  24. supermemory/types/connection_get_by_tags_params.py +2 -2
  25. supermemory/types/connection_import_params.py +2 -2
  26. supermemory/types/connection_list_documents_params.py +2 -2
  27. supermemory/types/connection_list_params.py +2 -2
  28. supermemory/types/document_add_params.py +69 -0
  29. supermemory/types/document_add_response.py +11 -0
  30. supermemory/types/document_get_response.py +104 -0
  31. supermemory/types/document_list_params.py +111 -0
  32. supermemory/types/document_list_response.py +95 -0
  33. supermemory/types/document_update_params.py +69 -0
  34. supermemory/types/document_update_response.py +11 -0
  35. supermemory/types/document_upload_file_params.py +36 -0
  36. supermemory/types/document_upload_file_response.py +11 -0
  37. supermemory/types/memory_add_params.py +39 -23
  38. supermemory/types/memory_get_response.py +21 -20
  39. supermemory/types/memory_list_params.py +79 -8
  40. supermemory/types/memory_list_response.py +18 -17
  41. supermemory/types/memory_update_params.py +31 -15
  42. supermemory/types/memory_upload_file_params.py +20 -0
  43. supermemory/types/search_documents_params.py +71 -9
  44. supermemory/types/search_execute_params.py +71 -9
  45. supermemory/types/search_memories_params.py +77 -8
  46. supermemory/types/search_memories_response.py +10 -7
  47. {supermemory-3.0.0a29.dist-info → supermemory-3.1.0.dist-info}/METADATA +18 -8
  48. supermemory-3.1.0.dist-info/RECORD +80 -0
  49. supermemory-3.0.0a29.dist-info/RECORD +0 -68
  50. {supermemory-3.0.0a29.dist-info → supermemory-3.1.0.dist-info}/WHEEL +0 -0
  51. {supermemory-3.0.0a29.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
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: List[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
@@ -82,7 +82,7 @@ class SearchResource(SyncAPIResource):
82
82
  results)
83
83
 
84
84
  container_tags: Optional tags this search should be containerized by. This can be an ID for your
85
- user, a project ID, or any other identifier you wish to use to filter memories.
85
+ user, a project ID, or any other identifier you wish to use to filter documents.
86
86
 
87
87
  doc_id: Optional document ID to search within. You can use this to find chunks in a very
88
88
  large document.
@@ -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: List[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
@@ -181,7 +181,7 @@ class SearchResource(SyncAPIResource):
181
181
  results)
182
182
 
183
183
  container_tags: Optional tags this search should be containerized by. This can be an ID for your
184
- user, a project ID, or any other identifier you wish to use to filter memories.
184
+ user, a project ID, or any other identifier you wish to use to filter documents.
185
185
 
186
186
  doc_id: Optional document ID to search within. You can use this to find chunks in a very
187
187
  large document.
@@ -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: List[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
@@ -371,7 +371,7 @@ class AsyncSearchResource(AsyncAPIResource):
371
371
  results)
372
372
 
373
373
  container_tags: Optional tags this search should be containerized by. This can be an ID for your
374
- user, a project ID, or any other identifier you wish to use to filter memories.
374
+ user, a project ID, or any other identifier you wish to use to filter documents.
375
375
 
376
376
  doc_id: Optional document ID to search within. You can use this to find chunks in a very
377
377
  large document.
@@ -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: List[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
@@ -470,7 +470,7 @@ class AsyncSearchResource(AsyncAPIResource):
470
470
  results)
471
471
 
472
472
  container_tags: Optional tags this search should be containerized by. This can be an ID for your
473
- user, a project ID, or any other identifier you wish to use to filter memories.
473
+ user, a project ID, or any other identifier you wish to use to filter documents.
474
474
 
475
475
  doc_id: Optional document ID to search within. You can use this to find chunks in a very
476
476
  large document.
@@ -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(
@@ -4,14 +4,20 @@ from __future__ import annotations
4
4
 
5
5
  from .memory_add_params import MemoryAddParams as MemoryAddParams
6
6
  from .memory_list_params import MemoryListParams as MemoryListParams
7
+ from .document_add_params import DocumentAddParams as DocumentAddParams
7
8
  from .memory_add_response import MemoryAddResponse as MemoryAddResponse
8
9
  from .memory_get_response import MemoryGetResponse as MemoryGetResponse
10
+ from .document_list_params import DocumentListParams as DocumentListParams
9
11
  from .memory_list_response import MemoryListResponse as MemoryListResponse
10
12
  from .memory_update_params import MemoryUpdateParams as MemoryUpdateParams
11
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
12
16
  from .search_execute_params import SearchExecuteParams as SearchExecuteParams
13
17
  from .setting_update_params import SettingUpdateParams as SettingUpdateParams
14
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
15
21
  from .memory_update_response import MemoryUpdateResponse as MemoryUpdateResponse
16
22
  from .search_memories_params import SearchMemoriesParams as SearchMemoriesParams
17
23
  from .search_documents_params import SearchDocumentsParams as SearchDocumentsParams
@@ -20,14 +26,17 @@ from .setting_update_response import SettingUpdateResponse as SettingUpdateRespo
20
26
  from .connection_create_params import ConnectionCreateParams as ConnectionCreateParams
21
27
  from .connection_import_params import ConnectionImportParams as ConnectionImportParams
22
28
  from .connection_list_response import ConnectionListResponse as ConnectionListResponse
29
+ from .document_update_response import DocumentUpdateResponse as DocumentUpdateResponse
23
30
  from .search_memories_response import SearchMemoriesResponse as SearchMemoriesResponse
24
31
  from .memory_upload_file_params import MemoryUploadFileParams as MemoryUploadFileParams
25
32
  from .search_documents_response import SearchDocumentsResponse as SearchDocumentsResponse
26
33
  from .connection_create_response import ConnectionCreateResponse as ConnectionCreateResponse
27
34
  from .connection_import_response import ConnectionImportResponse as ConnectionImportResponse
35
+ from .document_upload_file_params import DocumentUploadFileParams as DocumentUploadFileParams
28
36
  from .memory_upload_file_response import MemoryUploadFileResponse as MemoryUploadFileResponse
29
37
  from .connection_get_by_id_response import ConnectionGetByIDResponse as ConnectionGetByIDResponse
30
38
  from .connection_get_by_tags_params import ConnectionGetByTagsParams as ConnectionGetByTagsParams
39
+ from .document_upload_file_response import DocumentUploadFileResponse as DocumentUploadFileResponse
31
40
  from .connection_get_by_tags_response import ConnectionGetByTagsResponse as ConnectionGetByTagsResponse
32
41
  from .connection_delete_by_id_response import ConnectionDeleteByIDResponse as ConnectionDeleteByIDResponse
33
42
  from .connection_list_documents_params import ConnectionListDocumentsParams as ConnectionListDocumentsParams
@@ -2,16 +2,17 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Dict, List, Union, Optional
5
+ from typing import Dict, Union, Optional
6
6
  from typing_extensions import Annotated, TypedDict
7
7
 
8
+ from .._types import SequenceNotStr
8
9
  from .._utils import PropertyInfo
9
10
 
10
11
  __all__ = ["ConnectionCreateParams"]
11
12
 
12
13
 
13
14
  class ConnectionCreateParams(TypedDict, total=False):
14
- container_tags: Annotated[List[str], PropertyInfo(alias="containerTags")]
15
+ container_tags: Annotated[SequenceNotStr[str], PropertyInfo(alias="containerTags")]
15
16
 
16
17
  document_limit: Annotated[int, PropertyInfo(alias="documentLimit")]
17
18
 
@@ -2,14 +2,14 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import List
6
5
  from typing_extensions import Required, Annotated, TypedDict
7
6
 
7
+ from .._types import SequenceNotStr
8
8
  from .._utils import PropertyInfo
9
9
 
10
10
  __all__ = ["ConnectionDeleteByProviderParams"]
11
11
 
12
12
 
13
13
  class ConnectionDeleteByProviderParams(TypedDict, total=False):
14
- container_tags: Required[Annotated[List[str], PropertyInfo(alias="containerTags")]]
14
+ container_tags: Required[Annotated[SequenceNotStr[str], PropertyInfo(alias="containerTags")]]
15
15
  """Optional comma-separated list of container tags to filter connections by"""
@@ -2,14 +2,14 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import List
6
5
  from typing_extensions import Required, Annotated, TypedDict
7
6
 
7
+ from .._types import SequenceNotStr
8
8
  from .._utils import PropertyInfo
9
9
 
10
10
  __all__ = ["ConnectionGetByTagsParams"]
11
11
 
12
12
 
13
13
  class ConnectionGetByTagsParams(TypedDict, total=False):
14
- container_tags: Required[Annotated[List[str], PropertyInfo(alias="containerTags")]]
14
+ container_tags: Required[Annotated[SequenceNotStr[str], PropertyInfo(alias="containerTags")]]
15
15
  """Comma-separated list of container tags to filter connection by"""
@@ -2,14 +2,14 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import List
6
5
  from typing_extensions import Annotated, TypedDict
7
6
 
7
+ from .._types import SequenceNotStr
8
8
  from .._utils import PropertyInfo
9
9
 
10
10
  __all__ = ["ConnectionImportParams"]
11
11
 
12
12
 
13
13
  class ConnectionImportParams(TypedDict, total=False):
14
- container_tags: Annotated[List[str], PropertyInfo(alias="containerTags")]
14
+ container_tags: Annotated[SequenceNotStr[str], PropertyInfo(alias="containerTags")]
15
15
  """Optional comma-separated list of container tags to filter connections by"""
@@ -2,14 +2,14 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import List
6
5
  from typing_extensions import Annotated, TypedDict
7
6
 
7
+ from .._types import SequenceNotStr
8
8
  from .._utils import PropertyInfo
9
9
 
10
10
  __all__ = ["ConnectionListDocumentsParams"]
11
11
 
12
12
 
13
13
  class ConnectionListDocumentsParams(TypedDict, total=False):
14
- container_tags: Annotated[List[str], PropertyInfo(alias="containerTags")]
14
+ container_tags: Annotated[SequenceNotStr[str], PropertyInfo(alias="containerTags")]
15
15
  """Optional comma-separated list of container tags to filter documents by"""
@@ -2,14 +2,14 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import List
6
5
  from typing_extensions import Annotated, TypedDict
7
6
 
7
+ from .._types import SequenceNotStr
8
8
  from .._utils import PropertyInfo
9
9
 
10
10
  __all__ = ["ConnectionListParams"]
11
11
 
12
12
 
13
13
  class ConnectionListParams(TypedDict, total=False):
14
- container_tags: Annotated[List[str], PropertyInfo(alias="containerTags")]
14
+ container_tags: Annotated[SequenceNotStr[str], PropertyInfo(alias="containerTags")]
15
15
  """Optional comma-separated list of container tags to filter documents by"""
@@ -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