Skip to content

Commit a776c2c

Browse files
feat(api): api update
1 parent 1155c43 commit a776c2c

15 files changed

+87
-217
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 18
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-e61d7828c965d3ed4a4e638705dd71a5572291216a4dd3a9d4f52cbde04d47e7.yml
3-
openapi_spec_hash: 2623fa1606f109694056e589c06eeeb5
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-4565eada92d3d7a0434e5896c283f460888b24f3ed5389f32bcbc2b104fb52df.yml
3+
openapi_spec_hash: 124bf13a8b2727edb1b10dd2274cc2d2
44
config_hash: a478b24249ee4f53abfb5787ca4daf8b

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ client = Supermemory()
161161

162162
try:
163163
client.memories.add(
164-
content="This is a detailed article about machine learning concepts...",
164+
content="content",
165165
)
166166
except supermemory.APIConnectionError as e:
167167
print("The server could not be reached")
@@ -206,7 +206,7 @@ client = Supermemory(
206206

207207
# Or, configure per-request:
208208
client.with_options(max_retries=5).memories.add(
209-
content="This is a detailed article about machine learning concepts...",
209+
content="content",
210210
)
211211
```
212212

@@ -231,7 +231,7 @@ client = Supermemory(
231231

232232
# Override per-request:
233233
client.with_options(timeout=5.0).memories.add(
234-
content="This is a detailed article about machine learning concepts...",
234+
content="content",
235235
)
236236
```
237237

@@ -274,7 +274,7 @@ from supermemory import Supermemory
274274

275275
client = Supermemory()
276276
response = client.memories.with_raw_response.add(
277-
content="This is a detailed article about machine learning concepts...",
277+
content="content",
278278
)
279279
print(response.headers.get('X-My-Header'))
280280

@@ -294,7 +294,7 @@ To stream the response body, use `.with_streaming_response` instead, which requi
294294

295295
```python
296296
with client.memories.with_streaming_response.add(
297-
content="This is a detailed article about machine learning concepts...",
297+
content="content",
298298
) as response:
299299
print(response.headers.get("X-My-Header"))
300300

src/supermemory/resources/documents.py

Lines changed: 10 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -244,28 +244,13 @@ def add(
244244
content: The content to extract and process into a document. This can be a URL to a
245245
website, a PDF, an image, or a video.
246246
247-
Plaintext: Any plaintext format
248-
249-
URL: A URL to a website, PDF, image, or video
250-
251-
We automatically detect the content type from the url's response format.
252-
253-
container_tag: Optional tag this document should be containerized by. This can be an ID for
254-
your user, a project ID, or any other identifier you wish to use to group
255-
documents.
256-
257-
container_tags: (DEPRECATED: Use containerTag instead) Optional tags this document should be
258-
containerized by. This can be an ID for your user, a project ID, or any other
259-
identifier you wish to use to group documents.
247+
container_tag: Optional tag this document should be containerized by. Max 100 characters,
248+
alphanumeric with hyphens and underscores only.
260249
261-
custom_id: Optional custom ID of the document. This could be an ID from your database that
262-
will uniquely identify this document.
250+
custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
251+
hyphens and underscores only.
263252
264-
metadata: Optional metadata for the document. This is used to store additional information
265-
about the document. You can use this to store any additional information you
266-
need about the document. Metadata can be filtered through. Keys must be strings
267-
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
268-
nest objects.
253+
metadata: Optional metadata for the document.
269254
270255
extra_headers: Send extra headers
271256
@@ -612,28 +597,13 @@ async def add(
612597
content: The content to extract and process into a document. This can be a URL to a
613598
website, a PDF, an image, or a video.
614599
615-
Plaintext: Any plaintext format
616-
617-
URL: A URL to a website, PDF, image, or video
618-
619-
We automatically detect the content type from the url's response format.
620-
621-
container_tag: Optional tag this document should be containerized by. This can be an ID for
622-
your user, a project ID, or any other identifier you wish to use to group
623-
documents.
624-
625-
container_tags: (DEPRECATED: Use containerTag instead) Optional tags this document should be
626-
containerized by. This can be an ID for your user, a project ID, or any other
627-
identifier you wish to use to group documents.
600+
container_tag: Optional tag this document should be containerized by. Max 100 characters,
601+
alphanumeric with hyphens and underscores only.
628602
629-
custom_id: Optional custom ID of the document. This could be an ID from your database that
630-
will uniquely identify this document.
603+
custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
604+
hyphens and underscores only.
631605
632-
metadata: Optional metadata for the document. This is used to store additional information
633-
about the document. You can use this to store any additional information you
634-
need about the document. Metadata can be filtered through. Keys must be strings
635-
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
636-
nest objects.
606+
metadata: Optional metadata for the document.
637607
638608
extra_headers: Send extra headers
639609

src/supermemory/resources/memories.py

Lines changed: 10 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -244,28 +244,13 @@ def add(
244244
content: The content to extract and process into a document. This can be a URL to a
245245
website, a PDF, an image, or a video.
246246
247-
Plaintext: Any plaintext format
248-
249-
URL: A URL to a website, PDF, image, or video
250-
251-
We automatically detect the content type from the url's response format.
252-
253-
container_tag: Optional tag this document should be containerized by. This can be an ID for
254-
your user, a project ID, or any other identifier you wish to use to group
255-
documents.
256-
257-
container_tags: (DEPRECATED: Use containerTag instead) Optional tags this document should be
258-
containerized by. This can be an ID for your user, a project ID, or any other
259-
identifier you wish to use to group documents.
247+
container_tag: Optional tag this document should be containerized by. Max 100 characters,
248+
alphanumeric with hyphens and underscores only.
260249
261-
custom_id: Optional custom ID of the document. This could be an ID from your database that
262-
will uniquely identify this document.
250+
custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
251+
hyphens and underscores only.
263252
264-
metadata: Optional metadata for the document. This is used to store additional information
265-
about the document. You can use this to store any additional information you
266-
need about the document. Metadata can be filtered through. Keys must be strings
267-
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
268-
nest objects.
253+
metadata: Optional metadata for the document.
269254
270255
extra_headers: Send extra headers
271256
@@ -612,28 +597,13 @@ async def add(
612597
content: The content to extract and process into a document. This can be a URL to a
613598
website, a PDF, an image, or a video.
614599
615-
Plaintext: Any plaintext format
616-
617-
URL: A URL to a website, PDF, image, or video
618-
619-
We automatically detect the content type from the url's response format.
620-
621-
container_tag: Optional tag this document should be containerized by. This can be an ID for
622-
your user, a project ID, or any other identifier you wish to use to group
623-
documents.
624-
625-
container_tags: (DEPRECATED: Use containerTag instead) Optional tags this document should be
626-
containerized by. This can be an ID for your user, a project ID, or any other
627-
identifier you wish to use to group documents.
600+
container_tag: Optional tag this document should be containerized by. Max 100 characters,
601+
alphanumeric with hyphens and underscores only.
628602
629-
custom_id: Optional custom ID of the document. This could be an ID from your database that
630-
will uniquely identify this document.
603+
custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
604+
hyphens and underscores only.
631605
632-
metadata: Optional metadata for the document. This is used to store additional information
633-
about the document. You can use this to store any additional information you
634-
need about the document. Metadata can be filtered through. Keys must be strings
635-
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
636-
nest objects.
606+
metadata: Optional metadata for the document.
637607
638608
extra_headers: Send extra headers
639609

src/supermemory/types/document_add_params.py

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,21 @@ class DocumentAddParams(TypedDict, total=False):
1616
"""The content to extract and process into a document.
1717
1818
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.
2519
"""
2620

2721
container_tag: Annotated[str, PropertyInfo(alias="containerTag")]
2822
"""Optional tag this document should be containerized by.
2923
30-
This can be an ID for your user, a project ID, or any other identifier you wish
31-
to use to group documents.
24+
Max 100 characters, alphanumeric with hyphens and underscores only.
3225
"""
3326

3427
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-
"""
4028

4129
custom_id: Annotated[str, PropertyInfo(alias="customId")]
4230
"""Optional custom ID of the document.
4331
44-
This could be an ID from your database that will uniquely identify this
45-
document.
32+
Max 100 characters, alphanumeric with hyphens and underscores only.
4633
"""
4734

4835
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]]
49-
"""Optional metadata for the document.
50-
51-
This is used to store additional information about the document. You can use
52-
this to store any additional information you need about the document. Metadata
53-
can be filtered through. Keys must be strings and are case sensitive. Values can
54-
be strings, numbers, or booleans. You cannot nest objects.
55-
"""
36+
"""Optional metadata for the document."""

src/supermemory/types/document_add_response.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@
77

88
class DocumentAddResponse(BaseModel):
99
id: str
10+
"""Unique identifier of the document"""
1011

1112
status: str
13+
"""Status of the document"""

src/supermemory/types/document_update_response.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@
77

88
class DocumentUpdateResponse(BaseModel):
99
id: str
10+
"""Unique identifier of the document"""
1011

1112
status: str
13+
"""Status of the document"""

src/supermemory/types/document_upload_file_response.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@
77

88
class DocumentUploadFileResponse(BaseModel):
99
id: str
10+
"""Unique identifier of the document"""
1011

1112
status: str
13+
"""Status of the document"""

src/supermemory/types/memory_add_params.py

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,21 @@ class MemoryAddParams(TypedDict, total=False):
1616
"""The content to extract and process into a document.
1717
1818
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.
2519
"""
2620

2721
container_tag: Annotated[str, PropertyInfo(alias="containerTag")]
2822
"""Optional tag this document should be containerized by.
2923
30-
This can be an ID for your user, a project ID, or any other identifier you wish
31-
to use to group documents.
24+
Max 100 characters, alphanumeric with hyphens and underscores only.
3225
"""
3326

3427
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-
"""
4028

4129
custom_id: Annotated[str, PropertyInfo(alias="customId")]
4230
"""Optional custom ID of the document.
4331
44-
This could be an ID from your database that will uniquely identify this
45-
document.
32+
Max 100 characters, alphanumeric with hyphens and underscores only.
4633
"""
4734

4835
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]]
49-
"""Optional metadata for the document.
50-
51-
This is used to store additional information about the document. You can use
52-
this to store any additional information you need about the document. Metadata
53-
can be filtered through. Keys must be strings and are case sensitive. Values can
54-
be strings, numbers, or booleans. You cannot nest objects.
55-
"""
36+
"""Optional metadata for the document."""

src/supermemory/types/memory_add_response.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@
77

88
class MemoryAddResponse(BaseModel):
99
id: str
10+
"""Unique identifier of the document"""
1011

1112
status: str
13+
"""Status of the document"""

0 commit comments

Comments
 (0)