supermemory 3.0.0a19__py3-none-any.whl → 3.0.0a20__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.
- {supermemory-3.0.0a19.dist-info → supermemory-3.0.0a20.dist-info}/METADATA +32 -49
- supermemory-3.0.0a20.dist-info/RECORD +60 -0
- {supermemory → supermemory_new}/__init__.py +2 -2
- {supermemory → supermemory_new}/_base_client.py +1 -1
- {supermemory → supermemory_new}/_client.py +11 -3
- {supermemory → supermemory_new}/_files.py +1 -1
- {supermemory → supermemory_new}/_response.py +4 -4
- {supermemory → supermemory_new}/_types.py +1 -1
- {supermemory → supermemory_new}/_utils/_logs.py +2 -2
- {supermemory → supermemory_new}/_utils/_resources_proxy.py +4 -4
- supermemory_new/_version.py +4 -0
- {supermemory → supermemory_new}/resources/__init__.py +14 -0
- supermemory_new/resources/connections.py +728 -0
- {supermemory → supermemory_new}/resources/memories.py +138 -95
- supermemory_new/resources/search.py +300 -0
- supermemory_new/types/__init__.py +30 -0
- supermemory_new/types/connection_delete_by_provider_params.py +15 -0
- supermemory/types/memory_upload_file_response.py → supermemory_new/types/connection_delete_by_provider_response.py +3 -3
- supermemory/types/connection_get_response.py → supermemory_new/types/connection_get_by_id_response.py +2 -2
- supermemory_new/types/connection_get_by_tags_params.py +15 -0
- supermemory_new/types/connection_get_by_tags_response.py +25 -0
- supermemory_new/types/connection_import_params.py +15 -0
- supermemory_new/types/connection_list_documents_params.py +15 -0
- supermemory_new/types/connection_list_documents_response.py +29 -0
- supermemory_new/types/connection_list_params.py +15 -0
- supermemory_new/types/connection_list_response.py +29 -0
- supermemory_new/types/memory_list_params.py +34 -0
- supermemory_new/types/memory_list_response.py +91 -0
- supermemory_new/types/search_execute_params.py +93 -0
- supermemory_new/types/search_execute_response.py +55 -0
- supermemory/_version.py +0 -4
- supermemory/resources/connections.py +0 -273
- supermemory/types/__init__.py +0 -17
- supermemory/types/memory_upload_file_params.py +0 -13
- supermemory-3.0.0a19.dist-info/RECORD +0 -48
- {supermemory-3.0.0a19.dist-info → supermemory-3.0.0a20.dist-info}/WHEEL +0 -0
- {supermemory-3.0.0a19.dist-info → supermemory-3.0.0a20.dist-info}/licenses/LICENSE +0 -0
- {supermemory → supermemory_new}/_compat.py +0 -0
- {supermemory → supermemory_new}/_constants.py +0 -0
- {supermemory → supermemory_new}/_exceptions.py +0 -0
- {supermemory → supermemory_new}/_models.py +0 -0
- {supermemory → supermemory_new}/_qs.py +0 -0
- {supermemory → supermemory_new}/_resource.py +0 -0
- {supermemory → supermemory_new}/_streaming.py +0 -0
- {supermemory → supermemory_new}/_utils/__init__.py +0 -0
- {supermemory → supermemory_new}/_utils/_proxy.py +0 -0
- {supermemory → supermemory_new}/_utils/_reflection.py +0 -0
- {supermemory → supermemory_new}/_utils/_streams.py +0 -0
- {supermemory → supermemory_new}/_utils/_sync.py +0 -0
- {supermemory → supermemory_new}/_utils/_transform.py +0 -0
- {supermemory → supermemory_new}/_utils/_typing.py +0 -0
- {supermemory → supermemory_new}/_utils/_utils.py +0 -0
- {supermemory → supermemory_new}/lib/.keep +0 -0
- {supermemory → supermemory_new}/py.typed +0 -0
- {supermemory → supermemory_new}/resources/settings.py +0 -0
- {supermemory → supermemory_new}/types/connection_create_params.py +0 -0
- {supermemory → supermemory_new}/types/connection_create_response.py +0 -0
- {supermemory → supermemory_new}/types/memory_add_params.py +0 -0
- {supermemory → supermemory_new}/types/memory_add_response.py +0 -0
- {supermemory → supermemory_new}/types/memory_get_response.py +0 -0
- {supermemory → supermemory_new}/types/memory_update_params.py +0 -0
- {supermemory → supermemory_new}/types/memory_update_response.py +0 -0
- {supermemory → supermemory_new}/types/setting_get_response.py +0 -0
- {supermemory → supermemory_new}/types/setting_update_params.py +0 -0
- {supermemory → supermemory_new}/types/setting_update_response.py +0 -0
@@ -6,10 +6,10 @@ from pydantic import Field as FieldInfo
|
|
6
6
|
|
7
7
|
from .._models import BaseModel
|
8
8
|
|
9
|
-
__all__ = ["
|
9
|
+
__all__ = ["ConnectionGetByIDResponse"]
|
10
10
|
|
11
11
|
|
12
|
-
class
|
12
|
+
class ConnectionGetByIDResponse(BaseModel):
|
13
13
|
id: str
|
14
14
|
|
15
15
|
created_at: float = FieldInfo(alias="createdAt")
|
@@ -0,0 +1,15 @@
|
|
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 List
|
6
|
+
from typing_extensions import Required, Annotated, TypedDict
|
7
|
+
|
8
|
+
from .._utils import PropertyInfo
|
9
|
+
|
10
|
+
__all__ = ["ConnectionGetByTagsParams"]
|
11
|
+
|
12
|
+
|
13
|
+
class ConnectionGetByTagsParams(TypedDict, total=False):
|
14
|
+
container_tags: Required[Annotated[List[str], PropertyInfo(alias="containerTags")]]
|
15
|
+
"""Comma-separated list of container tags to filter connection by"""
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import Dict, Optional
|
4
|
+
|
5
|
+
from pydantic import Field as FieldInfo
|
6
|
+
|
7
|
+
from .._models import BaseModel
|
8
|
+
|
9
|
+
__all__ = ["ConnectionGetByTagsResponse"]
|
10
|
+
|
11
|
+
|
12
|
+
class ConnectionGetByTagsResponse(BaseModel):
|
13
|
+
id: str
|
14
|
+
|
15
|
+
created_at: float = FieldInfo(alias="createdAt")
|
16
|
+
|
17
|
+
provider: str
|
18
|
+
|
19
|
+
document_limit: Optional[float] = FieldInfo(alias="documentLimit", default=None)
|
20
|
+
|
21
|
+
email: Optional[str] = None
|
22
|
+
|
23
|
+
expires_at: Optional[float] = FieldInfo(alias="expiresAt", default=None)
|
24
|
+
|
25
|
+
metadata: Optional[Dict[str, object]] = None
|
@@ -0,0 +1,15 @@
|
|
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 List
|
6
|
+
from typing_extensions import Annotated, TypedDict
|
7
|
+
|
8
|
+
from .._utils import PropertyInfo
|
9
|
+
|
10
|
+
__all__ = ["ConnectionImportParams"]
|
11
|
+
|
12
|
+
|
13
|
+
class ConnectionImportParams(TypedDict, total=False):
|
14
|
+
container_tags: Annotated[List[str], PropertyInfo(alias="containerTags")]
|
15
|
+
"""Optional comma-separated list of container tags to filter connections by"""
|
@@ -0,0 +1,15 @@
|
|
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 List
|
6
|
+
from typing_extensions import Annotated, TypedDict
|
7
|
+
|
8
|
+
from .._utils import PropertyInfo
|
9
|
+
|
10
|
+
__all__ = ["ConnectionListDocumentsParams"]
|
11
|
+
|
12
|
+
|
13
|
+
class ConnectionListDocumentsParams(TypedDict, total=False):
|
14
|
+
container_tags: Annotated[List[str], PropertyInfo(alias="containerTags")]
|
15
|
+
"""Optional comma-separated list of container tags to filter documents by"""
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import List, Optional
|
4
|
+
from typing_extensions import TypeAlias
|
5
|
+
|
6
|
+
from pydantic import Field as FieldInfo
|
7
|
+
|
8
|
+
from .._models import BaseModel
|
9
|
+
|
10
|
+
__all__ = ["ConnectionListDocumentsResponse", "ConnectionListDocumentsResponseItem"]
|
11
|
+
|
12
|
+
|
13
|
+
class ConnectionListDocumentsResponseItem(BaseModel):
|
14
|
+
id: str
|
15
|
+
|
16
|
+
created_at: str = FieldInfo(alias="createdAt")
|
17
|
+
|
18
|
+
status: str
|
19
|
+
|
20
|
+
summary: Optional[str] = None
|
21
|
+
|
22
|
+
title: Optional[str] = None
|
23
|
+
|
24
|
+
type: str
|
25
|
+
|
26
|
+
updated_at: str = FieldInfo(alias="updatedAt")
|
27
|
+
|
28
|
+
|
29
|
+
ConnectionListDocumentsResponse: TypeAlias = List[ConnectionListDocumentsResponseItem]
|
@@ -0,0 +1,15 @@
|
|
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 List
|
6
|
+
from typing_extensions import Annotated, TypedDict
|
7
|
+
|
8
|
+
from .._utils import PropertyInfo
|
9
|
+
|
10
|
+
__all__ = ["ConnectionListParams"]
|
11
|
+
|
12
|
+
|
13
|
+
class ConnectionListParams(TypedDict, total=False):
|
14
|
+
container_tags: Annotated[List[str], PropertyInfo(alias="containerTags")]
|
15
|
+
"""Optional comma-separated list of container tags to filter documents by"""
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import Dict, List, Optional
|
4
|
+
from typing_extensions import TypeAlias
|
5
|
+
|
6
|
+
from pydantic import Field as FieldInfo
|
7
|
+
|
8
|
+
from .._models import BaseModel
|
9
|
+
|
10
|
+
__all__ = ["ConnectionListResponse", "ConnectionListResponseItem"]
|
11
|
+
|
12
|
+
|
13
|
+
class ConnectionListResponseItem(BaseModel):
|
14
|
+
id: str
|
15
|
+
|
16
|
+
created_at: float = FieldInfo(alias="createdAt")
|
17
|
+
|
18
|
+
provider: str
|
19
|
+
|
20
|
+
document_limit: Optional[float] = FieldInfo(alias="documentLimit", default=None)
|
21
|
+
|
22
|
+
email: Optional[str] = None
|
23
|
+
|
24
|
+
expires_at: Optional[float] = FieldInfo(alias="expiresAt", default=None)
|
25
|
+
|
26
|
+
metadata: Optional[Dict[str, object]] = None
|
27
|
+
|
28
|
+
|
29
|
+
ConnectionListResponse: TypeAlias = List[ConnectionListResponseItem]
|
@@ -0,0 +1,34 @@
|
|
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 List, Union
|
6
|
+
from typing_extensions import Literal, Annotated, TypedDict
|
7
|
+
|
8
|
+
from .._utils import PropertyInfo
|
9
|
+
|
10
|
+
__all__ = ["MemoryListParams"]
|
11
|
+
|
12
|
+
|
13
|
+
class MemoryListParams(TypedDict, total=False):
|
14
|
+
container_tags: Annotated[List[str], PropertyInfo(alias="containerTags")]
|
15
|
+
"""Optional tags this memory should be containerized by.
|
16
|
+
|
17
|
+
This can be an ID for your user, a project ID, or any other identifier you wish
|
18
|
+
to use to group memories.
|
19
|
+
"""
|
20
|
+
|
21
|
+
filters: str
|
22
|
+
"""Optional filters to apply to the search"""
|
23
|
+
|
24
|
+
limit: Union[str, float]
|
25
|
+
"""Number of items per page"""
|
26
|
+
|
27
|
+
order: Literal["asc", "desc"]
|
28
|
+
"""Sort order"""
|
29
|
+
|
30
|
+
page: Union[str, float]
|
31
|
+
"""Page number to fetch"""
|
32
|
+
|
33
|
+
sort: Literal["createdAt", "updatedAt"]
|
34
|
+
"""Field to sort by"""
|
@@ -0,0 +1,91 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import Dict, List, Union, Optional
|
4
|
+
from datetime import datetime
|
5
|
+
from typing_extensions import Literal
|
6
|
+
|
7
|
+
from pydantic import Field as FieldInfo
|
8
|
+
|
9
|
+
from .._models import BaseModel
|
10
|
+
|
11
|
+
__all__ = ["MemoryListResponse", "Memory", "Pagination"]
|
12
|
+
|
13
|
+
|
14
|
+
class Memory(BaseModel):
|
15
|
+
id: str
|
16
|
+
"""Unique identifier of the memory."""
|
17
|
+
|
18
|
+
connection_id: Optional[str] = FieldInfo(alias="connectionId", default=None)
|
19
|
+
"""Optional ID of connection the memory was created from.
|
20
|
+
|
21
|
+
This is useful for identifying the source of the memory.
|
22
|
+
"""
|
23
|
+
|
24
|
+
created_at: datetime = FieldInfo(alias="createdAt")
|
25
|
+
"""Creation timestamp"""
|
26
|
+
|
27
|
+
custom_id: Optional[str] = FieldInfo(alias="customId", default=None)
|
28
|
+
"""Optional custom ID of the memory.
|
29
|
+
|
30
|
+
This could be an ID from your database that will uniquely identify this memory.
|
31
|
+
"""
|
32
|
+
|
33
|
+
metadata: Union[str, float, bool, Dict[str, object], List[object], None] = None
|
34
|
+
"""Optional metadata for the memory.
|
35
|
+
|
36
|
+
This is used to store additional information about the memory. You can use this
|
37
|
+
to store any additional information you need about the memory. Metadata can be
|
38
|
+
filtered through. Keys must be strings and are case sensitive. Values can be
|
39
|
+
strings, numbers, or booleans. You cannot nest objects.
|
40
|
+
"""
|
41
|
+
|
42
|
+
status: Literal["unknown", "queued", "extracting", "chunking", "embedding", "indexing", "done", "failed"]
|
43
|
+
"""Status of the memory"""
|
44
|
+
|
45
|
+
summary: Optional[str] = None
|
46
|
+
"""Summary of the memory content"""
|
47
|
+
|
48
|
+
title: Optional[str] = None
|
49
|
+
"""Title of the memory"""
|
50
|
+
|
51
|
+
type: Literal[
|
52
|
+
"text",
|
53
|
+
"pdf",
|
54
|
+
"tweet",
|
55
|
+
"google_doc",
|
56
|
+
"google_slide",
|
57
|
+
"google_sheet",
|
58
|
+
"image",
|
59
|
+
"video",
|
60
|
+
"notion_doc",
|
61
|
+
"webpage",
|
62
|
+
"onedrive",
|
63
|
+
]
|
64
|
+
"""Type of the memory"""
|
65
|
+
|
66
|
+
updated_at: datetime = FieldInfo(alias="updatedAt")
|
67
|
+
"""Last update timestamp"""
|
68
|
+
|
69
|
+
container_tags: Optional[List[str]] = FieldInfo(alias="containerTags", default=None)
|
70
|
+
"""Optional tags this memory should be containerized by.
|
71
|
+
|
72
|
+
This can be an ID for your user, a project ID, or any other identifier you wish
|
73
|
+
to use to group memories.
|
74
|
+
"""
|
75
|
+
|
76
|
+
|
77
|
+
class Pagination(BaseModel):
|
78
|
+
current_page: float = FieldInfo(alias="currentPage")
|
79
|
+
|
80
|
+
limit: float
|
81
|
+
|
82
|
+
total_items: float = FieldInfo(alias="totalItems")
|
83
|
+
|
84
|
+
total_pages: float = FieldInfo(alias="totalPages")
|
85
|
+
|
86
|
+
|
87
|
+
class MemoryListResponse(BaseModel):
|
88
|
+
memories: List[Memory]
|
89
|
+
|
90
|
+
pagination: Pagination
|
91
|
+
"""Pagination metadata"""
|
@@ -0,0 +1,93 @@
|
|
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, List, Union, Iterable
|
6
|
+
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
|
7
|
+
|
8
|
+
from .._utils import PropertyInfo
|
9
|
+
|
10
|
+
__all__ = ["SearchExecuteParams", "Filters", "FiltersUnionMember0"]
|
11
|
+
|
12
|
+
|
13
|
+
class SearchExecuteParams(TypedDict, total=False):
|
14
|
+
q: Required[str]
|
15
|
+
"""Search query string"""
|
16
|
+
|
17
|
+
categories_filter: Annotated[
|
18
|
+
List[Literal["technology", "science", "business", "health"]], PropertyInfo(alias="categoriesFilter")
|
19
|
+
]
|
20
|
+
"""Optional category filters"""
|
21
|
+
|
22
|
+
chunk_threshold: Annotated[float, PropertyInfo(alias="chunkThreshold")]
|
23
|
+
"""Threshold / sensitivity for chunk selection.
|
24
|
+
|
25
|
+
0 is least sensitive (returns most chunks, more results), 1 is most sensitive
|
26
|
+
(returns lesser chunks, accurate results)
|
27
|
+
"""
|
28
|
+
|
29
|
+
container_tags: Annotated[List[str], PropertyInfo(alias="containerTags")]
|
30
|
+
"""Optional tags this search should be containerized by.
|
31
|
+
|
32
|
+
This can be an ID for your user, a project ID, or any other identifier you wish
|
33
|
+
to use to filter memories.
|
34
|
+
"""
|
35
|
+
|
36
|
+
doc_id: Annotated[str, PropertyInfo(alias="docId")]
|
37
|
+
"""Optional document ID to search within.
|
38
|
+
|
39
|
+
You can use this to find chunks in a very large document.
|
40
|
+
"""
|
41
|
+
|
42
|
+
document_threshold: Annotated[float, PropertyInfo(alias="documentThreshold")]
|
43
|
+
"""Threshold / sensitivity for document selection.
|
44
|
+
|
45
|
+
0 is least sensitive (returns most documents, more results), 1 is most sensitive
|
46
|
+
(returns lesser documents, accurate results)
|
47
|
+
"""
|
48
|
+
|
49
|
+
filters: Filters
|
50
|
+
"""Optional filters to apply to the search"""
|
51
|
+
|
52
|
+
include_full_docs: Annotated[bool, PropertyInfo(alias="includeFullDocs")]
|
53
|
+
"""If true, include full document in the response.
|
54
|
+
|
55
|
+
This is helpful if you want a chatbot to know the full context of the document.
|
56
|
+
"""
|
57
|
+
|
58
|
+
include_summary: Annotated[bool, PropertyInfo(alias="includeSummary")]
|
59
|
+
"""If true, include document summary in the response.
|
60
|
+
|
61
|
+
This is helpful if you want a chatbot to know the full context of the document.
|
62
|
+
"""
|
63
|
+
|
64
|
+
limit: int
|
65
|
+
"""Maximum number of results to return"""
|
66
|
+
|
67
|
+
only_matching_chunks: Annotated[bool, PropertyInfo(alias="onlyMatchingChunks")]
|
68
|
+
"""If true, only return matching chunks without context.
|
69
|
+
|
70
|
+
Normally, we send the previous and next chunk to provide more context for LLMs.
|
71
|
+
If you only want the matching chunk, set this to true.
|
72
|
+
"""
|
73
|
+
|
74
|
+
rerank: bool
|
75
|
+
"""If true, rerank the results based on the query.
|
76
|
+
|
77
|
+
This is helpful if you want to ensure the most relevant results are returned.
|
78
|
+
"""
|
79
|
+
|
80
|
+
rewrite_query: Annotated[bool, PropertyInfo(alias="rewriteQuery")]
|
81
|
+
"""If true, rewrites the query to make it easier to find documents.
|
82
|
+
|
83
|
+
This increases the latency by about 400ms
|
84
|
+
"""
|
85
|
+
|
86
|
+
|
87
|
+
class FiltersUnionMember0(TypedDict, total=False):
|
88
|
+
and_: Annotated[Iterable[object], PropertyInfo(alias="AND")]
|
89
|
+
|
90
|
+
or_: Annotated[Iterable[object], PropertyInfo(alias="OR")]
|
91
|
+
|
92
|
+
|
93
|
+
Filters: TypeAlias = Union[FiltersUnionMember0, Dict[str, object]]
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import Dict, List, Optional
|
4
|
+
from datetime import datetime
|
5
|
+
|
6
|
+
from pydantic import Field as FieldInfo
|
7
|
+
|
8
|
+
from .._models import BaseModel
|
9
|
+
|
10
|
+
__all__ = ["SearchExecuteResponse", "Result", "ResultChunk"]
|
11
|
+
|
12
|
+
|
13
|
+
class ResultChunk(BaseModel):
|
14
|
+
content: str
|
15
|
+
"""Content of the matching chunk"""
|
16
|
+
|
17
|
+
is_relevant: bool = FieldInfo(alias="isRelevant")
|
18
|
+
"""Whether this chunk is relevant to the query"""
|
19
|
+
|
20
|
+
score: float
|
21
|
+
"""Similarity score for this chunk"""
|
22
|
+
|
23
|
+
|
24
|
+
class Result(BaseModel):
|
25
|
+
chunks: List[ResultChunk]
|
26
|
+
"""Matching content chunks from the document"""
|
27
|
+
|
28
|
+
created_at: datetime = FieldInfo(alias="createdAt")
|
29
|
+
"""Document creation date"""
|
30
|
+
|
31
|
+
document_id: str = FieldInfo(alias="documentId")
|
32
|
+
"""ID of the matching document"""
|
33
|
+
|
34
|
+
metadata: Optional[Dict[str, object]] = None
|
35
|
+
"""Document metadata"""
|
36
|
+
|
37
|
+
score: float
|
38
|
+
"""Relevance score of the match"""
|
39
|
+
|
40
|
+
title: Optional[str] = None
|
41
|
+
"""Document title"""
|
42
|
+
|
43
|
+
updated_at: datetime = FieldInfo(alias="updatedAt")
|
44
|
+
"""Document last update date"""
|
45
|
+
|
46
|
+
summary: Optional[str] = None
|
47
|
+
"""Document summary"""
|
48
|
+
|
49
|
+
|
50
|
+
class SearchExecuteResponse(BaseModel):
|
51
|
+
results: List[Result]
|
52
|
+
|
53
|
+
timing: float
|
54
|
+
|
55
|
+
total: float
|
supermemory/_version.py
DELETED