evermemos 0.3.6__py3-none-any.whl → 0.3.7__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.
- evermemos/_version.py +1 -1
- evermemos/resources/v1/__init__.py +28 -0
- evermemos/resources/v1/global_user_profile/__init__.py +33 -0
- evermemos/resources/v1/global_user_profile/custom.py +185 -0
- evermemos/resources/v1/global_user_profile/global_user_profile.py +102 -0
- evermemos/resources/v1/memories/conversation_meta.py +2 -78
- evermemos/resources/v1/memories/memories.py +172 -101
- evermemos/resources/v1/stats/__init__.py +33 -0
- evermemos/resources/v1/stats/request.py +175 -0
- evermemos/resources/v1/stats/stats.py +102 -0
- evermemos/resources/v1/v1.py +64 -0
- evermemos/types/v1/__init__.py +3 -1
- evermemos/types/v1/global_user_profile/__init__.py +6 -0
- evermemos/types/v1/global_user_profile/custom_upsert_params.py +24 -0
- evermemos/types/v1/global_user_profile/custom_upsert_response.py +23 -0
- evermemos/types/v1/memories/conversation_meta_create_params.py +0 -3
- evermemos/types/v1/memories/conversation_meta_create_response.py +0 -3
- evermemos/types/v1/memories/conversation_meta_get_response.py +0 -3
- evermemos/types/v1/memory_create_params.py +10 -2
- evermemos/types/v1/{memory_list_response.py → memory_get_response.py} +84 -3
- evermemos/types/v1/memory_load_params.py +83 -0
- evermemos/types/v1/memory_load_response.py +26 -0
- evermemos/types/v1/stats/__init__.py +6 -0
- evermemos/types/v1/stats/request_get_params.py +13 -0
- evermemos/types/v1/stats/request_get_response.py +26 -0
- {evermemos-0.3.6.dist-info → evermemos-0.3.7.dist-info}/METADATA +45 -17
- {evermemos-0.3.6.dist-info → evermemos-0.3.7.dist-info}/RECORD +29 -15
- {evermemos-0.3.6.dist-info → evermemos-0.3.7.dist-info}/WHEEL +0 -0
- {evermemos-0.3.6.dist-info → evermemos-0.3.7.dist-info}/licenses/LICENSE +0 -0
evermemos/_version.py
CHANGED
|
@@ -8,6 +8,14 @@ from .v1 import (
|
|
|
8
8
|
V1ResourceWithStreamingResponse,
|
|
9
9
|
AsyncV1ResourceWithStreamingResponse,
|
|
10
10
|
)
|
|
11
|
+
from .stats import (
|
|
12
|
+
StatsResource,
|
|
13
|
+
AsyncStatsResource,
|
|
14
|
+
StatsResourceWithRawResponse,
|
|
15
|
+
AsyncStatsResourceWithRawResponse,
|
|
16
|
+
StatsResourceWithStreamingResponse,
|
|
17
|
+
AsyncStatsResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
11
19
|
from .memories import (
|
|
12
20
|
MemoriesResource,
|
|
13
21
|
AsyncMemoriesResource,
|
|
@@ -16,6 +24,14 @@ from .memories import (
|
|
|
16
24
|
MemoriesResourceWithStreamingResponse,
|
|
17
25
|
AsyncMemoriesResourceWithStreamingResponse,
|
|
18
26
|
)
|
|
27
|
+
from .global_user_profile import (
|
|
28
|
+
GlobalUserProfileResource,
|
|
29
|
+
AsyncGlobalUserProfileResource,
|
|
30
|
+
GlobalUserProfileResourceWithRawResponse,
|
|
31
|
+
AsyncGlobalUserProfileResourceWithRawResponse,
|
|
32
|
+
GlobalUserProfileResourceWithStreamingResponse,
|
|
33
|
+
AsyncGlobalUserProfileResourceWithStreamingResponse,
|
|
34
|
+
)
|
|
19
35
|
|
|
20
36
|
__all__ = [
|
|
21
37
|
"MemoriesResource",
|
|
@@ -24,6 +40,18 @@ __all__ = [
|
|
|
24
40
|
"AsyncMemoriesResourceWithRawResponse",
|
|
25
41
|
"MemoriesResourceWithStreamingResponse",
|
|
26
42
|
"AsyncMemoriesResourceWithStreamingResponse",
|
|
43
|
+
"GlobalUserProfileResource",
|
|
44
|
+
"AsyncGlobalUserProfileResource",
|
|
45
|
+
"GlobalUserProfileResourceWithRawResponse",
|
|
46
|
+
"AsyncGlobalUserProfileResourceWithRawResponse",
|
|
47
|
+
"GlobalUserProfileResourceWithStreamingResponse",
|
|
48
|
+
"AsyncGlobalUserProfileResourceWithStreamingResponse",
|
|
49
|
+
"StatsResource",
|
|
50
|
+
"AsyncStatsResource",
|
|
51
|
+
"StatsResourceWithRawResponse",
|
|
52
|
+
"AsyncStatsResourceWithRawResponse",
|
|
53
|
+
"StatsResourceWithStreamingResponse",
|
|
54
|
+
"AsyncStatsResourceWithStreamingResponse",
|
|
27
55
|
"V1Resource",
|
|
28
56
|
"AsyncV1Resource",
|
|
29
57
|
"V1ResourceWithRawResponse",
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .custom import (
|
|
4
|
+
CustomResource,
|
|
5
|
+
AsyncCustomResource,
|
|
6
|
+
CustomResourceWithRawResponse,
|
|
7
|
+
AsyncCustomResourceWithRawResponse,
|
|
8
|
+
CustomResourceWithStreamingResponse,
|
|
9
|
+
AsyncCustomResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
11
|
+
from .global_user_profile import (
|
|
12
|
+
GlobalUserProfileResource,
|
|
13
|
+
AsyncGlobalUserProfileResource,
|
|
14
|
+
GlobalUserProfileResourceWithRawResponse,
|
|
15
|
+
AsyncGlobalUserProfileResourceWithRawResponse,
|
|
16
|
+
GlobalUserProfileResourceWithStreamingResponse,
|
|
17
|
+
AsyncGlobalUserProfileResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
__all__ = [
|
|
21
|
+
"CustomResource",
|
|
22
|
+
"AsyncCustomResource",
|
|
23
|
+
"CustomResourceWithRawResponse",
|
|
24
|
+
"AsyncCustomResourceWithRawResponse",
|
|
25
|
+
"CustomResourceWithStreamingResponse",
|
|
26
|
+
"AsyncCustomResourceWithStreamingResponse",
|
|
27
|
+
"GlobalUserProfileResource",
|
|
28
|
+
"AsyncGlobalUserProfileResource",
|
|
29
|
+
"GlobalUserProfileResourceWithRawResponse",
|
|
30
|
+
"AsyncGlobalUserProfileResourceWithRawResponse",
|
|
31
|
+
"GlobalUserProfileResourceWithStreamingResponse",
|
|
32
|
+
"AsyncGlobalUserProfileResourceWithStreamingResponse",
|
|
33
|
+
]
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ...._types import Body, Query, Headers, NotGiven, not_given
|
|
8
|
+
from ...._utils import maybe_transform, async_maybe_transform
|
|
9
|
+
from ...._compat import cached_property
|
|
10
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
11
|
+
from ...._response import (
|
|
12
|
+
to_raw_response_wrapper,
|
|
13
|
+
to_streamed_response_wrapper,
|
|
14
|
+
async_to_raw_response_wrapper,
|
|
15
|
+
async_to_streamed_response_wrapper,
|
|
16
|
+
)
|
|
17
|
+
from ...._base_client import make_request_options
|
|
18
|
+
from ....types.v1.global_user_profile import custom_upsert_params
|
|
19
|
+
from ....types.v1.global_user_profile.custom_upsert_response import CustomUpsertResponse
|
|
20
|
+
|
|
21
|
+
__all__ = ["CustomResource", "AsyncCustomResource"]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class CustomResource(SyncAPIResource):
|
|
25
|
+
@cached_property
|
|
26
|
+
def with_raw_response(self) -> CustomResourceWithRawResponse:
|
|
27
|
+
"""
|
|
28
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
29
|
+
the raw response object instead of the parsed content.
|
|
30
|
+
|
|
31
|
+
For more information, see https://www.github.com/evermemos/evermemos-python#accessing-raw-response-data-eg-headers
|
|
32
|
+
"""
|
|
33
|
+
return CustomResourceWithRawResponse(self)
|
|
34
|
+
|
|
35
|
+
@cached_property
|
|
36
|
+
def with_streaming_response(self) -> CustomResourceWithStreamingResponse:
|
|
37
|
+
"""
|
|
38
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
39
|
+
|
|
40
|
+
For more information, see https://www.github.com/evermemos/evermemos-python#with_streaming_response
|
|
41
|
+
"""
|
|
42
|
+
return CustomResourceWithStreamingResponse(self)
|
|
43
|
+
|
|
44
|
+
def upsert(
|
|
45
|
+
self,
|
|
46
|
+
*,
|
|
47
|
+
custom_profile_data: custom_upsert_params.CustomProfileData,
|
|
48
|
+
user_id: str,
|
|
49
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
50
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
51
|
+
extra_headers: Headers | None = None,
|
|
52
|
+
extra_query: Query | None = None,
|
|
53
|
+
extra_body: Body | None = None,
|
|
54
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
55
|
+
) -> CustomUpsertResponse:
|
|
56
|
+
"""
|
|
57
|
+
Upsert custom profile data for a user
|
|
58
|
+
|
|
59
|
+
Args:
|
|
60
|
+
custom_profile_data: Custom profile data to upsert
|
|
61
|
+
|
|
62
|
+
user_id: User ID
|
|
63
|
+
|
|
64
|
+
extra_headers: Send extra headers
|
|
65
|
+
|
|
66
|
+
extra_query: Add additional query parameters to the request
|
|
67
|
+
|
|
68
|
+
extra_body: Add additional JSON properties to the request
|
|
69
|
+
|
|
70
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
71
|
+
"""
|
|
72
|
+
return self._post(
|
|
73
|
+
"/api/v1/global-user-profile/custom",
|
|
74
|
+
body=maybe_transform(
|
|
75
|
+
{
|
|
76
|
+
"custom_profile_data": custom_profile_data,
|
|
77
|
+
"user_id": user_id,
|
|
78
|
+
},
|
|
79
|
+
custom_upsert_params.CustomUpsertParams,
|
|
80
|
+
),
|
|
81
|
+
options=make_request_options(
|
|
82
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
83
|
+
),
|
|
84
|
+
cast_to=CustomUpsertResponse,
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class AsyncCustomResource(AsyncAPIResource):
|
|
89
|
+
@cached_property
|
|
90
|
+
def with_raw_response(self) -> AsyncCustomResourceWithRawResponse:
|
|
91
|
+
"""
|
|
92
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
93
|
+
the raw response object instead of the parsed content.
|
|
94
|
+
|
|
95
|
+
For more information, see https://www.github.com/evermemos/evermemos-python#accessing-raw-response-data-eg-headers
|
|
96
|
+
"""
|
|
97
|
+
return AsyncCustomResourceWithRawResponse(self)
|
|
98
|
+
|
|
99
|
+
@cached_property
|
|
100
|
+
def with_streaming_response(self) -> AsyncCustomResourceWithStreamingResponse:
|
|
101
|
+
"""
|
|
102
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
103
|
+
|
|
104
|
+
For more information, see https://www.github.com/evermemos/evermemos-python#with_streaming_response
|
|
105
|
+
"""
|
|
106
|
+
return AsyncCustomResourceWithStreamingResponse(self)
|
|
107
|
+
|
|
108
|
+
async def upsert(
|
|
109
|
+
self,
|
|
110
|
+
*,
|
|
111
|
+
custom_profile_data: custom_upsert_params.CustomProfileData,
|
|
112
|
+
user_id: str,
|
|
113
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
114
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
115
|
+
extra_headers: Headers | None = None,
|
|
116
|
+
extra_query: Query | None = None,
|
|
117
|
+
extra_body: Body | None = None,
|
|
118
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
119
|
+
) -> CustomUpsertResponse:
|
|
120
|
+
"""
|
|
121
|
+
Upsert custom profile data for a user
|
|
122
|
+
|
|
123
|
+
Args:
|
|
124
|
+
custom_profile_data: Custom profile data to upsert
|
|
125
|
+
|
|
126
|
+
user_id: User ID
|
|
127
|
+
|
|
128
|
+
extra_headers: Send extra headers
|
|
129
|
+
|
|
130
|
+
extra_query: Add additional query parameters to the request
|
|
131
|
+
|
|
132
|
+
extra_body: Add additional JSON properties to the request
|
|
133
|
+
|
|
134
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
135
|
+
"""
|
|
136
|
+
return await self._post(
|
|
137
|
+
"/api/v1/global-user-profile/custom",
|
|
138
|
+
body=await async_maybe_transform(
|
|
139
|
+
{
|
|
140
|
+
"custom_profile_data": custom_profile_data,
|
|
141
|
+
"user_id": user_id,
|
|
142
|
+
},
|
|
143
|
+
custom_upsert_params.CustomUpsertParams,
|
|
144
|
+
),
|
|
145
|
+
options=make_request_options(
|
|
146
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
147
|
+
),
|
|
148
|
+
cast_to=CustomUpsertResponse,
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
class CustomResourceWithRawResponse:
|
|
153
|
+
def __init__(self, custom: CustomResource) -> None:
|
|
154
|
+
self._custom = custom
|
|
155
|
+
|
|
156
|
+
self.upsert = to_raw_response_wrapper(
|
|
157
|
+
custom.upsert,
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
class AsyncCustomResourceWithRawResponse:
|
|
162
|
+
def __init__(self, custom: AsyncCustomResource) -> None:
|
|
163
|
+
self._custom = custom
|
|
164
|
+
|
|
165
|
+
self.upsert = async_to_raw_response_wrapper(
|
|
166
|
+
custom.upsert,
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
class CustomResourceWithStreamingResponse:
|
|
171
|
+
def __init__(self, custom: CustomResource) -> None:
|
|
172
|
+
self._custom = custom
|
|
173
|
+
|
|
174
|
+
self.upsert = to_streamed_response_wrapper(
|
|
175
|
+
custom.upsert,
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
class AsyncCustomResourceWithStreamingResponse:
|
|
180
|
+
def __init__(self, custom: AsyncCustomResource) -> None:
|
|
181
|
+
self._custom = custom
|
|
182
|
+
|
|
183
|
+
self.upsert = async_to_streamed_response_wrapper(
|
|
184
|
+
custom.upsert,
|
|
185
|
+
)
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .custom import (
|
|
6
|
+
CustomResource,
|
|
7
|
+
AsyncCustomResource,
|
|
8
|
+
CustomResourceWithRawResponse,
|
|
9
|
+
AsyncCustomResourceWithRawResponse,
|
|
10
|
+
CustomResourceWithStreamingResponse,
|
|
11
|
+
AsyncCustomResourceWithStreamingResponse,
|
|
12
|
+
)
|
|
13
|
+
from ...._compat import cached_property
|
|
14
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
15
|
+
|
|
16
|
+
__all__ = ["GlobalUserProfileResource", "AsyncGlobalUserProfileResource"]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class GlobalUserProfileResource(SyncAPIResource):
|
|
20
|
+
@cached_property
|
|
21
|
+
def custom(self) -> CustomResource:
|
|
22
|
+
return CustomResource(self._client)
|
|
23
|
+
|
|
24
|
+
@cached_property
|
|
25
|
+
def with_raw_response(self) -> GlobalUserProfileResourceWithRawResponse:
|
|
26
|
+
"""
|
|
27
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
28
|
+
the raw response object instead of the parsed content.
|
|
29
|
+
|
|
30
|
+
For more information, see https://www.github.com/evermemos/evermemos-python#accessing-raw-response-data-eg-headers
|
|
31
|
+
"""
|
|
32
|
+
return GlobalUserProfileResourceWithRawResponse(self)
|
|
33
|
+
|
|
34
|
+
@cached_property
|
|
35
|
+
def with_streaming_response(self) -> GlobalUserProfileResourceWithStreamingResponse:
|
|
36
|
+
"""
|
|
37
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
38
|
+
|
|
39
|
+
For more information, see https://www.github.com/evermemos/evermemos-python#with_streaming_response
|
|
40
|
+
"""
|
|
41
|
+
return GlobalUserProfileResourceWithStreamingResponse(self)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class AsyncGlobalUserProfileResource(AsyncAPIResource):
|
|
45
|
+
@cached_property
|
|
46
|
+
def custom(self) -> AsyncCustomResource:
|
|
47
|
+
return AsyncCustomResource(self._client)
|
|
48
|
+
|
|
49
|
+
@cached_property
|
|
50
|
+
def with_raw_response(self) -> AsyncGlobalUserProfileResourceWithRawResponse:
|
|
51
|
+
"""
|
|
52
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
53
|
+
the raw response object instead of the parsed content.
|
|
54
|
+
|
|
55
|
+
For more information, see https://www.github.com/evermemos/evermemos-python#accessing-raw-response-data-eg-headers
|
|
56
|
+
"""
|
|
57
|
+
return AsyncGlobalUserProfileResourceWithRawResponse(self)
|
|
58
|
+
|
|
59
|
+
@cached_property
|
|
60
|
+
def with_streaming_response(self) -> AsyncGlobalUserProfileResourceWithStreamingResponse:
|
|
61
|
+
"""
|
|
62
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
63
|
+
|
|
64
|
+
For more information, see https://www.github.com/evermemos/evermemos-python#with_streaming_response
|
|
65
|
+
"""
|
|
66
|
+
return AsyncGlobalUserProfileResourceWithStreamingResponse(self)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class GlobalUserProfileResourceWithRawResponse:
|
|
70
|
+
def __init__(self, global_user_profile: GlobalUserProfileResource) -> None:
|
|
71
|
+
self._global_user_profile = global_user_profile
|
|
72
|
+
|
|
73
|
+
@cached_property
|
|
74
|
+
def custom(self) -> CustomResourceWithRawResponse:
|
|
75
|
+
return CustomResourceWithRawResponse(self._global_user_profile.custom)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class AsyncGlobalUserProfileResourceWithRawResponse:
|
|
79
|
+
def __init__(self, global_user_profile: AsyncGlobalUserProfileResource) -> None:
|
|
80
|
+
self._global_user_profile = global_user_profile
|
|
81
|
+
|
|
82
|
+
@cached_property
|
|
83
|
+
def custom(self) -> AsyncCustomResourceWithRawResponse:
|
|
84
|
+
return AsyncCustomResourceWithRawResponse(self._global_user_profile.custom)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class GlobalUserProfileResourceWithStreamingResponse:
|
|
88
|
+
def __init__(self, global_user_profile: GlobalUserProfileResource) -> None:
|
|
89
|
+
self._global_user_profile = global_user_profile
|
|
90
|
+
|
|
91
|
+
@cached_property
|
|
92
|
+
def custom(self) -> CustomResourceWithStreamingResponse:
|
|
93
|
+
return CustomResourceWithStreamingResponse(self._global_user_profile.custom)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class AsyncGlobalUserProfileResourceWithStreamingResponse:
|
|
97
|
+
def __init__(self, global_user_profile: AsyncGlobalUserProfileResource) -> None:
|
|
98
|
+
self._global_user_profile = global_user_profile
|
|
99
|
+
|
|
100
|
+
@cached_property
|
|
101
|
+
def custom(self) -> AsyncCustomResourceWithStreamingResponse:
|
|
102
|
+
return AsyncCustomResourceWithStreamingResponse(self._global_user_profile.custom)
|
|
@@ -52,7 +52,6 @@ class ConversationMetaResource(SyncAPIResource):
|
|
|
52
52
|
name: str,
|
|
53
53
|
scene: str,
|
|
54
54
|
scene_desc: Dict[str, object],
|
|
55
|
-
version: str,
|
|
56
55
|
default_timezone: Optional[str] | Omit = omit,
|
|
57
56
|
description: Optional[str] | Omit = omit,
|
|
58
57
|
group_id: Optional[str] | Omit = omit,
|
|
@@ -69,19 +68,6 @@ class ConversationMetaResource(SyncAPIResource):
|
|
|
69
68
|
Save conversation metadata information, including scene, participants, tags,
|
|
70
69
|
etc.
|
|
71
70
|
|
|
72
|
-
## Functionality:
|
|
73
|
-
- If group_id exists, update the entire record (upsert)
|
|
74
|
-
- If group_id does not exist, create a new record
|
|
75
|
-
- If group_id is omitted, save as default config for the scene
|
|
76
|
-
- All fields must be provided with complete data
|
|
77
|
-
|
|
78
|
-
## Default Config:
|
|
79
|
-
- Default config is used as fallback when specific group_id config not found
|
|
80
|
-
|
|
81
|
-
## Notes:
|
|
82
|
-
- This is a full update interface that will replace the entire record
|
|
83
|
-
- If you only need to update partial fields, use the PATCH /conversation-meta interface
|
|
84
|
-
|
|
85
71
|
Args:
|
|
86
72
|
created_at: Conversation creation time (ISO 8601 format)
|
|
87
73
|
|
|
@@ -97,8 +83,6 @@ class ConversationMetaResource(SyncAPIResource):
|
|
|
97
83
|
|
|
98
84
|
scene_desc: Scene description object, can include fields like description
|
|
99
85
|
|
|
100
|
-
version: Metadata version number
|
|
101
|
-
|
|
102
86
|
default_timezone: Default timezone
|
|
103
87
|
|
|
104
88
|
description: Conversation description
|
|
@@ -126,7 +110,6 @@ class ConversationMetaResource(SyncAPIResource):
|
|
|
126
110
|
"name": name,
|
|
127
111
|
"scene": scene,
|
|
128
112
|
"scene_desc": scene_desc,
|
|
129
|
-
"version": version,
|
|
130
113
|
"default_timezone": default_timezone,
|
|
131
114
|
"description": description,
|
|
132
115
|
"group_id": group_id,
|
|
@@ -161,12 +144,6 @@ class ConversationMetaResource(SyncAPIResource):
|
|
|
161
144
|
"""
|
|
162
145
|
Partially update conversation metadata, only updating provided fields
|
|
163
146
|
|
|
164
|
-
## Functionality:
|
|
165
|
-
- Locate the conversation metadata to update by group_id
|
|
166
|
-
- When group_id is null or not provided, updates the default config
|
|
167
|
-
- Only update fields provided in the request, keep unchanged fields as-is
|
|
168
|
-
- Suitable for scenarios requiring modification of partial information
|
|
169
|
-
|
|
170
147
|
Args:
|
|
171
148
|
default_timezone: New default timezone
|
|
172
149
|
|
|
@@ -220,22 +197,7 @@ class ConversationMetaResource(SyncAPIResource):
|
|
|
220
197
|
extra_body: Body | None = None,
|
|
221
198
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
222
199
|
) -> ConversationMetaGetResponse:
|
|
223
|
-
"""
|
|
224
|
-
Retrieve conversation metadata by group_id with fallback to default config
|
|
225
|
-
|
|
226
|
-
## Functionality:
|
|
227
|
-
- Query by group_id to get conversation metadata
|
|
228
|
-
- If group_id not found, fallback to default config
|
|
229
|
-
- If group_id not provided, returns default config
|
|
230
|
-
|
|
231
|
-
## Fallback Logic:
|
|
232
|
-
- Try exact group_id first, then use default config
|
|
233
|
-
|
|
234
|
-
## Use Cases:
|
|
235
|
-
- Get specific group's metadata
|
|
236
|
-
- Get default settings (group_id not provided or null)
|
|
237
|
-
- Auto-fallback to defaults when group config not set
|
|
238
|
-
"""
|
|
200
|
+
"""Retrieve conversation metadata by group_id with fallback to default config"""
|
|
239
201
|
return self._get(
|
|
240
202
|
"/api/v1/memories/conversation-meta",
|
|
241
203
|
options=make_request_options(
|
|
@@ -272,7 +234,6 @@ class AsyncConversationMetaResource(AsyncAPIResource):
|
|
|
272
234
|
name: str,
|
|
273
235
|
scene: str,
|
|
274
236
|
scene_desc: Dict[str, object],
|
|
275
|
-
version: str,
|
|
276
237
|
default_timezone: Optional[str] | Omit = omit,
|
|
277
238
|
description: Optional[str] | Omit = omit,
|
|
278
239
|
group_id: Optional[str] | Omit = omit,
|
|
@@ -289,19 +250,6 @@ class AsyncConversationMetaResource(AsyncAPIResource):
|
|
|
289
250
|
Save conversation metadata information, including scene, participants, tags,
|
|
290
251
|
etc.
|
|
291
252
|
|
|
292
|
-
## Functionality:
|
|
293
|
-
- If group_id exists, update the entire record (upsert)
|
|
294
|
-
- If group_id does not exist, create a new record
|
|
295
|
-
- If group_id is omitted, save as default config for the scene
|
|
296
|
-
- All fields must be provided with complete data
|
|
297
|
-
|
|
298
|
-
## Default Config:
|
|
299
|
-
- Default config is used as fallback when specific group_id config not found
|
|
300
|
-
|
|
301
|
-
## Notes:
|
|
302
|
-
- This is a full update interface that will replace the entire record
|
|
303
|
-
- If you only need to update partial fields, use the PATCH /conversation-meta interface
|
|
304
|
-
|
|
305
253
|
Args:
|
|
306
254
|
created_at: Conversation creation time (ISO 8601 format)
|
|
307
255
|
|
|
@@ -317,8 +265,6 @@ class AsyncConversationMetaResource(AsyncAPIResource):
|
|
|
317
265
|
|
|
318
266
|
scene_desc: Scene description object, can include fields like description
|
|
319
267
|
|
|
320
|
-
version: Metadata version number
|
|
321
|
-
|
|
322
268
|
default_timezone: Default timezone
|
|
323
269
|
|
|
324
270
|
description: Conversation description
|
|
@@ -346,7 +292,6 @@ class AsyncConversationMetaResource(AsyncAPIResource):
|
|
|
346
292
|
"name": name,
|
|
347
293
|
"scene": scene,
|
|
348
294
|
"scene_desc": scene_desc,
|
|
349
|
-
"version": version,
|
|
350
295
|
"default_timezone": default_timezone,
|
|
351
296
|
"description": description,
|
|
352
297
|
"group_id": group_id,
|
|
@@ -381,12 +326,6 @@ class AsyncConversationMetaResource(AsyncAPIResource):
|
|
|
381
326
|
"""
|
|
382
327
|
Partially update conversation metadata, only updating provided fields
|
|
383
328
|
|
|
384
|
-
## Functionality:
|
|
385
|
-
- Locate the conversation metadata to update by group_id
|
|
386
|
-
- When group_id is null or not provided, updates the default config
|
|
387
|
-
- Only update fields provided in the request, keep unchanged fields as-is
|
|
388
|
-
- Suitable for scenarios requiring modification of partial information
|
|
389
|
-
|
|
390
329
|
Args:
|
|
391
330
|
default_timezone: New default timezone
|
|
392
331
|
|
|
@@ -440,22 +379,7 @@ class AsyncConversationMetaResource(AsyncAPIResource):
|
|
|
440
379
|
extra_body: Body | None = None,
|
|
441
380
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
442
381
|
) -> ConversationMetaGetResponse:
|
|
443
|
-
"""
|
|
444
|
-
Retrieve conversation metadata by group_id with fallback to default config
|
|
445
|
-
|
|
446
|
-
## Functionality:
|
|
447
|
-
- Query by group_id to get conversation metadata
|
|
448
|
-
- If group_id not found, fallback to default config
|
|
449
|
-
- If group_id not provided, returns default config
|
|
450
|
-
|
|
451
|
-
## Fallback Logic:
|
|
452
|
-
- Try exact group_id first, then use default config
|
|
453
|
-
|
|
454
|
-
## Use Cases:
|
|
455
|
-
- Get specific group's metadata
|
|
456
|
-
- Get default settings (group_id not provided or null)
|
|
457
|
-
- Auto-fallback to defaults when group config not set
|
|
458
|
-
"""
|
|
382
|
+
"""Retrieve conversation metadata by group_id with fallback to default config"""
|
|
459
383
|
return await self._get(
|
|
460
384
|
"/api/v1/memories/conversation-meta",
|
|
461
385
|
options=make_request_options(
|