Skip to content

Commit 0950bae

Browse files
feat(api): api update
1 parent 09ac54c commit 0950bae

11 files changed

Lines changed: 112 additions & 8 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 26
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-3d1ed08ae874eafef0c275748f38e21c1e6a245ecad05db24dee27f4166f18db.yml
3-
openapi_spec_hash: fa7ccfe7d4574c280f3189d020401032
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-10c98134d24013fd174c40fd595c7986b984cffa71cad4d3ef9fe199e7f565ab.yml
3+
openapi_spec_hash: b5ee093b1cbbf9c32277d92c0222ff62
44
config_hash: f3eb5ca71172780678106f6d46f15dda

src/supermemory/_client.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import os
66
from typing import TYPE_CHECKING, Any, Dict, Union, Mapping
7-
from typing_extensions import Self, override
7+
from typing_extensions import Self, Literal, override
88

99
import httpx
1010

@@ -246,6 +246,7 @@ def add(
246246
custom_id: str | Omit = omit,
247247
entity_context: str | Omit = omit,
248248
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
249+
task_type: Literal["memory", "superrag"] | Omit = omit,
249250
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
250251
# The extra values given here take precedence over values defined on the client or passed to this method.
251252
extra_headers: Headers | None = None,
@@ -271,6 +272,9 @@ def add(
271272
272273
metadata: Optional metadata for the document.
273274
275+
task_type: Task type: "memory" (default) for full context layer with SuperRAG built in,
276+
"superrag" for managed RAG as a service.
277+
274278
extra_headers: Send extra headers
275279
276280
extra_query: Add additional query parameters to the request
@@ -289,6 +293,7 @@ def add(
289293
"custom_id": custom_id,
290294
"entity_context": entity_context,
291295
"metadata": metadata,
296+
"task_type": task_type,
292297
},
293298
client_add_params.ClientAddParams,
294299
),
@@ -562,6 +567,7 @@ async def add(
562567
custom_id: str | Omit = omit,
563568
entity_context: str | Omit = omit,
564569
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
570+
task_type: Literal["memory", "superrag"] | Omit = omit,
565571
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
566572
# The extra values given here take precedence over values defined on the client or passed to this method.
567573
extra_headers: Headers | None = None,
@@ -587,6 +593,9 @@ async def add(
587593
588594
metadata: Optional metadata for the document.
589595
596+
task_type: Task type: "memory" (default) for full context layer with SuperRAG built in,
597+
"superrag" for managed RAG as a service.
598+
590599
extra_headers: Send extra headers
591600
592601
extra_query: Add additional query parameters to the request
@@ -605,6 +614,7 @@ async def add(
605614
"custom_id": custom_id,
606615
"entity_context": entity_context,
607616
"metadata": metadata,
617+
"task_type": task_type,
608618
},
609619
client_add_params.ClientAddParams,
610620
),

src/supermemory/resources/documents.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def update(
6767
content: str | Omit = omit,
6868
custom_id: str | Omit = omit,
6969
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
70+
task_type: Literal["memory", "superrag"] | Omit = omit,
7071
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
7172
# The extra values given here take precedence over values defined on the client or passed to this method.
7273
extra_headers: Headers | None = None,
@@ -104,6 +105,9 @@ def update(
104105
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
105106
nest objects.
106107
108+
task_type: Task type: "memory" (default) for full context layer with SuperRAG built in,
109+
"superrag" for managed RAG as a service.
110+
107111
extra_headers: Send extra headers
108112
109113
extra_query: Add additional query parameters to the request
@@ -123,6 +127,7 @@ def update(
123127
"content": content,
124128
"custom_id": custom_id,
125129
"metadata": metadata,
130+
"task_type": task_type,
126131
},
127132
document_update_params.DocumentUpdateParams,
128133
),
@@ -241,6 +246,7 @@ def add(
241246
custom_id: str | Omit = omit,
242247
entity_context: str | Omit = omit,
243248
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
249+
task_type: Literal["memory", "superrag"] | Omit = omit,
244250
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
245251
# The extra values given here take precedence over values defined on the client or passed to this method.
246252
extra_headers: Headers | None = None,
@@ -266,6 +272,9 @@ def add(
266272
267273
metadata: Optional metadata for the document.
268274
275+
task_type: Task type: "memory" (default) for full context layer with SuperRAG built in,
276+
"superrag" for managed RAG as a service.
277+
269278
extra_headers: Send extra headers
270279
271280
extra_query: Add additional query parameters to the request
@@ -284,6 +293,7 @@ def add(
284293
"custom_id": custom_id,
285294
"entity_context": entity_context,
286295
"metadata": metadata,
296+
"task_type": task_type,
287297
},
288298
document_add_params.DocumentAddParams,
289299
),
@@ -301,6 +311,7 @@ def batch_add(
301311
container_tags: SequenceNotStr[str] | Omit = omit,
302312
content: None | Omit = omit,
303313
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
314+
task_type: Literal["memory", "superrag"] | Omit = omit,
304315
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
305316
# The extra values given here take precedence over values defined on the client or passed to this method.
306317
extra_headers: Headers | None = None,
@@ -328,6 +339,9 @@ def batch_add(
328339
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
329340
nest objects.
330341
342+
task_type: Task type: "memory" (default) for full context layer with SuperRAG built in,
343+
"superrag" for managed RAG as a service.
344+
331345
extra_headers: Send extra headers
332346
333347
extra_query: Add additional query parameters to the request
@@ -345,6 +359,7 @@ def batch_add(
345359
"container_tags": container_tags,
346360
"content": content,
347361
"metadata": metadata,
362+
"task_type": task_type,
348363
},
349364
document_batch_add_params.DocumentBatchAddParams,
350365
),
@@ -458,6 +473,7 @@ def upload_file(
458473
file_type: str | Omit = omit,
459474
metadata: str | Omit = omit,
460475
mime_type: str | Omit = omit,
476+
task_type: Literal["memory", "superrag"] | Omit = omit,
461477
use_advanced_processing: str | Omit = omit,
462478
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
463479
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -490,6 +506,9 @@ def upload_file(
490506
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
491507
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
492508
509+
task_type: Task type: "memory" (default) for full context layer with SuperRAG built in,
510+
"superrag" for managed RAG as a service.
511+
493512
use_advanced_processing: DEPRECATED: This field is no longer used. Advanced PDF processing is now
494513
automatic with our hybrid Mistral OCR + Gemini pipeline. This parameter will be
495514
accepted but ignored for backwards compatibility.
@@ -510,6 +529,7 @@ def upload_file(
510529
"file_type": file_type,
511530
"metadata": metadata,
512531
"mime_type": mime_type,
532+
"task_type": task_type,
513533
"use_advanced_processing": use_advanced_processing,
514534
}
515535
)
@@ -558,6 +578,7 @@ async def update(
558578
content: str | Omit = omit,
559579
custom_id: str | Omit = omit,
560580
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
581+
task_type: Literal["memory", "superrag"] | Omit = omit,
561582
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
562583
# The extra values given here take precedence over values defined on the client or passed to this method.
563584
extra_headers: Headers | None = None,
@@ -595,6 +616,9 @@ async def update(
595616
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
596617
nest objects.
597618
619+
task_type: Task type: "memory" (default) for full context layer with SuperRAG built in,
620+
"superrag" for managed RAG as a service.
621+
598622
extra_headers: Send extra headers
599623
600624
extra_query: Add additional query parameters to the request
@@ -614,6 +638,7 @@ async def update(
614638
"content": content,
615639
"custom_id": custom_id,
616640
"metadata": metadata,
641+
"task_type": task_type,
617642
},
618643
document_update_params.DocumentUpdateParams,
619644
),
@@ -732,6 +757,7 @@ async def add(
732757
custom_id: str | Omit = omit,
733758
entity_context: str | Omit = omit,
734759
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
760+
task_type: Literal["memory", "superrag"] | Omit = omit,
735761
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
736762
# The extra values given here take precedence over values defined on the client or passed to this method.
737763
extra_headers: Headers | None = None,
@@ -757,6 +783,9 @@ async def add(
757783
758784
metadata: Optional metadata for the document.
759785
786+
task_type: Task type: "memory" (default) for full context layer with SuperRAG built in,
787+
"superrag" for managed RAG as a service.
788+
760789
extra_headers: Send extra headers
761790
762791
extra_query: Add additional query parameters to the request
@@ -775,6 +804,7 @@ async def add(
775804
"custom_id": custom_id,
776805
"entity_context": entity_context,
777806
"metadata": metadata,
807+
"task_type": task_type,
778808
},
779809
document_add_params.DocumentAddParams,
780810
),
@@ -792,6 +822,7 @@ async def batch_add(
792822
container_tags: SequenceNotStr[str] | Omit = omit,
793823
content: None | Omit = omit,
794824
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
825+
task_type: Literal["memory", "superrag"] | Omit = omit,
795826
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
796827
# The extra values given here take precedence over values defined on the client or passed to this method.
797828
extra_headers: Headers | None = None,
@@ -819,6 +850,9 @@ async def batch_add(
819850
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
820851
nest objects.
821852
853+
task_type: Task type: "memory" (default) for full context layer with SuperRAG built in,
854+
"superrag" for managed RAG as a service.
855+
822856
extra_headers: Send extra headers
823857
824858
extra_query: Add additional query parameters to the request
@@ -836,6 +870,7 @@ async def batch_add(
836870
"container_tags": container_tags,
837871
"content": content,
838872
"metadata": metadata,
873+
"task_type": task_type,
839874
},
840875
document_batch_add_params.DocumentBatchAddParams,
841876
),
@@ -949,6 +984,7 @@ async def upload_file(
949984
file_type: str | Omit = omit,
950985
metadata: str | Omit = omit,
951986
mime_type: str | Omit = omit,
987+
task_type: Literal["memory", "superrag"] | Omit = omit,
952988
use_advanced_processing: str | Omit = omit,
953989
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
954990
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -981,6 +1017,9 @@ async def upload_file(
9811017
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
9821018
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
9831019
1020+
task_type: Task type: "memory" (default) for full context layer with SuperRAG built in,
1021+
"superrag" for managed RAG as a service.
1022+
9841023
use_advanced_processing: DEPRECATED: This field is no longer used. Advanced PDF processing is now
9851024
automatic with our hybrid Mistral OCR + Gemini pipeline. This parameter will be
9861025
accepted but ignored for backwards compatibility.
@@ -1001,6 +1040,7 @@ async def upload_file(
10011040
"file_type": file_type,
10021041
"metadata": metadata,
10031042
"mime_type": mime_type,
1043+
"task_type": task_type,
10041044
"use_advanced_processing": use_advanced_processing,
10051045
}
10061046
)

src/supermemory/types/client_add_params.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from __future__ import annotations
44

55
from typing import Dict, Union
6-
from typing_extensions import Required, Annotated, TypedDict
6+
from typing_extensions import Literal, Required, Annotated, TypedDict
77

88
from .._types import SequenceNotStr
99
from .._utils import PropertyInfo
@@ -40,3 +40,9 @@ class ClientAddParams(TypedDict, total=False):
4040

4141
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]]
4242
"""Optional metadata for the document."""
43+
44+
task_type: Annotated[Literal["memory", "superrag"], PropertyInfo(alias="taskType")]
45+
"""
46+
Task type: "memory" (default) for full context layer with SuperRAG built in,
47+
"superrag" for managed RAG as a service.
48+
"""

src/supermemory/types/document_add_params.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from __future__ import annotations
44

55
from typing import Dict, Union
6-
from typing_extensions import Required, Annotated, TypedDict
6+
from typing_extensions import Literal, Required, Annotated, TypedDict
77

88
from .._types import SequenceNotStr
99
from .._utils import PropertyInfo
@@ -40,3 +40,9 @@ class DocumentAddParams(TypedDict, total=False):
4040

4141
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]]
4242
"""Optional metadata for the document."""
43+
44+
task_type: Annotated[Literal["memory", "superrag"], PropertyInfo(alias="taskType")]
45+
"""
46+
Task type: "memory" (default) for full context layer with SuperRAG built in,
47+
"superrag" for managed RAG as a service.
48+
"""

src/supermemory/types/document_batch_add_params.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from __future__ import annotations
44

55
from typing import Dict, Union, Iterable
6-
from typing_extensions import Required, Annotated, TypedDict
6+
from typing_extensions import Literal, Required, Annotated, TypedDict
77

88
from .._types import SequenceNotStr
99
from .._utils import PropertyInfo
@@ -39,6 +39,12 @@ class DocumentBatchAddParams(TypedDict, total=False):
3939
be strings, numbers, or booleans. You cannot nest objects.
4040
"""
4141

42+
task_type: Annotated[Literal["memory", "superrag"], PropertyInfo(alias="taskType")]
43+
"""
44+
Task type: "memory" (default) for full context layer with SuperRAG built in,
45+
"superrag" for managed RAG as a service.
46+
"""
47+
4248

4349
class DocumentsUnionMember0(TypedDict, total=False):
4450
content: Required[str]
@@ -82,3 +88,9 @@ class DocumentsUnionMember0(TypedDict, total=False):
8288
can be filtered through. Keys must be strings and are case sensitive. Values can
8389
be strings, numbers, or booleans. You cannot nest objects.
8490
"""
91+
92+
task_type: Annotated[Literal["memory", "superrag"], PropertyInfo(alias="taskType")]
93+
"""
94+
Task type: "memory" (default) for full context layer with SuperRAG built in,
95+
"superrag" for managed RAG as a service.
96+
"""

src/supermemory/types/document_get_response.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ class DocumentGetResponse(BaseModel):
6969
summary: Optional[str] = None
7070
"""Summary of the document content"""
7171

72+
task_type: Literal["memory", "superrag"] = FieldInfo(alias="taskType")
73+
"""
74+
Task type: "memory" (default) for full context layer with SuperRAG built in,
75+
"superrag" for managed RAG as a service.
76+
"""
77+
7278
title: Optional[str] = None
7379
"""Title of the document"""
7480

src/supermemory/types/document_update_params.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from __future__ import annotations
44

55
from typing import Dict, Union
6-
from typing_extensions import Annotated, TypedDict
6+
from typing_extensions import Literal, Annotated, TypedDict
77

88
from .._types import SequenceNotStr
99
from .._utils import PropertyInfo
@@ -53,3 +53,9 @@ class DocumentUpdateParams(TypedDict, total=False):
5353
can be filtered through. Keys must be strings and are case sensitive. Values can
5454
be strings, numbers, or booleans. You cannot nest objects.
5555
"""
56+
57+
task_type: Annotated[Literal["memory", "superrag"], PropertyInfo(alias="taskType")]
58+
"""
59+
Task type: "memory" (default) for full context layer with SuperRAG built in,
60+
"superrag" for managed RAG as a service.
61+
"""

src/supermemory/types/document_upload_file_params.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import Required, Annotated, TypedDict
5+
from typing_extensions import Literal, Required, Annotated, TypedDict
66

77
from .._types import FileTypes
88
from .._utils import PropertyInfo
@@ -46,6 +46,12 @@ class DocumentUploadFileParams(TypedDict, total=False):
4646
'video/mp4', 'video/webm')
4747
"""
4848

49+
task_type: Annotated[Literal["memory", "superrag"], PropertyInfo(alias="taskType")]
50+
"""
51+
Task type: "memory" (default) for full context layer with SuperRAG built in,
52+
"superrag" for managed RAG as a service.
53+
"""
54+
4955
use_advanced_processing: Annotated[str, PropertyInfo(alias="useAdvancedProcessing")]
5056
"""DEPRECATED: This field is no longer used.
5157

0 commit comments

Comments
 (0)