supermemory 3.2.0__py3-none-any.whl → 3.4.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.
- supermemory/_version.py +1 -1
- supermemory/resources/documents.py +18 -52
- supermemory/resources/memories.py +18 -52
- supermemory/types/__init__.py +1 -0
- supermemory/types/connection_get_by_id_response.py +2 -3
- supermemory/types/connection_get_by_tags_response.py +2 -3
- supermemory/types/connection_list_response.py +2 -3
- supermemory/types/document_add_params.py +0 -14
- supermemory/types/document_get_response.py +5 -6
- supermemory/types/document_list_params.py +6 -71
- supermemory/types/document_list_response.py +4 -5
- supermemory/types/document_update_params.py +0 -14
- supermemory/types/document_upload_file_params.py +11 -3
- supermemory/types/memory_add_params.py +0 -14
- supermemory/types/memory_get_response.py +5 -6
- supermemory/types/memory_list_params.py +6 -71
- supermemory/types/memory_list_response.py +4 -5
- supermemory/types/memory_update_params.py +0 -14
- supermemory/types/memory_upload_file_params.py +11 -3
- supermemory/types/search_documents_params.py +5 -70
- supermemory/types/search_documents_response.py +2 -3
- supermemory/types/search_execute_params.py +5 -70
- supermemory/types/search_execute_response.py +2 -3
- supermemory/types/search_memories_params.py +6 -72
- supermemory/types/search_memories_response.py +5 -6
- supermemory/types/shared/__init__.py +4 -0
- supermemory/types/shared/and_.py +13 -0
- supermemory/types/shared/or_.py +13 -0
- supermemory/types/shared_params/__init__.py +4 -0
- supermemory/types/shared_params/and_.py +14 -0
- supermemory/types/shared_params/or_.py +14 -0
- {supermemory-3.2.0.dist-info → supermemory-3.4.0.dist-info}/METADATA +1 -1
- {supermemory-3.2.0.dist-info → supermemory-3.4.0.dist-info}/RECORD +35 -29
- {supermemory-3.2.0.dist-info → supermemory-3.4.0.dist-info}/WHEEL +0 -0
- {supermemory-3.2.0.dist-info → supermemory-3.4.0.dist-info}/licenses/LICENSE +0 -0
supermemory/_version.py
CHANGED
|
@@ -56,9 +56,7 @@ class DocumentsResource(SyncAPIResource):
|
|
|
56
56
|
container_tags: SequenceNotStr[str] | Omit = omit,
|
|
57
57
|
content: str | Omit = omit,
|
|
58
58
|
custom_id: str | Omit = omit,
|
|
59
|
-
file_type: str | Omit = omit,
|
|
60
59
|
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
|
|
61
|
-
mime_type: str | Omit = omit,
|
|
62
60
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
63
61
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
64
62
|
extra_headers: Headers | None = None,
|
|
@@ -90,20 +88,12 @@ class DocumentsResource(SyncAPIResource):
|
|
|
90
88
|
custom_id: Optional custom ID of the document. This could be an ID from your database that
|
|
91
89
|
will uniquely identify this document.
|
|
92
90
|
|
|
93
|
-
file_type:
|
|
94
|
-
Optional file type override to force specific processing behavior. Valid values:
|
|
95
|
-
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
|
|
96
|
-
notion_doc, webpage, onedrive
|
|
97
|
-
|
|
98
91
|
metadata: Optional metadata for the document. This is used to store additional information
|
|
99
92
|
about the document. You can use this to store any additional information you
|
|
100
93
|
need about the document. Metadata can be filtered through. Keys must be strings
|
|
101
94
|
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
|
|
102
95
|
nest objects.
|
|
103
96
|
|
|
104
|
-
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
|
|
105
|
-
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
|
|
106
|
-
|
|
107
97
|
extra_headers: Send extra headers
|
|
108
98
|
|
|
109
99
|
extra_query: Add additional query parameters to the request
|
|
@@ -122,9 +112,7 @@ class DocumentsResource(SyncAPIResource):
|
|
|
122
112
|
"container_tags": container_tags,
|
|
123
113
|
"content": content,
|
|
124
114
|
"custom_id": custom_id,
|
|
125
|
-
"file_type": file_type,
|
|
126
115
|
"metadata": metadata,
|
|
127
|
-
"mime_type": mime_type,
|
|
128
116
|
},
|
|
129
117
|
document_update_params.DocumentUpdateParams,
|
|
130
118
|
),
|
|
@@ -241,9 +229,7 @@ class DocumentsResource(SyncAPIResource):
|
|
|
241
229
|
container_tag: str | Omit = omit,
|
|
242
230
|
container_tags: SequenceNotStr[str] | Omit = omit,
|
|
243
231
|
custom_id: str | Omit = omit,
|
|
244
|
-
file_type: str | Omit = omit,
|
|
245
232
|
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
|
|
246
|
-
mime_type: str | Omit = omit,
|
|
247
233
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
248
234
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
249
235
|
extra_headers: Headers | None = None,
|
|
@@ -275,20 +261,12 @@ class DocumentsResource(SyncAPIResource):
|
|
|
275
261
|
custom_id: Optional custom ID of the document. This could be an ID from your database that
|
|
276
262
|
will uniquely identify this document.
|
|
277
263
|
|
|
278
|
-
file_type:
|
|
279
|
-
Optional file type override to force specific processing behavior. Valid values:
|
|
280
|
-
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
|
|
281
|
-
notion_doc, webpage, onedrive
|
|
282
|
-
|
|
283
264
|
metadata: Optional metadata for the document. This is used to store additional information
|
|
284
265
|
about the document. You can use this to store any additional information you
|
|
285
266
|
need about the document. Metadata can be filtered through. Keys must be strings
|
|
286
267
|
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
|
|
287
268
|
nest objects.
|
|
288
269
|
|
|
289
|
-
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
|
|
290
|
-
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
|
|
291
|
-
|
|
292
270
|
extra_headers: Send extra headers
|
|
293
271
|
|
|
294
272
|
extra_query: Add additional query parameters to the request
|
|
@@ -305,9 +283,7 @@ class DocumentsResource(SyncAPIResource):
|
|
|
305
283
|
"container_tag": container_tag,
|
|
306
284
|
"container_tags": container_tags,
|
|
307
285
|
"custom_id": custom_id,
|
|
308
|
-
"file_type": file_type,
|
|
309
286
|
"metadata": metadata,
|
|
310
|
-
"mime_type": mime_type,
|
|
311
287
|
},
|
|
312
288
|
document_add_params.DocumentAddParams,
|
|
313
289
|
),
|
|
@@ -356,6 +332,7 @@ class DocumentsResource(SyncAPIResource):
|
|
|
356
332
|
file: FileTypes,
|
|
357
333
|
container_tags: str | Omit = omit,
|
|
358
334
|
file_type: str | Omit = omit,
|
|
335
|
+
metadata: str | Omit = omit,
|
|
359
336
|
mime_type: str | Omit = omit,
|
|
360
337
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
361
338
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -370,14 +347,19 @@ class DocumentsResource(SyncAPIResource):
|
|
|
370
347
|
Args:
|
|
371
348
|
file: File to upload and process
|
|
372
349
|
|
|
373
|
-
container_tags: Optional
|
|
374
|
-
|
|
350
|
+
container_tags: Optional container tags. Can be either a JSON string of an array (e.g.,
|
|
351
|
+
'["user_123", "project_123"]') or a single string (e.g., 'user_123'). Single
|
|
352
|
+
strings will be automatically converted to an array.
|
|
375
353
|
|
|
376
354
|
file_type:
|
|
377
355
|
Optional file type override to force specific processing behavior. Valid values:
|
|
378
356
|
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
|
|
379
357
|
notion_doc, webpage, onedrive
|
|
380
358
|
|
|
359
|
+
metadata: Optional metadata for the document as a JSON string. This is used to store
|
|
360
|
+
additional information about the document. Keys must be strings and values can
|
|
361
|
+
be strings, numbers, or booleans.
|
|
362
|
+
|
|
381
363
|
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
|
|
382
364
|
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
|
|
383
365
|
|
|
@@ -394,6 +376,7 @@ class DocumentsResource(SyncAPIResource):
|
|
|
394
376
|
"file": file,
|
|
395
377
|
"container_tags": container_tags,
|
|
396
378
|
"file_type": file_type,
|
|
379
|
+
"metadata": metadata,
|
|
397
380
|
"mime_type": mime_type,
|
|
398
381
|
}
|
|
399
382
|
)
|
|
@@ -441,9 +424,7 @@ class AsyncDocumentsResource(AsyncAPIResource):
|
|
|
441
424
|
container_tags: SequenceNotStr[str] | Omit = omit,
|
|
442
425
|
content: str | Omit = omit,
|
|
443
426
|
custom_id: str | Omit = omit,
|
|
444
|
-
file_type: str | Omit = omit,
|
|
445
427
|
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
|
|
446
|
-
mime_type: str | Omit = omit,
|
|
447
428
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
448
429
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
449
430
|
extra_headers: Headers | None = None,
|
|
@@ -475,20 +456,12 @@ class AsyncDocumentsResource(AsyncAPIResource):
|
|
|
475
456
|
custom_id: Optional custom ID of the document. This could be an ID from your database that
|
|
476
457
|
will uniquely identify this document.
|
|
477
458
|
|
|
478
|
-
file_type:
|
|
479
|
-
Optional file type override to force specific processing behavior. Valid values:
|
|
480
|
-
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
|
|
481
|
-
notion_doc, webpage, onedrive
|
|
482
|
-
|
|
483
459
|
metadata: Optional metadata for the document. This is used to store additional information
|
|
484
460
|
about the document. You can use this to store any additional information you
|
|
485
461
|
need about the document. Metadata can be filtered through. Keys must be strings
|
|
486
462
|
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
|
|
487
463
|
nest objects.
|
|
488
464
|
|
|
489
|
-
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
|
|
490
|
-
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
|
|
491
|
-
|
|
492
465
|
extra_headers: Send extra headers
|
|
493
466
|
|
|
494
467
|
extra_query: Add additional query parameters to the request
|
|
@@ -507,9 +480,7 @@ class AsyncDocumentsResource(AsyncAPIResource):
|
|
|
507
480
|
"container_tags": container_tags,
|
|
508
481
|
"content": content,
|
|
509
482
|
"custom_id": custom_id,
|
|
510
|
-
"file_type": file_type,
|
|
511
483
|
"metadata": metadata,
|
|
512
|
-
"mime_type": mime_type,
|
|
513
484
|
},
|
|
514
485
|
document_update_params.DocumentUpdateParams,
|
|
515
486
|
),
|
|
@@ -626,9 +597,7 @@ class AsyncDocumentsResource(AsyncAPIResource):
|
|
|
626
597
|
container_tag: str | Omit = omit,
|
|
627
598
|
container_tags: SequenceNotStr[str] | Omit = omit,
|
|
628
599
|
custom_id: str | Omit = omit,
|
|
629
|
-
file_type: str | Omit = omit,
|
|
630
600
|
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
|
|
631
|
-
mime_type: str | Omit = omit,
|
|
632
601
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
633
602
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
634
603
|
extra_headers: Headers | None = None,
|
|
@@ -660,20 +629,12 @@ class AsyncDocumentsResource(AsyncAPIResource):
|
|
|
660
629
|
custom_id: Optional custom ID of the document. This could be an ID from your database that
|
|
661
630
|
will uniquely identify this document.
|
|
662
631
|
|
|
663
|
-
file_type:
|
|
664
|
-
Optional file type override to force specific processing behavior. Valid values:
|
|
665
|
-
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
|
|
666
|
-
notion_doc, webpage, onedrive
|
|
667
|
-
|
|
668
632
|
metadata: Optional metadata for the document. This is used to store additional information
|
|
669
633
|
about the document. You can use this to store any additional information you
|
|
670
634
|
need about the document. Metadata can be filtered through. Keys must be strings
|
|
671
635
|
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
|
|
672
636
|
nest objects.
|
|
673
637
|
|
|
674
|
-
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
|
|
675
|
-
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
|
|
676
|
-
|
|
677
638
|
extra_headers: Send extra headers
|
|
678
639
|
|
|
679
640
|
extra_query: Add additional query parameters to the request
|
|
@@ -690,9 +651,7 @@ class AsyncDocumentsResource(AsyncAPIResource):
|
|
|
690
651
|
"container_tag": container_tag,
|
|
691
652
|
"container_tags": container_tags,
|
|
692
653
|
"custom_id": custom_id,
|
|
693
|
-
"file_type": file_type,
|
|
694
654
|
"metadata": metadata,
|
|
695
|
-
"mime_type": mime_type,
|
|
696
655
|
},
|
|
697
656
|
document_add_params.DocumentAddParams,
|
|
698
657
|
),
|
|
@@ -741,6 +700,7 @@ class AsyncDocumentsResource(AsyncAPIResource):
|
|
|
741
700
|
file: FileTypes,
|
|
742
701
|
container_tags: str | Omit = omit,
|
|
743
702
|
file_type: str | Omit = omit,
|
|
703
|
+
metadata: str | Omit = omit,
|
|
744
704
|
mime_type: str | Omit = omit,
|
|
745
705
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
746
706
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -755,14 +715,19 @@ class AsyncDocumentsResource(AsyncAPIResource):
|
|
|
755
715
|
Args:
|
|
756
716
|
file: File to upload and process
|
|
757
717
|
|
|
758
|
-
container_tags: Optional
|
|
759
|
-
|
|
718
|
+
container_tags: Optional container tags. Can be either a JSON string of an array (e.g.,
|
|
719
|
+
'["user_123", "project_123"]') or a single string (e.g., 'user_123'). Single
|
|
720
|
+
strings will be automatically converted to an array.
|
|
760
721
|
|
|
761
722
|
file_type:
|
|
762
723
|
Optional file type override to force specific processing behavior. Valid values:
|
|
763
724
|
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
|
|
764
725
|
notion_doc, webpage, onedrive
|
|
765
726
|
|
|
727
|
+
metadata: Optional metadata for the document as a JSON string. This is used to store
|
|
728
|
+
additional information about the document. Keys must be strings and values can
|
|
729
|
+
be strings, numbers, or booleans.
|
|
730
|
+
|
|
766
731
|
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
|
|
767
732
|
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
|
|
768
733
|
|
|
@@ -779,6 +744,7 @@ class AsyncDocumentsResource(AsyncAPIResource):
|
|
|
779
744
|
"file": file,
|
|
780
745
|
"container_tags": container_tags,
|
|
781
746
|
"file_type": file_type,
|
|
747
|
+
"metadata": metadata,
|
|
782
748
|
"mime_type": mime_type,
|
|
783
749
|
}
|
|
784
750
|
)
|
|
@@ -56,9 +56,7 @@ class MemoriesResource(SyncAPIResource):
|
|
|
56
56
|
container_tags: SequenceNotStr[str] | Omit = omit,
|
|
57
57
|
content: str | Omit = omit,
|
|
58
58
|
custom_id: str | Omit = omit,
|
|
59
|
-
file_type: str | Omit = omit,
|
|
60
59
|
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
|
|
61
|
-
mime_type: str | Omit = omit,
|
|
62
60
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
63
61
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
64
62
|
extra_headers: Headers | None = None,
|
|
@@ -90,20 +88,12 @@ class MemoriesResource(SyncAPIResource):
|
|
|
90
88
|
custom_id: Optional custom ID of the document. This could be an ID from your database that
|
|
91
89
|
will uniquely identify this document.
|
|
92
90
|
|
|
93
|
-
file_type:
|
|
94
|
-
Optional file type override to force specific processing behavior. Valid values:
|
|
95
|
-
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
|
|
96
|
-
notion_doc, webpage, onedrive
|
|
97
|
-
|
|
98
91
|
metadata: Optional metadata for the document. This is used to store additional information
|
|
99
92
|
about the document. You can use this to store any additional information you
|
|
100
93
|
need about the document. Metadata can be filtered through. Keys must be strings
|
|
101
94
|
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
|
|
102
95
|
nest objects.
|
|
103
96
|
|
|
104
|
-
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
|
|
105
|
-
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
|
|
106
|
-
|
|
107
97
|
extra_headers: Send extra headers
|
|
108
98
|
|
|
109
99
|
extra_query: Add additional query parameters to the request
|
|
@@ -122,9 +112,7 @@ class MemoriesResource(SyncAPIResource):
|
|
|
122
112
|
"container_tags": container_tags,
|
|
123
113
|
"content": content,
|
|
124
114
|
"custom_id": custom_id,
|
|
125
|
-
"file_type": file_type,
|
|
126
115
|
"metadata": metadata,
|
|
127
|
-
"mime_type": mime_type,
|
|
128
116
|
},
|
|
129
117
|
memory_update_params.MemoryUpdateParams,
|
|
130
118
|
),
|
|
@@ -241,9 +229,7 @@ class MemoriesResource(SyncAPIResource):
|
|
|
241
229
|
container_tag: str | Omit = omit,
|
|
242
230
|
container_tags: SequenceNotStr[str] | Omit = omit,
|
|
243
231
|
custom_id: str | Omit = omit,
|
|
244
|
-
file_type: str | Omit = omit,
|
|
245
232
|
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
|
|
246
|
-
mime_type: str | Omit = omit,
|
|
247
233
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
248
234
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
249
235
|
extra_headers: Headers | None = None,
|
|
@@ -275,20 +261,12 @@ class MemoriesResource(SyncAPIResource):
|
|
|
275
261
|
custom_id: Optional custom ID of the document. This could be an ID from your database that
|
|
276
262
|
will uniquely identify this document.
|
|
277
263
|
|
|
278
|
-
file_type:
|
|
279
|
-
Optional file type override to force specific processing behavior. Valid values:
|
|
280
|
-
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
|
|
281
|
-
notion_doc, webpage, onedrive
|
|
282
|
-
|
|
283
264
|
metadata: Optional metadata for the document. This is used to store additional information
|
|
284
265
|
about the document. You can use this to store any additional information you
|
|
285
266
|
need about the document. Metadata can be filtered through. Keys must be strings
|
|
286
267
|
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
|
|
287
268
|
nest objects.
|
|
288
269
|
|
|
289
|
-
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
|
|
290
|
-
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
|
|
291
|
-
|
|
292
270
|
extra_headers: Send extra headers
|
|
293
271
|
|
|
294
272
|
extra_query: Add additional query parameters to the request
|
|
@@ -305,9 +283,7 @@ class MemoriesResource(SyncAPIResource):
|
|
|
305
283
|
"container_tag": container_tag,
|
|
306
284
|
"container_tags": container_tags,
|
|
307
285
|
"custom_id": custom_id,
|
|
308
|
-
"file_type": file_type,
|
|
309
286
|
"metadata": metadata,
|
|
310
|
-
"mime_type": mime_type,
|
|
311
287
|
},
|
|
312
288
|
memory_add_params.MemoryAddParams,
|
|
313
289
|
),
|
|
@@ -356,6 +332,7 @@ class MemoriesResource(SyncAPIResource):
|
|
|
356
332
|
file: FileTypes,
|
|
357
333
|
container_tags: str | Omit = omit,
|
|
358
334
|
file_type: str | Omit = omit,
|
|
335
|
+
metadata: str | Omit = omit,
|
|
359
336
|
mime_type: str | Omit = omit,
|
|
360
337
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
361
338
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -370,14 +347,19 @@ class MemoriesResource(SyncAPIResource):
|
|
|
370
347
|
Args:
|
|
371
348
|
file: File to upload and process
|
|
372
349
|
|
|
373
|
-
container_tags: Optional
|
|
374
|
-
|
|
350
|
+
container_tags: Optional container tags. Can be either a JSON string of an array (e.g.,
|
|
351
|
+
'["user_123", "project_123"]') or a single string (e.g., 'user_123'). Single
|
|
352
|
+
strings will be automatically converted to an array.
|
|
375
353
|
|
|
376
354
|
file_type:
|
|
377
355
|
Optional file type override to force specific processing behavior. Valid values:
|
|
378
356
|
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
|
|
379
357
|
notion_doc, webpage, onedrive
|
|
380
358
|
|
|
359
|
+
metadata: Optional metadata for the document as a JSON string. This is used to store
|
|
360
|
+
additional information about the document. Keys must be strings and values can
|
|
361
|
+
be strings, numbers, or booleans.
|
|
362
|
+
|
|
381
363
|
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
|
|
382
364
|
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
|
|
383
365
|
|
|
@@ -394,6 +376,7 @@ class MemoriesResource(SyncAPIResource):
|
|
|
394
376
|
"file": file,
|
|
395
377
|
"container_tags": container_tags,
|
|
396
378
|
"file_type": file_type,
|
|
379
|
+
"metadata": metadata,
|
|
397
380
|
"mime_type": mime_type,
|
|
398
381
|
}
|
|
399
382
|
)
|
|
@@ -441,9 +424,7 @@ class AsyncMemoriesResource(AsyncAPIResource):
|
|
|
441
424
|
container_tags: SequenceNotStr[str] | Omit = omit,
|
|
442
425
|
content: str | Omit = omit,
|
|
443
426
|
custom_id: str | Omit = omit,
|
|
444
|
-
file_type: str | Omit = omit,
|
|
445
427
|
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
|
|
446
|
-
mime_type: str | Omit = omit,
|
|
447
428
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
448
429
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
449
430
|
extra_headers: Headers | None = None,
|
|
@@ -475,20 +456,12 @@ class AsyncMemoriesResource(AsyncAPIResource):
|
|
|
475
456
|
custom_id: Optional custom ID of the document. This could be an ID from your database that
|
|
476
457
|
will uniquely identify this document.
|
|
477
458
|
|
|
478
|
-
file_type:
|
|
479
|
-
Optional file type override to force specific processing behavior. Valid values:
|
|
480
|
-
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
|
|
481
|
-
notion_doc, webpage, onedrive
|
|
482
|
-
|
|
483
459
|
metadata: Optional metadata for the document. This is used to store additional information
|
|
484
460
|
about the document. You can use this to store any additional information you
|
|
485
461
|
need about the document. Metadata can be filtered through. Keys must be strings
|
|
486
462
|
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
|
|
487
463
|
nest objects.
|
|
488
464
|
|
|
489
|
-
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
|
|
490
|
-
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
|
|
491
|
-
|
|
492
465
|
extra_headers: Send extra headers
|
|
493
466
|
|
|
494
467
|
extra_query: Add additional query parameters to the request
|
|
@@ -507,9 +480,7 @@ class AsyncMemoriesResource(AsyncAPIResource):
|
|
|
507
480
|
"container_tags": container_tags,
|
|
508
481
|
"content": content,
|
|
509
482
|
"custom_id": custom_id,
|
|
510
|
-
"file_type": file_type,
|
|
511
483
|
"metadata": metadata,
|
|
512
|
-
"mime_type": mime_type,
|
|
513
484
|
},
|
|
514
485
|
memory_update_params.MemoryUpdateParams,
|
|
515
486
|
),
|
|
@@ -626,9 +597,7 @@ class AsyncMemoriesResource(AsyncAPIResource):
|
|
|
626
597
|
container_tag: str | Omit = omit,
|
|
627
598
|
container_tags: SequenceNotStr[str] | Omit = omit,
|
|
628
599
|
custom_id: str | Omit = omit,
|
|
629
|
-
file_type: str | Omit = omit,
|
|
630
600
|
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
|
|
631
|
-
mime_type: str | Omit = omit,
|
|
632
601
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
633
602
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
634
603
|
extra_headers: Headers | None = None,
|
|
@@ -660,20 +629,12 @@ class AsyncMemoriesResource(AsyncAPIResource):
|
|
|
660
629
|
custom_id: Optional custom ID of the document. This could be an ID from your database that
|
|
661
630
|
will uniquely identify this document.
|
|
662
631
|
|
|
663
|
-
file_type:
|
|
664
|
-
Optional file type override to force specific processing behavior. Valid values:
|
|
665
|
-
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
|
|
666
|
-
notion_doc, webpage, onedrive
|
|
667
|
-
|
|
668
632
|
metadata: Optional metadata for the document. This is used to store additional information
|
|
669
633
|
about the document. You can use this to store any additional information you
|
|
670
634
|
need about the document. Metadata can be filtered through. Keys must be strings
|
|
671
635
|
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
|
|
672
636
|
nest objects.
|
|
673
637
|
|
|
674
|
-
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
|
|
675
|
-
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
|
|
676
|
-
|
|
677
638
|
extra_headers: Send extra headers
|
|
678
639
|
|
|
679
640
|
extra_query: Add additional query parameters to the request
|
|
@@ -690,9 +651,7 @@ class AsyncMemoriesResource(AsyncAPIResource):
|
|
|
690
651
|
"container_tag": container_tag,
|
|
691
652
|
"container_tags": container_tags,
|
|
692
653
|
"custom_id": custom_id,
|
|
693
|
-
"file_type": file_type,
|
|
694
654
|
"metadata": metadata,
|
|
695
|
-
"mime_type": mime_type,
|
|
696
655
|
},
|
|
697
656
|
memory_add_params.MemoryAddParams,
|
|
698
657
|
),
|
|
@@ -741,6 +700,7 @@ class AsyncMemoriesResource(AsyncAPIResource):
|
|
|
741
700
|
file: FileTypes,
|
|
742
701
|
container_tags: str | Omit = omit,
|
|
743
702
|
file_type: str | Omit = omit,
|
|
703
|
+
metadata: str | Omit = omit,
|
|
744
704
|
mime_type: str | Omit = omit,
|
|
745
705
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
746
706
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -755,14 +715,19 @@ class AsyncMemoriesResource(AsyncAPIResource):
|
|
|
755
715
|
Args:
|
|
756
716
|
file: File to upload and process
|
|
757
717
|
|
|
758
|
-
container_tags: Optional
|
|
759
|
-
|
|
718
|
+
container_tags: Optional container tags. Can be either a JSON string of an array (e.g.,
|
|
719
|
+
'["user_123", "project_123"]') or a single string (e.g., 'user_123'). Single
|
|
720
|
+
strings will be automatically converted to an array.
|
|
760
721
|
|
|
761
722
|
file_type:
|
|
762
723
|
Optional file type override to force specific processing behavior. Valid values:
|
|
763
724
|
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
|
|
764
725
|
notion_doc, webpage, onedrive
|
|
765
726
|
|
|
727
|
+
metadata: Optional metadata for the document as a JSON string. This is used to store
|
|
728
|
+
additional information about the document. Keys must be strings and values can
|
|
729
|
+
be strings, numbers, or booleans.
|
|
730
|
+
|
|
766
731
|
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
|
|
767
732
|
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
|
|
768
733
|
|
|
@@ -779,6 +744,7 @@ class AsyncMemoriesResource(AsyncAPIResource):
|
|
|
779
744
|
"file": file,
|
|
780
745
|
"container_tags": container_tags,
|
|
781
746
|
"file_type": file_type,
|
|
747
|
+
"metadata": metadata,
|
|
782
748
|
"mime_type": mime_type,
|
|
783
749
|
}
|
|
784
750
|
)
|
supermemory/types/__init__.py
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from .shared import Or as Or, And as And
|
|
5
6
|
from .memory_add_params import MemoryAddParams as MemoryAddParams
|
|
6
7
|
from .memory_list_params import MemoryListParams as MemoryListParams
|
|
7
8
|
from .document_add_params import DocumentAddParams as DocumentAddParams
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
from typing import Dict, Optional
|
|
4
|
-
from datetime import datetime
|
|
5
4
|
|
|
6
5
|
from pydantic import Field as FieldInfo
|
|
7
6
|
|
|
@@ -13,7 +12,7 @@ __all__ = ["ConnectionGetByIDResponse"]
|
|
|
13
12
|
class ConnectionGetByIDResponse(BaseModel):
|
|
14
13
|
id: str
|
|
15
14
|
|
|
16
|
-
created_at:
|
|
15
|
+
created_at: str = FieldInfo(alias="createdAt")
|
|
17
16
|
|
|
18
17
|
provider: str
|
|
19
18
|
|
|
@@ -21,6 +20,6 @@ class ConnectionGetByIDResponse(BaseModel):
|
|
|
21
20
|
|
|
22
21
|
email: Optional[str] = None
|
|
23
22
|
|
|
24
|
-
expires_at: Optional[
|
|
23
|
+
expires_at: Optional[str] = FieldInfo(alias="expiresAt", default=None)
|
|
25
24
|
|
|
26
25
|
metadata: Optional[Dict[str, object]] = None
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
from typing import Dict, Optional
|
|
4
|
-
from datetime import datetime
|
|
5
4
|
|
|
6
5
|
from pydantic import Field as FieldInfo
|
|
7
6
|
|
|
@@ -13,7 +12,7 @@ __all__ = ["ConnectionGetByTagsResponse"]
|
|
|
13
12
|
class ConnectionGetByTagsResponse(BaseModel):
|
|
14
13
|
id: str
|
|
15
14
|
|
|
16
|
-
created_at:
|
|
15
|
+
created_at: str = FieldInfo(alias="createdAt")
|
|
17
16
|
|
|
18
17
|
provider: str
|
|
19
18
|
|
|
@@ -21,6 +20,6 @@ class ConnectionGetByTagsResponse(BaseModel):
|
|
|
21
20
|
|
|
22
21
|
email: Optional[str] = None
|
|
23
22
|
|
|
24
|
-
expires_at: Optional[
|
|
23
|
+
expires_at: Optional[str] = FieldInfo(alias="expiresAt", default=None)
|
|
25
24
|
|
|
26
25
|
metadata: Optional[Dict[str, object]] = None
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
from typing import Dict, List, Optional
|
|
4
|
-
from datetime import datetime
|
|
5
4
|
from typing_extensions import TypeAlias
|
|
6
5
|
|
|
7
6
|
from pydantic import Field as FieldInfo
|
|
@@ -14,7 +13,7 @@ __all__ = ["ConnectionListResponse", "ConnectionListResponseItem"]
|
|
|
14
13
|
class ConnectionListResponseItem(BaseModel):
|
|
15
14
|
id: str
|
|
16
15
|
|
|
17
|
-
created_at:
|
|
16
|
+
created_at: str = FieldInfo(alias="createdAt")
|
|
18
17
|
|
|
19
18
|
provider: str
|
|
20
19
|
|
|
@@ -22,7 +21,7 @@ class ConnectionListResponseItem(BaseModel):
|
|
|
22
21
|
|
|
23
22
|
email: Optional[str] = None
|
|
24
23
|
|
|
25
|
-
expires_at: Optional[
|
|
24
|
+
expires_at: Optional[str] = FieldInfo(alias="expiresAt", default=None)
|
|
26
25
|
|
|
27
26
|
metadata: Optional[Dict[str, object]] = None
|
|
28
27
|
|
|
@@ -45,13 +45,6 @@ class DocumentAddParams(TypedDict, total=False):
|
|
|
45
45
|
document.
|
|
46
46
|
"""
|
|
47
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
48
|
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]]
|
|
56
49
|
"""Optional metadata for the document.
|
|
57
50
|
|
|
@@ -60,10 +53,3 @@ class DocumentAddParams(TypedDict, total=False):
|
|
|
60
53
|
can be filtered through. Keys must be strings and are case sensitive. Values can
|
|
61
54
|
be strings, numbers, or booleans. You cannot nest objects.
|
|
62
55
|
"""
|
|
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
|
-
"""
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
from typing import Dict, List, Union, Optional
|
|
4
|
-
from datetime import datetime
|
|
5
4
|
from typing_extensions import Literal
|
|
6
5
|
|
|
7
6
|
from pydantic import Field as FieldInfo
|
|
@@ -33,7 +32,7 @@ class DocumentGetResponse(BaseModel):
|
|
|
33
32
|
We automatically detect the content type from the url's response format.
|
|
34
33
|
"""
|
|
35
34
|
|
|
36
|
-
created_at:
|
|
35
|
+
created_at: str = FieldInfo(alias="createdAt")
|
|
37
36
|
"""Creation timestamp"""
|
|
38
37
|
|
|
39
38
|
custom_id: Optional[str] = FieldInfo(alias="customId", default=None)
|
|
@@ -54,6 +53,9 @@ class DocumentGetResponse(BaseModel):
|
|
|
54
53
|
|
|
55
54
|
og_image: Optional[str] = FieldInfo(alias="ogImage", default=None)
|
|
56
55
|
|
|
56
|
+
raw: object
|
|
57
|
+
"""Raw content of the document"""
|
|
58
|
+
|
|
57
59
|
source: Optional[str] = None
|
|
58
60
|
"""Source of the document"""
|
|
59
61
|
|
|
@@ -87,7 +89,7 @@ class DocumentGetResponse(BaseModel):
|
|
|
87
89
|
]
|
|
88
90
|
"""Type of the document"""
|
|
89
91
|
|
|
90
|
-
updated_at:
|
|
92
|
+
updated_at: str = FieldInfo(alias="updatedAt")
|
|
91
93
|
"""Last update timestamp"""
|
|
92
94
|
|
|
93
95
|
container_tags: Optional[List[str]] = FieldInfo(alias="containerTags", default=None)
|
|
@@ -97,8 +99,5 @@ class DocumentGetResponse(BaseModel):
|
|
|
97
99
|
to use to group documents.
|
|
98
100
|
"""
|
|
99
101
|
|
|
100
|
-
raw: None = None
|
|
101
|
-
"""Raw content of the document"""
|
|
102
|
-
|
|
103
102
|
url: Optional[str] = None
|
|
104
103
|
"""URL of the document"""
|