@@ -39,22 +39,18 @@ def test_method_update(self, client: Supermemory) -> None:
3939 def test_method_update_with_all_params (self , client : Supermemory ) -> None :
4040 document = client .documents .update (
4141 id = "id" ,
42- container_tag = "user_123 " ,
43- container_tags = ["user_123" , "project_123 " ],
44- content = "This is a detailed article about machine learning concepts.. ." ,
45- custom_id = "mem_abc123 " ,
42+ container_tag = "user_alex " ,
43+ container_tags = ["_:_k--W2K_1V " ],
44+ content = "Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s ." ,
45+ custom_id = "doc-api-rate-limits " ,
4646 filepath = "/documents/reports/file.pdf" ,
4747 filter_by_metadata = {
4848 "department" : "engineering" ,
4949 "region" : "us" ,
5050 },
5151 metadata = {
52- "category" : "technology" ,
53- "isPublic" : True ,
54- "readingTime" : 5 ,
55- "source" : "web" ,
56- "tag_1" : "ai" ,
57- "tag_2" : "machine-learning" ,
52+ "source" : "upload" ,
53+ "language" : "en" ,
5854 },
5955 task_type = "memory" ,
6056 )
@@ -104,8 +100,8 @@ def test_method_list(self, client: Supermemory) -> None:
104100 @parametrize
105101 def test_method_list_with_all_params (self , client : Supermemory ) -> None :
106102 document = client .documents .list (
107- container_tags = ["user_123" , "project_123 " ],
108- filepath = "/docs/ " ,
103+ container_tags = ["_:_k--W2K_1V " ],
104+ filepath = "filepath " ,
109105 filters = {
110106 "and_" : [
111107 {
@@ -252,7 +248,11 @@ def test_streaming_response_add(self, client: Supermemory) -> None:
252248 @parametrize
253249 def test_method_batch_add (self , client : Supermemory ) -> None :
254250 document = client .documents .batch_add (
255- documents = [{"content" : "This is a detailed article about machine learning concepts..." }],
251+ documents = [
252+ {
253+ "content" : "Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s."
254+ }
255+ ],
256256 )
257257 assert_matches_type (DocumentBatchAddResponse , document , path = ["response" ])
258258
@@ -262,41 +262,35 @@ def test_method_batch_add_with_all_params(self, client: Supermemory) -> None:
262262 document = client .documents .batch_add (
263263 documents = [
264264 {
265- "content" : "This is a detailed article about machine learning concepts..." ,
266- "container_tag" : "user_123" ,
267- "container_tags" : ["user_123" , "project_123" ],
268- "custom_id" : "mem_abc123" ,
265+ "content" : "Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s." ,
266+ "container_tag" : "user_alex" ,
267+ "container_tags" : ["_:_k--W2K_1V" ],
268+ "custom_id" : "doc-api-rate-limits" ,
269+ "entity_context" : "User's name is {XYZ}" ,
269270 "filepath" : "/documents/reports/file.pdf" ,
270271 "filter_by_metadata" : {
271272 "department" : "engineering" ,
272273 "region" : "us" ,
273274 },
274275 "metadata" : {
275- "category" : "technology" ,
276- "isPublic" : True ,
277- "readingTime" : 5 ,
278- "source" : "web" ,
279- "tag_1" : "ai" ,
280- "tag_2" : "machine-learning" ,
276+ "source" : "upload" ,
277+ "language" : "en" ,
281278 },
282279 "task_type" : "memory" ,
283280 }
284281 ],
285- container_tag = "user_123 " ,
286- container_tags = ["user_123" , "project_123 " ],
282+ container_tag = "user_alex " ,
283+ container_tags = ["_:_k--W2K_1V " ],
287284 content = None ,
285+ entity_context = "User's name is {XYZ}" ,
288286 filepath = "/documents/reports/file.pdf" ,
289287 filter_by_metadata = {
290288 "department" : "engineering" ,
291289 "region" : "us" ,
292290 },
293291 metadata = {
294- "category" : "technology" ,
295- "isPublic" : True ,
296- "readingTime" : 5 ,
297- "source" : "web" ,
298- "tag_1" : "ai" ,
299- "tag_2" : "machine-learning" ,
292+ "source" : "upload" ,
293+ "language" : "en" ,
300294 },
301295 task_type = "memory" ,
302296 )
@@ -306,7 +300,11 @@ def test_method_batch_add_with_all_params(self, client: Supermemory) -> None:
306300 @parametrize
307301 def test_raw_response_batch_add (self , client : Supermemory ) -> None :
308302 response = client .documents .with_raw_response .batch_add (
309- documents = [{"content" : "This is a detailed article about machine learning concepts..." }],
303+ documents = [
304+ {
305+ "content" : "Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s."
306+ }
307+ ],
310308 )
311309
312310 assert response .is_closed is True
@@ -318,7 +316,11 @@ def test_raw_response_batch_add(self, client: Supermemory) -> None:
318316 @parametrize
319317 def test_streaming_response_batch_add (self , client : Supermemory ) -> None :
320318 with client .documents .with_streaming_response .batch_add (
321- documents = [{"content" : "This is a detailed article about machine learning concepts..." }],
319+ documents = [
320+ {
321+ "content" : "Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s."
322+ }
323+ ],
322324 ) as response :
323325 assert not response .is_closed
324326 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
@@ -338,8 +340,8 @@ def test_method_delete_bulk(self, client: Supermemory) -> None:
338340 @parametrize
339341 def test_method_delete_bulk_with_all_params (self , client : Supermemory ) -> None :
340342 document = client .documents .delete_bulk (
341- container_tags = ["user_123" , "project_123 " ],
342- filepath = "/docs/old/ " ,
343+ container_tags = ["_:_k--W2K_1V " ],
344+ filepath = "filepath " ,
343345 ids = ["acxV5LHMEsG2hMSNb4umbn" , "bxcV5LHMEsG2hMSNb4umbn" ],
344346 )
345347 assert_matches_type (DocumentDeleteBulkResponse , document , path = ["response" ])
@@ -450,9 +452,9 @@ def test_method_upload_file_with_all_params(self, client: Supermemory) -> None:
450452 document = client .documents .upload_file (
451453 file = b"Example data" ,
452454 container_tag = "user" ,
453- container_tags = '["user_123", "project_123"]' ,
455+ container_tags = "containerTags" ,
454456 custom_id = "mem_abc123" ,
455- entity_context = "This user is a software engineer who prefers concise technical documentation. " ,
457+ entity_context = "User's name is {XYZ} " ,
456458 filepath = "/documents/reports/file.pdf" ,
457459 file_type = "image" ,
458460 filter_by_metadata = '{"department": "engineering"}' ,
@@ -508,22 +510,18 @@ async def test_method_update(self, async_client: AsyncSupermemory) -> None:
508510 async def test_method_update_with_all_params (self , async_client : AsyncSupermemory ) -> None :
509511 document = await async_client .documents .update (
510512 id = "id" ,
511- container_tag = "user_123 " ,
512- container_tags = ["user_123" , "project_123 " ],
513- content = "This is a detailed article about machine learning concepts.. ." ,
514- custom_id = "mem_abc123 " ,
513+ container_tag = "user_alex " ,
514+ container_tags = ["_:_k--W2K_1V " ],
515+ content = "Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s ." ,
516+ custom_id = "doc-api-rate-limits " ,
515517 filepath = "/documents/reports/file.pdf" ,
516518 filter_by_metadata = {
517519 "department" : "engineering" ,
518520 "region" : "us" ,
519521 },
520522 metadata = {
521- "category" : "technology" ,
522- "isPublic" : True ,
523- "readingTime" : 5 ,
524- "source" : "web" ,
525- "tag_1" : "ai" ,
526- "tag_2" : "machine-learning" ,
523+ "source" : "upload" ,
524+ "language" : "en" ,
527525 },
528526 task_type = "memory" ,
529527 )
@@ -573,8 +571,8 @@ async def test_method_list(self, async_client: AsyncSupermemory) -> None:
573571 @parametrize
574572 async def test_method_list_with_all_params (self , async_client : AsyncSupermemory ) -> None :
575573 document = await async_client .documents .list (
576- container_tags = ["user_123" , "project_123 " ],
577- filepath = "/docs/ " ,
574+ container_tags = ["_:_k--W2K_1V " ],
575+ filepath = "filepath " ,
578576 filters = {
579577 "and_" : [
580578 {
@@ -721,7 +719,11 @@ async def test_streaming_response_add(self, async_client: AsyncSupermemory) -> N
721719 @parametrize
722720 async def test_method_batch_add (self , async_client : AsyncSupermemory ) -> None :
723721 document = await async_client .documents .batch_add (
724- documents = [{"content" : "This is a detailed article about machine learning concepts..." }],
722+ documents = [
723+ {
724+ "content" : "Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s."
725+ }
726+ ],
725727 )
726728 assert_matches_type (DocumentBatchAddResponse , document , path = ["response" ])
727729
@@ -731,41 +733,35 @@ async def test_method_batch_add_with_all_params(self, async_client: AsyncSuperme
731733 document = await async_client .documents .batch_add (
732734 documents = [
733735 {
734- "content" : "This is a detailed article about machine learning concepts..." ,
735- "container_tag" : "user_123" ,
736- "container_tags" : ["user_123" , "project_123" ],
737- "custom_id" : "mem_abc123" ,
736+ "content" : "Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s." ,
737+ "container_tag" : "user_alex" ,
738+ "container_tags" : ["_:_k--W2K_1V" ],
739+ "custom_id" : "doc-api-rate-limits" ,
740+ "entity_context" : "User's name is {XYZ}" ,
738741 "filepath" : "/documents/reports/file.pdf" ,
739742 "filter_by_metadata" : {
740743 "department" : "engineering" ,
741744 "region" : "us" ,
742745 },
743746 "metadata" : {
744- "category" : "technology" ,
745- "isPublic" : True ,
746- "readingTime" : 5 ,
747- "source" : "web" ,
748- "tag_1" : "ai" ,
749- "tag_2" : "machine-learning" ,
747+ "source" : "upload" ,
748+ "language" : "en" ,
750749 },
751750 "task_type" : "memory" ,
752751 }
753752 ],
754- container_tag = "user_123 " ,
755- container_tags = ["user_123" , "project_123 " ],
753+ container_tag = "user_alex " ,
754+ container_tags = ["_:_k--W2K_1V " ],
756755 content = None ,
756+ entity_context = "User's name is {XYZ}" ,
757757 filepath = "/documents/reports/file.pdf" ,
758758 filter_by_metadata = {
759759 "department" : "engineering" ,
760760 "region" : "us" ,
761761 },
762762 metadata = {
763- "category" : "technology" ,
764- "isPublic" : True ,
765- "readingTime" : 5 ,
766- "source" : "web" ,
767- "tag_1" : "ai" ,
768- "tag_2" : "machine-learning" ,
763+ "source" : "upload" ,
764+ "language" : "en" ,
769765 },
770766 task_type = "memory" ,
771767 )
@@ -775,7 +771,11 @@ async def test_method_batch_add_with_all_params(self, async_client: AsyncSuperme
775771 @parametrize
776772 async def test_raw_response_batch_add (self , async_client : AsyncSupermemory ) -> None :
777773 response = await async_client .documents .with_raw_response .batch_add (
778- documents = [{"content" : "This is a detailed article about machine learning concepts..." }],
774+ documents = [
775+ {
776+ "content" : "Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s."
777+ }
778+ ],
779779 )
780780
781781 assert response .is_closed is True
@@ -787,7 +787,11 @@ async def test_raw_response_batch_add(self, async_client: AsyncSupermemory) -> N
787787 @parametrize
788788 async def test_streaming_response_batch_add (self , async_client : AsyncSupermemory ) -> None :
789789 async with async_client .documents .with_streaming_response .batch_add (
790- documents = [{"content" : "This is a detailed article about machine learning concepts..." }],
790+ documents = [
791+ {
792+ "content" : "Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s."
793+ }
794+ ],
791795 ) as response :
792796 assert not response .is_closed
793797 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
@@ -807,8 +811,8 @@ async def test_method_delete_bulk(self, async_client: AsyncSupermemory) -> None:
807811 @parametrize
808812 async def test_method_delete_bulk_with_all_params (self , async_client : AsyncSupermemory ) -> None :
809813 document = await async_client .documents .delete_bulk (
810- container_tags = ["user_123" , "project_123 " ],
811- filepath = "/docs/old/ " ,
814+ container_tags = ["_:_k--W2K_1V " ],
815+ filepath = "filepath " ,
812816 ids = ["acxV5LHMEsG2hMSNb4umbn" , "bxcV5LHMEsG2hMSNb4umbn" ],
813817 )
814818 assert_matches_type (DocumentDeleteBulkResponse , document , path = ["response" ])
@@ -919,9 +923,9 @@ async def test_method_upload_file_with_all_params(self, async_client: AsyncSuper
919923 document = await async_client .documents .upload_file (
920924 file = b"Example data" ,
921925 container_tag = "user" ,
922- container_tags = '["user_123", "project_123"]' ,
926+ container_tags = "containerTags" ,
923927 custom_id = "mem_abc123" ,
924- entity_context = "This user is a software engineer who prefers concise technical documentation. " ,
928+ entity_context = "User's name is {XYZ} " ,
925929 filepath = "/documents/reports/file.pdf" ,
926930 file_type = "image" ,
927931 filter_by_metadata = '{"department": "engineering"}' ,
0 commit comments