supermemory 3.56.0__tar.gz → 3.57.0__tar.gz
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.57.0/.release-please-manifest.json +3 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/CHANGELOG.md +8 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/PKG-INFO +1 -1
- {supermemory-3.56.0 → supermemory-3.57.0}/pyproject.toml +1 -1
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_version.py +1 -1
- supermemory-3.57.0/src/supermemory/types/client_profile_params.py +140 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/document_get_response.py +37 -3
- supermemory-3.57.0/src/supermemory/types/document_list_params.py +139 -0
- supermemory-3.57.0/src/supermemory/types/search_documents_params.py +183 -0
- supermemory-3.57.0/src/supermemory/types/search_execute_params.py +183 -0
- supermemory-3.57.0/src/supermemory/types/search_memories_params.py +191 -0
- supermemory-3.56.0/.release-please-manifest.json +0 -3
- supermemory-3.56.0/src/supermemory/types/client_profile_params.py +0 -3846
- supermemory-3.56.0/src/supermemory/types/document_list_params.py +0 -3845
- supermemory-3.56.0/src/supermemory/types/search_documents_params.py +0 -3889
- supermemory-3.56.0/src/supermemory/types/search_execute_params.py +0 -3889
- supermemory-3.56.0/src/supermemory/types/search_memories_params.py +0 -3897
- {supermemory-3.56.0 → supermemory-3.57.0}/.gitignore +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/CONTRIBUTING.md +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/LICENSE +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/README.md +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/SECURITY.md +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/api.md +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/bin/check-release-environment +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/bin/publish-pypi +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/examples/.keep +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/noxfile.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/release-please-config.json +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/requirements-dev.lock +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/requirements.lock +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/__init__.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_base_client.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_client.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_compat.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_constants.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_exceptions.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_files.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_models.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_qs.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_resource.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_streaming.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_types.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_utils/__init__.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_utils/_compat.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_utils/_datetime_parse.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_utils/_json.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_utils/_logs.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_utils/_path.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_utils/_proxy.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_utils/_reflection.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_utils/_resources_proxy.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_utils/_streams.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_utils/_sync.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_utils/_transform.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_utils/_typing.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/_utils/_utils.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/lib/.keep +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/py.typed +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/resources/__init__.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/resources/connections.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/resources/documents.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/resources/memories.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/resources/search.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/resources/settings.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/__init__.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/add_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/client_add_params.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/connection_configure_params.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/connection_configure_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/connection_create_params.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/connection_create_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/connection_delete_by_id_params.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/connection_delete_by_id_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/connection_delete_by_provider_params.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/connection_delete_by_provider_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/connection_get_by_id_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/connection_get_by_tag_params.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/connection_get_by_tag_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/connection_import_params.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/connection_import_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/connection_list_documents_params.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/connection_list_documents_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/connection_list_params.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/connection_list_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/connection_resources_params.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/connection_resources_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/document_add_params.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/document_add_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/document_batch_add_params.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/document_batch_add_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/document_delete_bulk_params.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/document_delete_bulk_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/document_list_processing_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/document_list_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/document_update_params.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/document_update_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/document_upload_file_params.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/document_upload_file_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/memory_forget_params.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/memory_forget_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/memory_update_memory_params.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/memory_update_memory_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/profile_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/search_documents_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/search_execute_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/search_memories_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/setting_get_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/setting_update_params.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory/types/setting_update_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/src/supermemory_new/lib/.keep +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/__init__.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/api_resources/__init__.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/api_resources/test_client.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/api_resources/test_connections.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/api_resources/test_documents.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/api_resources/test_memories.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/api_resources/test_search.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/api_resources/test_settings.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/conftest.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/sample_file.txt +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/test_client.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/test_extract_files.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/test_files.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/test_models.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/test_qs.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/test_required_args.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/test_response.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/test_streaming.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/test_transform.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/test_utils/test_datetime_parse.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/test_utils/test_json.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/test_utils/test_path.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/test_utils/test_proxy.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/test_utils/test_typing.py +0 -0
- {supermemory-3.56.0 → supermemory-3.57.0}/tests/utils.py +0 -0
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.57.0 (2026-08-11)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v3.56.0...v3.57.0](https://github.com/supermemoryai/python-sdk/compare/v3.56.0...v3.57.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([307c6ac](https://github.com/supermemoryai/python-sdk/commit/307c6ac6f115b9fac6ef7aaa70416e387cabf8e7))
|
|
10
|
+
|
|
3
11
|
## 3.56.0 (2026-07-24)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v3.55.0...v3.56.0](https://github.com/supermemoryai/python-sdk/compare/v3.55.0...v3.56.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: supermemory
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.57.0
|
|
4
4
|
Summary: The official Python library for the supermemory API
|
|
5
5
|
Project-URL: Homepage, https://github.com/supermemoryai/python-sdk
|
|
6
6
|
Project-URL: Repository, https://github.com/supermemoryai/python-sdk
|
|
@@ -0,0 +1,140 @@
|
|
|
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, Iterable
|
|
6
|
+
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
|
|
7
|
+
|
|
8
|
+
from .._types import SequenceNotStr
|
|
9
|
+
from .._utils import PropertyInfo
|
|
10
|
+
|
|
11
|
+
__all__ = [
|
|
12
|
+
"ClientProfileParams",
|
|
13
|
+
"Filters",
|
|
14
|
+
"FiltersOr",
|
|
15
|
+
"FiltersOrOr",
|
|
16
|
+
"FiltersOrOrFilterCondition",
|
|
17
|
+
"FiltersOrOrOr",
|
|
18
|
+
"FiltersOrOrAnd",
|
|
19
|
+
"FiltersAnd",
|
|
20
|
+
"FiltersAndAnd",
|
|
21
|
+
"FiltersAndAndFilterCondition",
|
|
22
|
+
"FiltersAndAndOr",
|
|
23
|
+
"FiltersAndAndAnd",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ClientProfileParams(TypedDict, total=False):
|
|
28
|
+
container_tag: Required[Annotated[str, PropertyInfo(alias="containerTag")]]
|
|
29
|
+
"""Tag to filter the profile by.
|
|
30
|
+
|
|
31
|
+
This can be an ID for your user, a project ID, or any other identifier you wish
|
|
32
|
+
to use to filter memories.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
buckets: SequenceNotStr[str]
|
|
36
|
+
"""Specific bucket keys to return.
|
|
37
|
+
|
|
38
|
+
Omit to return all configured buckets. Only relevant when "buckets" is included.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
filters: Filters
|
|
42
|
+
"""Optional metadata filters to apply to profile results and search results.
|
|
43
|
+
|
|
44
|
+
Supports complex AND/OR queries with multiple conditions.
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
include: List[Literal["static", "dynamic", "buckets"]]
|
|
48
|
+
"""Profile sections to return.
|
|
49
|
+
|
|
50
|
+
Omit to return all sections. Pass a subset to reduce payload — e.g. ["buckets"]
|
|
51
|
+
skips static and dynamic entirely.
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
q: str
|
|
55
|
+
"""Optional search query to include search results in the response"""
|
|
56
|
+
|
|
57
|
+
threshold: float
|
|
58
|
+
"""Threshold for search results.
|
|
59
|
+
|
|
60
|
+
Only results with a score above this threshold will be included.
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
class FiltersOrOrFilterCondition(TypedDict, total=False):
|
|
65
|
+
"""
|
|
66
|
+
A single filter condition based on metadata, numeric values, array contents, or string matching
|
|
67
|
+
"""
|
|
68
|
+
|
|
69
|
+
key: Required[str]
|
|
70
|
+
|
|
71
|
+
value: Required[str]
|
|
72
|
+
|
|
73
|
+
filter_type: Annotated[
|
|
74
|
+
Literal["metadata", "numeric", "array_contains", "string_contains"], PropertyInfo(alias="filterType")
|
|
75
|
+
]
|
|
76
|
+
|
|
77
|
+
ignore_case: Annotated[Union[bool, Literal["true", "false"]], PropertyInfo(alias="ignoreCase")]
|
|
78
|
+
|
|
79
|
+
negate: Union[bool, Literal["true", "false"]]
|
|
80
|
+
|
|
81
|
+
numeric_operator: Annotated[Literal[">", "<", ">=", "<=", "="], PropertyInfo(alias="numericOperator")]
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class FiltersOrOrOr(TypedDict, total=False):
|
|
85
|
+
or_: Required[Annotated[Iterable[object], PropertyInfo(alias="OR")]]
|
|
86
|
+
"""OR: Array of conditions or nested expressions"""
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
class FiltersOrOrAnd(TypedDict, total=False):
|
|
90
|
+
and_: Required[Annotated[Iterable[object], PropertyInfo(alias="AND")]]
|
|
91
|
+
"""AND: Array of conditions or nested expressions"""
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
FiltersOrOr: TypeAlias = Union[FiltersOrOrFilterCondition, FiltersOrOrOr, FiltersOrOrAnd]
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
class FiltersOr(TypedDict, total=False):
|
|
98
|
+
or_: Required[Annotated[Iterable[FiltersOrOr], PropertyInfo(alias="OR")]]
|
|
99
|
+
"""Array of OR filter expressions"""
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
class FiltersAndAndFilterCondition(TypedDict, total=False):
|
|
103
|
+
"""
|
|
104
|
+
A single filter condition based on metadata, numeric values, array contents, or string matching
|
|
105
|
+
"""
|
|
106
|
+
|
|
107
|
+
key: Required[str]
|
|
108
|
+
|
|
109
|
+
value: Required[str]
|
|
110
|
+
|
|
111
|
+
filter_type: Annotated[
|
|
112
|
+
Literal["metadata", "numeric", "array_contains", "string_contains"], PropertyInfo(alias="filterType")
|
|
113
|
+
]
|
|
114
|
+
|
|
115
|
+
ignore_case: Annotated[Union[bool, Literal["true", "false"]], PropertyInfo(alias="ignoreCase")]
|
|
116
|
+
|
|
117
|
+
negate: Union[bool, Literal["true", "false"]]
|
|
118
|
+
|
|
119
|
+
numeric_operator: Annotated[Literal[">", "<", ">=", "<=", "="], PropertyInfo(alias="numericOperator")]
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
class FiltersAndAndOr(TypedDict, total=False):
|
|
123
|
+
or_: Required[Annotated[Iterable[object], PropertyInfo(alias="OR")]]
|
|
124
|
+
"""OR: Array of conditions or nested expressions"""
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
class FiltersAndAndAnd(TypedDict, total=False):
|
|
128
|
+
and_: Required[Annotated[Iterable[object], PropertyInfo(alias="AND")]]
|
|
129
|
+
"""AND: Array of conditions or nested expressions"""
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
FiltersAndAnd: TypeAlias = Union[FiltersAndAndFilterCondition, FiltersAndAndOr, FiltersAndAndAnd]
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
class FiltersAnd(TypedDict, total=False):
|
|
136
|
+
and_: Required[Annotated[Iterable[FiltersAndAnd], PropertyInfo(alias="AND")]]
|
|
137
|
+
"""Array of AND filter expressions"""
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
Filters: TypeAlias = Union[FiltersOr, FiltersAnd]
|
|
@@ -7,12 +7,40 @@ from pydantic import Field as FieldInfo
|
|
|
7
7
|
|
|
8
8
|
from .._models import BaseModel
|
|
9
9
|
|
|
10
|
-
__all__ = ["DocumentGetResponse"]
|
|
10
|
+
__all__ = ["DocumentGetResponse", "Memory"]
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
class
|
|
14
|
-
|
|
13
|
+
class Memory(BaseModel):
|
|
14
|
+
id: str
|
|
15
|
+
|
|
16
|
+
created_at: str = FieldInfo(alias="createdAt")
|
|
17
|
+
"""Creation timestamp"""
|
|
18
|
+
|
|
19
|
+
is_forgotten: bool = FieldInfo(alias="isForgotten")
|
|
20
|
+
|
|
21
|
+
is_inference: bool = FieldInfo(alias="isInference")
|
|
22
|
+
|
|
23
|
+
is_latest: bool = FieldInfo(alias="isLatest")
|
|
24
|
+
|
|
25
|
+
is_static: bool = FieldInfo(alias="isStatic")
|
|
26
|
+
|
|
27
|
+
memory: str
|
|
28
|
+
|
|
29
|
+
metadata: Union[str, float, bool, Dict[str, object], List[object], None] = None
|
|
15
30
|
|
|
31
|
+
parent_memory_id: Optional[str] = FieldInfo(alias="parentMemoryId", default=None)
|
|
32
|
+
|
|
33
|
+
root_memory_id: Optional[str] = FieldInfo(alias="rootMemoryId", default=None)
|
|
34
|
+
|
|
35
|
+
source_count: int = FieldInfo(alias="sourceCount")
|
|
36
|
+
|
|
37
|
+
updated_at: Optional[str] = FieldInfo(alias="updatedAt", default=None)
|
|
38
|
+
"""Last update timestamp"""
|
|
39
|
+
|
|
40
|
+
version: int
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class DocumentGetResponse(BaseModel):
|
|
16
44
|
id: str
|
|
17
45
|
"""Unique identifier of the document."""
|
|
18
46
|
|
|
@@ -108,5 +136,11 @@ class DocumentGetResponse(BaseModel):
|
|
|
108
136
|
to use to group documents.
|
|
109
137
|
"""
|
|
110
138
|
|
|
139
|
+
memories: Optional[List[Memory]] = None
|
|
140
|
+
"""Memories extracted from this document.
|
|
141
|
+
|
|
142
|
+
Omitted when the document has no memories (e.g. still processing).
|
|
143
|
+
"""
|
|
144
|
+
|
|
111
145
|
url: Optional[str] = None
|
|
112
146
|
"""URL of the document"""
|
|
@@ -0,0 +1,139 @@
|
|
|
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 Union, Iterable
|
|
6
|
+
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
|
|
7
|
+
|
|
8
|
+
from .._types import SequenceNotStr
|
|
9
|
+
from .._utils import PropertyInfo
|
|
10
|
+
|
|
11
|
+
__all__ = [
|
|
12
|
+
"DocumentListParams",
|
|
13
|
+
"Filters",
|
|
14
|
+
"FiltersOr",
|
|
15
|
+
"FiltersOrOr",
|
|
16
|
+
"FiltersOrOrFilterCondition",
|
|
17
|
+
"FiltersOrOrOr",
|
|
18
|
+
"FiltersOrOrAnd",
|
|
19
|
+
"FiltersAnd",
|
|
20
|
+
"FiltersAndAnd",
|
|
21
|
+
"FiltersAndAndFilterCondition",
|
|
22
|
+
"FiltersAndAndOr",
|
|
23
|
+
"FiltersAndAndAnd",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class DocumentListParams(TypedDict, total=False):
|
|
28
|
+
container_tags: Annotated[SequenceNotStr[str], PropertyInfo(alias="containerTags")]
|
|
29
|
+
"""Optional tags this document should be containerized by.
|
|
30
|
+
|
|
31
|
+
This can be an ID for your user, a project ID, or any other identifier you wish
|
|
32
|
+
to use to group documents.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
filepath: str
|
|
36
|
+
"""Filter documents by filepath.
|
|
37
|
+
|
|
38
|
+
Exact match for full paths, prefix match if ending with /
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
filters: Filters
|
|
42
|
+
"""Optional filters to apply to the search. Can be a JSON string or Query object."""
|
|
43
|
+
|
|
44
|
+
include_content: Annotated[bool, PropertyInfo(alias="includeContent")]
|
|
45
|
+
"""Whether to include the content field in the response.
|
|
46
|
+
|
|
47
|
+
Warning: This can make responses significantly larger.
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
limit: Union[str, float]
|
|
51
|
+
"""Number of items per page"""
|
|
52
|
+
|
|
53
|
+
order: Literal["asc", "desc"]
|
|
54
|
+
"""Sort order"""
|
|
55
|
+
|
|
56
|
+
page: Union[str, float]
|
|
57
|
+
"""Page number to fetch"""
|
|
58
|
+
|
|
59
|
+
sort: Literal["createdAt", "updatedAt"]
|
|
60
|
+
"""Field to sort by"""
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class FiltersOrOrFilterCondition(TypedDict, total=False):
|
|
64
|
+
"""
|
|
65
|
+
A single filter condition based on metadata, numeric values, array contents, or string matching
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
key: Required[str]
|
|
69
|
+
|
|
70
|
+
value: Required[str]
|
|
71
|
+
|
|
72
|
+
filter_type: Annotated[
|
|
73
|
+
Literal["metadata", "numeric", "array_contains", "string_contains"], PropertyInfo(alias="filterType")
|
|
74
|
+
]
|
|
75
|
+
|
|
76
|
+
ignore_case: Annotated[Union[bool, Literal["true", "false"]], PropertyInfo(alias="ignoreCase")]
|
|
77
|
+
|
|
78
|
+
negate: Union[bool, Literal["true", "false"]]
|
|
79
|
+
|
|
80
|
+
numeric_operator: Annotated[Literal[">", "<", ">=", "<=", "="], PropertyInfo(alias="numericOperator")]
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class FiltersOrOrOr(TypedDict, total=False):
|
|
84
|
+
or_: Required[Annotated[Iterable[object], PropertyInfo(alias="OR")]]
|
|
85
|
+
"""OR: Array of conditions or nested expressions"""
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class FiltersOrOrAnd(TypedDict, total=False):
|
|
89
|
+
and_: Required[Annotated[Iterable[object], PropertyInfo(alias="AND")]]
|
|
90
|
+
"""AND: Array of conditions or nested expressions"""
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
FiltersOrOr: TypeAlias = Union[FiltersOrOrFilterCondition, FiltersOrOrOr, FiltersOrOrAnd]
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class FiltersOr(TypedDict, total=False):
|
|
97
|
+
or_: Required[Annotated[Iterable[FiltersOrOr], PropertyInfo(alias="OR")]]
|
|
98
|
+
"""Array of OR filter expressions"""
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
class FiltersAndAndFilterCondition(TypedDict, total=False):
|
|
102
|
+
"""
|
|
103
|
+
A single filter condition based on metadata, numeric values, array contents, or string matching
|
|
104
|
+
"""
|
|
105
|
+
|
|
106
|
+
key: Required[str]
|
|
107
|
+
|
|
108
|
+
value: Required[str]
|
|
109
|
+
|
|
110
|
+
filter_type: Annotated[
|
|
111
|
+
Literal["metadata", "numeric", "array_contains", "string_contains"], PropertyInfo(alias="filterType")
|
|
112
|
+
]
|
|
113
|
+
|
|
114
|
+
ignore_case: Annotated[Union[bool, Literal["true", "false"]], PropertyInfo(alias="ignoreCase")]
|
|
115
|
+
|
|
116
|
+
negate: Union[bool, Literal["true", "false"]]
|
|
117
|
+
|
|
118
|
+
numeric_operator: Annotated[Literal[">", "<", ">=", "<=", "="], PropertyInfo(alias="numericOperator")]
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
class FiltersAndAndOr(TypedDict, total=False):
|
|
122
|
+
or_: Required[Annotated[Iterable[object], PropertyInfo(alias="OR")]]
|
|
123
|
+
"""OR: Array of conditions or nested expressions"""
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
class FiltersAndAndAnd(TypedDict, total=False):
|
|
127
|
+
and_: Required[Annotated[Iterable[object], PropertyInfo(alias="AND")]]
|
|
128
|
+
"""AND: Array of conditions or nested expressions"""
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
FiltersAndAnd: TypeAlias = Union[FiltersAndAndFilterCondition, FiltersAndAndOr, FiltersAndAndAnd]
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
class FiltersAnd(TypedDict, total=False):
|
|
135
|
+
and_: Required[Annotated[Iterable[FiltersAndAnd], PropertyInfo(alias="AND")]]
|
|
136
|
+
"""Array of AND filter expressions"""
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
Filters: TypeAlias = Union[FiltersOr, FiltersAnd]
|
|
@@ -0,0 +1,183 @@
|
|
|
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 Union, Iterable
|
|
6
|
+
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
|
|
7
|
+
|
|
8
|
+
from .._types import SequenceNotStr
|
|
9
|
+
from .._utils import PropertyInfo
|
|
10
|
+
|
|
11
|
+
__all__ = [
|
|
12
|
+
"SearchDocumentsParams",
|
|
13
|
+
"Filters",
|
|
14
|
+
"FiltersOr",
|
|
15
|
+
"FiltersOrOr",
|
|
16
|
+
"FiltersOrOrFilterCondition",
|
|
17
|
+
"FiltersOrOrOr",
|
|
18
|
+
"FiltersOrOrAnd",
|
|
19
|
+
"FiltersAnd",
|
|
20
|
+
"FiltersAndAnd",
|
|
21
|
+
"FiltersAndAndFilterCondition",
|
|
22
|
+
"FiltersAndAndOr",
|
|
23
|
+
"FiltersAndAndAnd",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class SearchDocumentsParams(TypedDict, total=False):
|
|
28
|
+
q: Required[str]
|
|
29
|
+
"""Search query string"""
|
|
30
|
+
|
|
31
|
+
categories_filter: Annotated[SequenceNotStr[str], PropertyInfo(alias="categoriesFilter")]
|
|
32
|
+
"""DEPRECATED: Optional category filters"""
|
|
33
|
+
|
|
34
|
+
chunk_threshold: Annotated[float, PropertyInfo(alias="chunkThreshold")]
|
|
35
|
+
"""Threshold / sensitivity for chunk selection.
|
|
36
|
+
|
|
37
|
+
0 is least sensitive (returns most chunks, more results), 1 is most sensitive
|
|
38
|
+
(returns lesser chunks, accurate results)
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
container_tag: Annotated[str, PropertyInfo(alias="containerTag")]
|
|
42
|
+
"""Optional single container tag. Use this or containerTags."""
|
|
43
|
+
|
|
44
|
+
container_tags: Annotated[SequenceNotStr[str], PropertyInfo(alias="containerTags")]
|
|
45
|
+
"""Optional tags this search should be containerized by.
|
|
46
|
+
|
|
47
|
+
This can be an ID for your user, a project ID, or any other identifier you wish
|
|
48
|
+
to use to filter documents.
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
doc_id: Annotated[str, PropertyInfo(alias="docId")]
|
|
52
|
+
"""Optional document ID to search within.
|
|
53
|
+
|
|
54
|
+
You can use this to find chunks in a very large document.
|
|
55
|
+
"""
|
|
56
|
+
|
|
57
|
+
document_threshold: Annotated[float, PropertyInfo(alias="documentThreshold")]
|
|
58
|
+
"""DEPRECATED: This field is no longer used in v3 search.
|
|
59
|
+
|
|
60
|
+
The search now uses chunkThreshold only. This parameter will be ignored.
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
filepath: str
|
|
64
|
+
"""Filter search results by filepath.
|
|
65
|
+
|
|
66
|
+
Exact match for full paths, prefix match if ending with /
|
|
67
|
+
"""
|
|
68
|
+
|
|
69
|
+
filters: Filters
|
|
70
|
+
"""Optional filters to apply to the search. Can be a JSON string or Query object."""
|
|
71
|
+
|
|
72
|
+
include_full_docs: Annotated[bool, PropertyInfo(alias="includeFullDocs")]
|
|
73
|
+
"""If true, include full document in the response.
|
|
74
|
+
|
|
75
|
+
This is helpful if you want a chatbot to know the full context of the document.
|
|
76
|
+
"""
|
|
77
|
+
|
|
78
|
+
include_summary: Annotated[bool, PropertyInfo(alias="includeSummary")]
|
|
79
|
+
"""If true, include document summary in the response.
|
|
80
|
+
|
|
81
|
+
This is helpful if you want a chatbot to know the full context of the document.
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
limit: int
|
|
85
|
+
"""Maximum number of results to return"""
|
|
86
|
+
|
|
87
|
+
only_matching_chunks: Annotated[bool, PropertyInfo(alias="onlyMatchingChunks")]
|
|
88
|
+
"""If true, only return matching chunks without context.
|
|
89
|
+
|
|
90
|
+
Normally, we send the previous and next chunk to provide more context for LLMs.
|
|
91
|
+
If you only want the matching chunk, set this to true.
|
|
92
|
+
"""
|
|
93
|
+
|
|
94
|
+
rerank: bool
|
|
95
|
+
"""If true, rerank the results based on the query.
|
|
96
|
+
|
|
97
|
+
This is helpful if you want to ensure the most relevant results are returned.
|
|
98
|
+
"""
|
|
99
|
+
|
|
100
|
+
rewrite_query: Annotated[bool, PropertyInfo(alias="rewriteQuery")]
|
|
101
|
+
"""If true, rewrites the query to make it easier to find documents.
|
|
102
|
+
|
|
103
|
+
This increases the latency by about 400ms
|
|
104
|
+
"""
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
class FiltersOrOrFilterCondition(TypedDict, total=False):
|
|
108
|
+
"""
|
|
109
|
+
A single filter condition based on metadata, numeric values, array contents, or string matching
|
|
110
|
+
"""
|
|
111
|
+
|
|
112
|
+
key: Required[str]
|
|
113
|
+
|
|
114
|
+
value: Required[str]
|
|
115
|
+
|
|
116
|
+
filter_type: Annotated[
|
|
117
|
+
Literal["metadata", "numeric", "array_contains", "string_contains"], PropertyInfo(alias="filterType")
|
|
118
|
+
]
|
|
119
|
+
|
|
120
|
+
ignore_case: Annotated[Union[bool, Literal["true", "false"]], PropertyInfo(alias="ignoreCase")]
|
|
121
|
+
|
|
122
|
+
negate: Union[bool, Literal["true", "false"]]
|
|
123
|
+
|
|
124
|
+
numeric_operator: Annotated[Literal[">", "<", ">=", "<=", "="], PropertyInfo(alias="numericOperator")]
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
class FiltersOrOrOr(TypedDict, total=False):
|
|
128
|
+
or_: Required[Annotated[Iterable[object], PropertyInfo(alias="OR")]]
|
|
129
|
+
"""OR: Array of conditions or nested expressions"""
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
class FiltersOrOrAnd(TypedDict, total=False):
|
|
133
|
+
and_: Required[Annotated[Iterable[object], PropertyInfo(alias="AND")]]
|
|
134
|
+
"""AND: Array of conditions or nested expressions"""
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
FiltersOrOr: TypeAlias = Union[FiltersOrOrFilterCondition, FiltersOrOrOr, FiltersOrOrAnd]
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
class FiltersOr(TypedDict, total=False):
|
|
141
|
+
or_: Required[Annotated[Iterable[FiltersOrOr], PropertyInfo(alias="OR")]]
|
|
142
|
+
"""Array of OR filter expressions"""
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
class FiltersAndAndFilterCondition(TypedDict, total=False):
|
|
146
|
+
"""
|
|
147
|
+
A single filter condition based on metadata, numeric values, array contents, or string matching
|
|
148
|
+
"""
|
|
149
|
+
|
|
150
|
+
key: Required[str]
|
|
151
|
+
|
|
152
|
+
value: Required[str]
|
|
153
|
+
|
|
154
|
+
filter_type: Annotated[
|
|
155
|
+
Literal["metadata", "numeric", "array_contains", "string_contains"], PropertyInfo(alias="filterType")
|
|
156
|
+
]
|
|
157
|
+
|
|
158
|
+
ignore_case: Annotated[Union[bool, Literal["true", "false"]], PropertyInfo(alias="ignoreCase")]
|
|
159
|
+
|
|
160
|
+
negate: Union[bool, Literal["true", "false"]]
|
|
161
|
+
|
|
162
|
+
numeric_operator: Annotated[Literal[">", "<", ">=", "<=", "="], PropertyInfo(alias="numericOperator")]
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
class FiltersAndAndOr(TypedDict, total=False):
|
|
166
|
+
or_: Required[Annotated[Iterable[object], PropertyInfo(alias="OR")]]
|
|
167
|
+
"""OR: Array of conditions or nested expressions"""
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
class FiltersAndAndAnd(TypedDict, total=False):
|
|
171
|
+
and_: Required[Annotated[Iterable[object], PropertyInfo(alias="AND")]]
|
|
172
|
+
"""AND: Array of conditions or nested expressions"""
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
FiltersAndAnd: TypeAlias = Union[FiltersAndAndFilterCondition, FiltersAndAndOr, FiltersAndAndAnd]
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
class FiltersAnd(TypedDict, total=False):
|
|
179
|
+
and_: Required[Annotated[Iterable[FiltersAndAnd], PropertyInfo(alias="AND")]]
|
|
180
|
+
"""Array of AND filter expressions"""
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
Filters: TypeAlias = Union[FiltersOr, FiltersAnd]
|