supermemory 3.0.0a2__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.0a2.dist-info → supermemory-3.0.0a20.dist-info}/METADATA +32 -32
- 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}/_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 +135 -1
- 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_new/types/connection_delete_by_provider_response.py +11 -0
- 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 -15
- supermemory-3.0.0a2.dist-info/RECORD +0 -46
- {supermemory-3.0.0a2.dist-info → supermemory-3.0.0a20.dist-info}/WHEEL +0 -0
- {supermemory-3.0.0a2.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}/_files.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
@@ -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
@@ -1,273 +0,0 @@
|
|
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, Optional
|
6
|
-
from typing_extensions import Literal
|
7
|
-
|
8
|
-
import httpx
|
9
|
-
|
10
|
-
from ..types import connection_create_params
|
11
|
-
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
12
|
-
from .._utils import maybe_transform, async_maybe_transform
|
13
|
-
from .._compat import cached_property
|
14
|
-
from .._resource import SyncAPIResource, AsyncAPIResource
|
15
|
-
from .._response import (
|
16
|
-
to_raw_response_wrapper,
|
17
|
-
to_streamed_response_wrapper,
|
18
|
-
async_to_raw_response_wrapper,
|
19
|
-
async_to_streamed_response_wrapper,
|
20
|
-
)
|
21
|
-
from .._base_client import make_request_options
|
22
|
-
from ..types.connection_get_response import ConnectionGetResponse
|
23
|
-
from ..types.connection_create_response import ConnectionCreateResponse
|
24
|
-
|
25
|
-
__all__ = ["ConnectionsResource", "AsyncConnectionsResource"]
|
26
|
-
|
27
|
-
|
28
|
-
class ConnectionsResource(SyncAPIResource):
|
29
|
-
@cached_property
|
30
|
-
def with_raw_response(self) -> ConnectionsResourceWithRawResponse:
|
31
|
-
"""
|
32
|
-
This property can be used as a prefix for any HTTP method call to return
|
33
|
-
the raw response object instead of the parsed content.
|
34
|
-
|
35
|
-
For more information, see https://www.github.com/supermemoryai/python-sdk#accessing-raw-response-data-eg-headers
|
36
|
-
"""
|
37
|
-
return ConnectionsResourceWithRawResponse(self)
|
38
|
-
|
39
|
-
@cached_property
|
40
|
-
def with_streaming_response(self) -> ConnectionsResourceWithStreamingResponse:
|
41
|
-
"""
|
42
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
43
|
-
|
44
|
-
For more information, see https://www.github.com/supermemoryai/python-sdk#with_streaming_response
|
45
|
-
"""
|
46
|
-
return ConnectionsResourceWithStreamingResponse(self)
|
47
|
-
|
48
|
-
def create(
|
49
|
-
self,
|
50
|
-
provider: Literal["notion", "google-drive", "onedrive"],
|
51
|
-
*,
|
52
|
-
container_tags: List[str] | NotGiven = NOT_GIVEN,
|
53
|
-
document_limit: int | NotGiven = NOT_GIVEN,
|
54
|
-
metadata: Optional[Dict[str, Union[str, float, bool]]] | NotGiven = NOT_GIVEN,
|
55
|
-
redirect_url: str | NotGiven = NOT_GIVEN,
|
56
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
57
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
58
|
-
extra_headers: Headers | None = None,
|
59
|
-
extra_query: Query | None = None,
|
60
|
-
extra_body: Body | None = None,
|
61
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
62
|
-
) -> ConnectionCreateResponse:
|
63
|
-
"""
|
64
|
-
Initialize connection and get authorization URL
|
65
|
-
|
66
|
-
Args:
|
67
|
-
extra_headers: Send extra headers
|
68
|
-
|
69
|
-
extra_query: Add additional query parameters to the request
|
70
|
-
|
71
|
-
extra_body: Add additional JSON properties to the request
|
72
|
-
|
73
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
74
|
-
"""
|
75
|
-
if not provider:
|
76
|
-
raise ValueError(f"Expected a non-empty value for `provider` but received {provider!r}")
|
77
|
-
return self._post(
|
78
|
-
f"/v3/connections/{provider}",
|
79
|
-
body=maybe_transform(
|
80
|
-
{
|
81
|
-
"container_tags": container_tags,
|
82
|
-
"document_limit": document_limit,
|
83
|
-
"metadata": metadata,
|
84
|
-
"redirect_url": redirect_url,
|
85
|
-
},
|
86
|
-
connection_create_params.ConnectionCreateParams,
|
87
|
-
),
|
88
|
-
options=make_request_options(
|
89
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
90
|
-
),
|
91
|
-
cast_to=ConnectionCreateResponse,
|
92
|
-
)
|
93
|
-
|
94
|
-
def get(
|
95
|
-
self,
|
96
|
-
connection_id: str,
|
97
|
-
*,
|
98
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
99
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
100
|
-
extra_headers: Headers | None = None,
|
101
|
-
extra_query: Query | None = None,
|
102
|
-
extra_body: Body | None = None,
|
103
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
104
|
-
) -> ConnectionGetResponse:
|
105
|
-
"""
|
106
|
-
Get connection details with id
|
107
|
-
|
108
|
-
Args:
|
109
|
-
extra_headers: Send extra headers
|
110
|
-
|
111
|
-
extra_query: Add additional query parameters to the request
|
112
|
-
|
113
|
-
extra_body: Add additional JSON properties to the request
|
114
|
-
|
115
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
116
|
-
"""
|
117
|
-
if not connection_id:
|
118
|
-
raise ValueError(f"Expected a non-empty value for `connection_id` but received {connection_id!r}")
|
119
|
-
return self._get(
|
120
|
-
f"/v3/connections/{connection_id}",
|
121
|
-
options=make_request_options(
|
122
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
123
|
-
),
|
124
|
-
cast_to=ConnectionGetResponse,
|
125
|
-
)
|
126
|
-
|
127
|
-
|
128
|
-
class AsyncConnectionsResource(AsyncAPIResource):
|
129
|
-
@cached_property
|
130
|
-
def with_raw_response(self) -> AsyncConnectionsResourceWithRawResponse:
|
131
|
-
"""
|
132
|
-
This property can be used as a prefix for any HTTP method call to return
|
133
|
-
the raw response object instead of the parsed content.
|
134
|
-
|
135
|
-
For more information, see https://www.github.com/supermemoryai/python-sdk#accessing-raw-response-data-eg-headers
|
136
|
-
"""
|
137
|
-
return AsyncConnectionsResourceWithRawResponse(self)
|
138
|
-
|
139
|
-
@cached_property
|
140
|
-
def with_streaming_response(self) -> AsyncConnectionsResourceWithStreamingResponse:
|
141
|
-
"""
|
142
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
143
|
-
|
144
|
-
For more information, see https://www.github.com/supermemoryai/python-sdk#with_streaming_response
|
145
|
-
"""
|
146
|
-
return AsyncConnectionsResourceWithStreamingResponse(self)
|
147
|
-
|
148
|
-
async def create(
|
149
|
-
self,
|
150
|
-
provider: Literal["notion", "google-drive", "onedrive"],
|
151
|
-
*,
|
152
|
-
container_tags: List[str] | NotGiven = NOT_GIVEN,
|
153
|
-
document_limit: int | NotGiven = NOT_GIVEN,
|
154
|
-
metadata: Optional[Dict[str, Union[str, float, bool]]] | NotGiven = NOT_GIVEN,
|
155
|
-
redirect_url: str | NotGiven = NOT_GIVEN,
|
156
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
157
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
158
|
-
extra_headers: Headers | None = None,
|
159
|
-
extra_query: Query | None = None,
|
160
|
-
extra_body: Body | None = None,
|
161
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
162
|
-
) -> ConnectionCreateResponse:
|
163
|
-
"""
|
164
|
-
Initialize connection and get authorization URL
|
165
|
-
|
166
|
-
Args:
|
167
|
-
extra_headers: Send extra headers
|
168
|
-
|
169
|
-
extra_query: Add additional query parameters to the request
|
170
|
-
|
171
|
-
extra_body: Add additional JSON properties to the request
|
172
|
-
|
173
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
174
|
-
"""
|
175
|
-
if not provider:
|
176
|
-
raise ValueError(f"Expected a non-empty value for `provider` but received {provider!r}")
|
177
|
-
return await self._post(
|
178
|
-
f"/v3/connections/{provider}",
|
179
|
-
body=await async_maybe_transform(
|
180
|
-
{
|
181
|
-
"container_tags": container_tags,
|
182
|
-
"document_limit": document_limit,
|
183
|
-
"metadata": metadata,
|
184
|
-
"redirect_url": redirect_url,
|
185
|
-
},
|
186
|
-
connection_create_params.ConnectionCreateParams,
|
187
|
-
),
|
188
|
-
options=make_request_options(
|
189
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
190
|
-
),
|
191
|
-
cast_to=ConnectionCreateResponse,
|
192
|
-
)
|
193
|
-
|
194
|
-
async def get(
|
195
|
-
self,
|
196
|
-
connection_id: str,
|
197
|
-
*,
|
198
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
199
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
200
|
-
extra_headers: Headers | None = None,
|
201
|
-
extra_query: Query | None = None,
|
202
|
-
extra_body: Body | None = None,
|
203
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
204
|
-
) -> ConnectionGetResponse:
|
205
|
-
"""
|
206
|
-
Get connection details with id
|
207
|
-
|
208
|
-
Args:
|
209
|
-
extra_headers: Send extra headers
|
210
|
-
|
211
|
-
extra_query: Add additional query parameters to the request
|
212
|
-
|
213
|
-
extra_body: Add additional JSON properties to the request
|
214
|
-
|
215
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
216
|
-
"""
|
217
|
-
if not connection_id:
|
218
|
-
raise ValueError(f"Expected a non-empty value for `connection_id` but received {connection_id!r}")
|
219
|
-
return await self._get(
|
220
|
-
f"/v3/connections/{connection_id}",
|
221
|
-
options=make_request_options(
|
222
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
223
|
-
),
|
224
|
-
cast_to=ConnectionGetResponse,
|
225
|
-
)
|
226
|
-
|
227
|
-
|
228
|
-
class ConnectionsResourceWithRawResponse:
|
229
|
-
def __init__(self, connections: ConnectionsResource) -> None:
|
230
|
-
self._connections = connections
|
231
|
-
|
232
|
-
self.create = to_raw_response_wrapper(
|
233
|
-
connections.create,
|
234
|
-
)
|
235
|
-
self.get = to_raw_response_wrapper(
|
236
|
-
connections.get,
|
237
|
-
)
|
238
|
-
|
239
|
-
|
240
|
-
class AsyncConnectionsResourceWithRawResponse:
|
241
|
-
def __init__(self, connections: AsyncConnectionsResource) -> None:
|
242
|
-
self._connections = connections
|
243
|
-
|
244
|
-
self.create = async_to_raw_response_wrapper(
|
245
|
-
connections.create,
|
246
|
-
)
|
247
|
-
self.get = async_to_raw_response_wrapper(
|
248
|
-
connections.get,
|
249
|
-
)
|
250
|
-
|
251
|
-
|
252
|
-
class ConnectionsResourceWithStreamingResponse:
|
253
|
-
def __init__(self, connections: ConnectionsResource) -> None:
|
254
|
-
self._connections = connections
|
255
|
-
|
256
|
-
self.create = to_streamed_response_wrapper(
|
257
|
-
connections.create,
|
258
|
-
)
|
259
|
-
self.get = to_streamed_response_wrapper(
|
260
|
-
connections.get,
|
261
|
-
)
|
262
|
-
|
263
|
-
|
264
|
-
class AsyncConnectionsResourceWithStreamingResponse:
|
265
|
-
def __init__(self, connections: AsyncConnectionsResource) -> None:
|
266
|
-
self._connections = connections
|
267
|
-
|
268
|
-
self.create = async_to_streamed_response_wrapper(
|
269
|
-
connections.create,
|
270
|
-
)
|
271
|
-
self.get = async_to_streamed_response_wrapper(
|
272
|
-
connections.get,
|
273
|
-
)
|
supermemory/types/__init__.py
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
-
|
3
|
-
from __future__ import annotations
|
4
|
-
|
5
|
-
from .memory_add_params import MemoryAddParams as MemoryAddParams
|
6
|
-
from .memory_add_response import MemoryAddResponse as MemoryAddResponse
|
7
|
-
from .memory_get_response import MemoryGetResponse as MemoryGetResponse
|
8
|
-
from .memory_update_params import MemoryUpdateParams as MemoryUpdateParams
|
9
|
-
from .setting_get_response import SettingGetResponse as SettingGetResponse
|
10
|
-
from .setting_update_params import SettingUpdateParams as SettingUpdateParams
|
11
|
-
from .memory_update_response import MemoryUpdateResponse as MemoryUpdateResponse
|
12
|
-
from .connection_get_response import ConnectionGetResponse as ConnectionGetResponse
|
13
|
-
from .setting_update_response import SettingUpdateResponse as SettingUpdateResponse
|
14
|
-
from .connection_create_params import ConnectionCreateParams as ConnectionCreateParams
|
15
|
-
from .connection_create_response import ConnectionCreateResponse as ConnectionCreateResponse
|
@@ -1,46 +0,0 @@
|
|
1
|
-
supermemory/__init__.py,sha256=PDWpv0_OWO8lBFh21lQl5k0zrlBzcGf643CKXRoQgzM,2664
|
2
|
-
supermemory/_base_client.py,sha256=r19iD2PFXhH75y9v6TNYPwd5NdYjZj3shFhuUnHZqlU,66720
|
3
|
-
supermemory/_client.py,sha256=IMo1vJ8G5Ha05IPVyuUEFXrCOY83gKJGB6sdyAb-rUk,16388
|
4
|
-
supermemory/_compat.py,sha256=VWemUKbj6DDkQ-O4baSpHVLJafotzeXmCQGJugfVTIw,6580
|
5
|
-
supermemory/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
|
6
|
-
supermemory/_exceptions.py,sha256=5nnX7W8L_eA6LkX3SBl7csJy5d9QEcDqRVuwDq8wVh8,3230
|
7
|
-
supermemory/_files.py,sha256=mf4dOgL4b0ryyZlbqLhggD3GVgDf6XxdGFAgce01ugE,3549
|
8
|
-
supermemory/_models.py,sha256=G1vczEodX0vUySeVKbF-mbzlaObNL1oVAYH4c65agRk,29131
|
9
|
-
supermemory/_qs.py,sha256=AOkSz4rHtK4YI3ZU_kzea-zpwBUgEY8WniGmTPyEimc,4846
|
10
|
-
supermemory/_resource.py,sha256=_wuaB1exMy-l-qqdJJdTv15hH5qBSN2Rj9CFwjXTZJU,1130
|
11
|
-
supermemory/_response.py,sha256=Yh869-U8INkojKZHFsNw69z5Y2BrK2isgRJ8mifEURM,28848
|
12
|
-
supermemory/_streaming.py,sha256=MGbosxSTqq0_JG52hvH2Z-Mr_Y95ws5UdFw77_iYukc,10120
|
13
|
-
supermemory/_types.py,sha256=ohS8PFDHBFM-0ua6YsUlS55BPHft3xY6DhiIKaYrlN0,6202
|
14
|
-
supermemory/_version.py,sha256=DjAIaWTz347eKyBKuH3jzyz6mfi63Q9mefpND-W6XbY,171
|
15
|
-
supermemory/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
|
-
supermemory/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
|
17
|
-
supermemory/_utils/_logs.py,sha256=iceljYaEUb4Q4q1SgbSzwSrlJA64ISbaccczzZ8Z9Vg,789
|
18
|
-
supermemory/_utils/_proxy.py,sha256=aglnj2yBTDyGX9Akk2crZHrl10oqRmceUy2Zp008XEs,1975
|
19
|
-
supermemory/_utils/_reflection.py,sha256=ZmGkIgT_PuwedyNBrrKGbxoWtkpytJNU1uU4QHnmEMU,1364
|
20
|
-
supermemory/_utils/_resources_proxy.py,sha256=9MqlmhIEoyeVraNz90vnq1pS6EOxSqvYVlVK-CvLMmQ,614
|
21
|
-
supermemory/_utils/_streams.py,sha256=SMC90diFFecpEg_zgDRVbdR3hSEIgVVij4taD-noMLM,289
|
22
|
-
supermemory/_utils/_sync.py,sha256=TpGLrrhRNWTJtODNE6Fup3_k7zrWm1j2RlirzBwre-0,2862
|
23
|
-
supermemory/_utils/_transform.py,sha256=n7kskEWz6o__aoNvhFoGVyDoalNe6mJwp-g7BWkdj88,15617
|
24
|
-
supermemory/_utils/_typing.py,sha256=D0DbbNu8GnYQTSICnTSHDGsYXj8TcAKyhejb0XcnjtY,4602
|
25
|
-
supermemory/_utils/_utils.py,sha256=ts4CiiuNpFiGB6YMdkQRh2SZvYvsl7mAF-JWHCcLDf4,12312
|
26
|
-
supermemory/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
|
27
|
-
supermemory/resources/__init__.py,sha256=iYwzfeiqmu2Lorat88bYVkp4CobBt60Gq_6GcygldLE,1569
|
28
|
-
supermemory/resources/connections.py,sha256=PERpnnUiu2hQjDvX_toy1thiipXu25RQaahTIeUwb3w,10656
|
29
|
-
supermemory/resources/memories.py,sha256=yUR8DBlJxp-1G-TIFXNyDZxdLdG-P1-c-k297JbPgUg,21235
|
30
|
-
supermemory/resources/settings.py,sha256=hzijwhQ9U_W5zDRbDjW27QdQU4CwqLkPRWkcALYSCok,12175
|
31
|
-
supermemory/types/__init__.py,sha256=RUzJ7f0cZIPrg4CtIO6SRTpu_tEUrQzjGTrnzl2k0y4,990
|
32
|
-
supermemory/types/connection_create_params.py,sha256=bYYKu3ns60PX6Mt34UQUpYwThB3SBZsKn5tW0c46DUM,630
|
33
|
-
supermemory/types/connection_create_response.py,sha256=i4sb0DSRs7wVVd8xDBOtr7vw-YbaeZ7MydlQLYvlvJs,468
|
34
|
-
supermemory/types/connection_get_response.py,sha256=9ujakZecSs89sItCpsyDQWWB59BtymxspKQKVJBofIg,606
|
35
|
-
supermemory/types/memory_add_params.py,sha256=QG_aD0YXTJ8aSzwlKkv18nkrzl3asUakfFfR65mk9ss,1528
|
36
|
-
supermemory/types/memory_add_response.py,sha256=5lim8sVXM7WzG8tUuKORHEe2lJc6yVWvyjylzNsLGjw,219
|
37
|
-
supermemory/types/memory_get_response.py,sha256=sSCvX54IIoaVuifygi0IxiwHMKNNIGgg8eJJ-xu37BI,2850
|
38
|
-
supermemory/types/memory_update_params.py,sha256=swEIF-CfcxWGzsiT8O_AbtzkyujMiafZpbi2GEXPuuw,1534
|
39
|
-
supermemory/types/memory_update_response.py,sha256=fvfO9lGM8xv2EUOQfOSxqig6fx6-ykq7syW69er_2ng,225
|
40
|
-
supermemory/types/setting_get_response.py,sha256=_CWSr9_-0alw57qSQOaMm-e_FsdXmxIRYhcmTMpdado,1789
|
41
|
-
supermemory/types/setting_update_params.py,sha256=EWbqdSsoTJohQ1nbEbBdAvtR5co_hh7huH6XZ-t7MRM,1854
|
42
|
-
supermemory/types/setting_update_response.py,sha256=Evd1U6QQDYyhD_hpKqS9k7ctvh0GNX4GHPdwBChVB44,1947
|
43
|
-
supermemory-3.0.0a2.dist-info/METADATA,sha256=-eB-dUw_U1qP97DHMd44NppIToCRka4IZiphMdzOGiU,14364
|
44
|
-
supermemory-3.0.0a2.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
45
|
-
supermemory-3.0.0a2.dist-info/licenses/LICENSE,sha256=M2NcpYEBpakciOULpWzo-xO2Lincf74gGwfaU00Sct0,11341
|
46
|
-
supermemory-3.0.0a2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|