evermemos 0.3.9__py3-none-any.whl → 0.3.11__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/_base_client.py +5 -2
- evermemos/_client.py +20 -20
- evermemos/_compat.py +3 -3
- evermemos/_utils/_json.py +35 -0
- evermemos/_version.py +1 -1
- evermemos/resources/__init__.py +13 -13
- evermemos/resources/v0/__init__.py +47 -0
- evermemos/resources/{v1 → v0}/memories/conversation_meta.py +148 -20
- evermemos/resources/{v1 → v0}/memories/memories.py +176 -193
- evermemos/resources/v0/status/__init__.py +33 -0
- evermemos/resources/v0/status/request.py +175 -0
- evermemos/resources/v0/status/status.py +102 -0
- evermemos/resources/{v1/v1.py → v0/v0.py} +59 -27
- evermemos/types/{v1 → v0}/__init__.py +2 -4
- evermemos/types/v0/memories/conversation_meta_create_params.py +144 -0
- evermemos/types/v0/memories/conversation_meta_create_response.py +109 -0
- evermemos/types/v0/memories/conversation_meta_get_response.py +109 -0
- evermemos/types/v0/memories/conversation_meta_update_params.py +117 -0
- evermemos/types/{v1 → v0}/memories/conversation_meta_update_response.py +11 -0
- evermemos/types/v0/memory_add_params.py +60 -0
- evermemos/types/{v1/memory_create_response.py → v0/memory_add_response.py} +2 -2
- evermemos/types/{v1 → v0}/memory_delete_params.py +9 -0
- evermemos/types/{v1 → v0}/memory_delete_response.py +7 -0
- evermemos/types/{v1 → v0}/memory_get_response.py +13 -87
- evermemos/types/v0/memory_search_response.py +196 -0
- evermemos/types/v0/status/__init__.py +6 -0
- evermemos/types/v0/status/request_get_params.py +13 -0
- evermemos/types/v0/status/request_get_response.py +21 -0
- {evermemos-0.3.9.dist-info → evermemos-0.3.11.dist-info}/METADATA +24 -26
- evermemos-0.3.11.dist-info/RECORD +61 -0
- evermemos/resources/v1/__init__.py +0 -33
- evermemos/types/v1/global_user_profile/__init__.py +0 -3
- evermemos/types/v1/memories/conversation_meta_create_params.py +0 -38
- evermemos/types/v1/memories/conversation_meta_create_response.py +0 -41
- evermemos/types/v1/memories/conversation_meta_get_response.py +0 -41
- evermemos/types/v1/memories/conversation_meta_update_params.py +0 -34
- evermemos/types/v1/memory_create_params.py +0 -32
- evermemos/types/v1/memory_load_params.py +0 -56
- evermemos/types/v1/memory_load_response.py +0 -19
- evermemos/types/v1/memory_search_response.py +0 -99
- evermemos/types/v1/stats/__init__.py +0 -3
- evermemos-0.3.9.dist-info/RECORD +0 -58
- /evermemos/resources/{v1 → v0}/memories/__init__.py +0 -0
- /evermemos/types/{v1 → v0}/memories/__init__.py +0 -0
- /evermemos/types/{v1 → v0}/memory_type.py +0 -0
- /evermemos/types/{v1 → v0}/metadata.py +0 -0
- {evermemos-0.3.9.dist-info → evermemos-0.3.11.dist-info}/WHEEL +0 -0
- {evermemos-0.3.9.dist-info → evermemos-0.3.11.dist-info}/licenses/LICENSE +0 -0
evermemos/_base_client.py
CHANGED
|
@@ -86,6 +86,7 @@ from ._exceptions import (
|
|
|
86
86
|
APIConnectionError,
|
|
87
87
|
APIResponseValidationError,
|
|
88
88
|
)
|
|
89
|
+
from ._utils._json import openapi_dumps
|
|
89
90
|
|
|
90
91
|
log: logging.Logger = logging.getLogger(__name__)
|
|
91
92
|
|
|
@@ -554,8 +555,10 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
|
554
555
|
kwargs["content"] = options.content
|
|
555
556
|
elif isinstance(json_data, bytes):
|
|
556
557
|
kwargs["content"] = json_data
|
|
557
|
-
|
|
558
|
-
|
|
558
|
+
elif not files:
|
|
559
|
+
# Don't set content when JSON is sent as multipart/form-data,
|
|
560
|
+
# since httpx's content param overrides other body arguments
|
|
561
|
+
kwargs["content"] = openapi_dumps(json_data) if is_given(json_data) and json_data is not None else None
|
|
559
562
|
kwargs["files"] = files
|
|
560
563
|
else:
|
|
561
564
|
headers.pop("Content-Type", None)
|
evermemos/_client.py
CHANGED
|
@@ -31,8 +31,8 @@ from ._base_client import (
|
|
|
31
31
|
)
|
|
32
32
|
|
|
33
33
|
if TYPE_CHECKING:
|
|
34
|
-
from .resources import
|
|
35
|
-
from .resources.
|
|
34
|
+
from .resources import v0
|
|
35
|
+
from .resources.v0.v0 import V0Resource, AsyncV0Resource
|
|
36
36
|
|
|
37
37
|
__all__ = [
|
|
38
38
|
"Timeout",
|
|
@@ -102,10 +102,10 @@ class EverMemOS(SyncAPIClient):
|
|
|
102
102
|
)
|
|
103
103
|
|
|
104
104
|
@cached_property
|
|
105
|
-
def
|
|
106
|
-
from .resources.
|
|
105
|
+
def v0(self) -> V0Resource:
|
|
106
|
+
from .resources.v0 import V0Resource
|
|
107
107
|
|
|
108
|
-
return
|
|
108
|
+
return V0Resource(self)
|
|
109
109
|
|
|
110
110
|
@cached_property
|
|
111
111
|
def with_raw_response(self) -> EverMemOSWithRawResponse:
|
|
@@ -276,10 +276,10 @@ class AsyncEverMemOS(AsyncAPIClient):
|
|
|
276
276
|
)
|
|
277
277
|
|
|
278
278
|
@cached_property
|
|
279
|
-
def
|
|
280
|
-
from .resources.
|
|
279
|
+
def v0(self) -> AsyncV0Resource:
|
|
280
|
+
from .resources.v0 import AsyncV0Resource
|
|
281
281
|
|
|
282
|
-
return
|
|
282
|
+
return AsyncV0Resource(self)
|
|
283
283
|
|
|
284
284
|
@cached_property
|
|
285
285
|
def with_raw_response(self) -> AsyncEverMemOSWithRawResponse:
|
|
@@ -401,10 +401,10 @@ class EverMemOSWithRawResponse:
|
|
|
401
401
|
self._client = client
|
|
402
402
|
|
|
403
403
|
@cached_property
|
|
404
|
-
def
|
|
405
|
-
from .resources.
|
|
404
|
+
def v0(self) -> v0.V0ResourceWithRawResponse:
|
|
405
|
+
from .resources.v0 import V0ResourceWithRawResponse
|
|
406
406
|
|
|
407
|
-
return
|
|
407
|
+
return V0ResourceWithRawResponse(self._client.v0)
|
|
408
408
|
|
|
409
409
|
|
|
410
410
|
class AsyncEverMemOSWithRawResponse:
|
|
@@ -414,10 +414,10 @@ class AsyncEverMemOSWithRawResponse:
|
|
|
414
414
|
self._client = client
|
|
415
415
|
|
|
416
416
|
@cached_property
|
|
417
|
-
def
|
|
418
|
-
from .resources.
|
|
417
|
+
def v0(self) -> v0.AsyncV0ResourceWithRawResponse:
|
|
418
|
+
from .resources.v0 import AsyncV0ResourceWithRawResponse
|
|
419
419
|
|
|
420
|
-
return
|
|
420
|
+
return AsyncV0ResourceWithRawResponse(self._client.v0)
|
|
421
421
|
|
|
422
422
|
|
|
423
423
|
class EverMemOSWithStreamedResponse:
|
|
@@ -427,10 +427,10 @@ class EverMemOSWithStreamedResponse:
|
|
|
427
427
|
self._client = client
|
|
428
428
|
|
|
429
429
|
@cached_property
|
|
430
|
-
def
|
|
431
|
-
from .resources.
|
|
430
|
+
def v0(self) -> v0.V0ResourceWithStreamingResponse:
|
|
431
|
+
from .resources.v0 import V0ResourceWithStreamingResponse
|
|
432
432
|
|
|
433
|
-
return
|
|
433
|
+
return V0ResourceWithStreamingResponse(self._client.v0)
|
|
434
434
|
|
|
435
435
|
|
|
436
436
|
class AsyncEverMemOSWithStreamedResponse:
|
|
@@ -440,10 +440,10 @@ class AsyncEverMemOSWithStreamedResponse:
|
|
|
440
440
|
self._client = client
|
|
441
441
|
|
|
442
442
|
@cached_property
|
|
443
|
-
def
|
|
444
|
-
from .resources.
|
|
443
|
+
def v0(self) -> v0.AsyncV0ResourceWithStreamingResponse:
|
|
444
|
+
from .resources.v0 import AsyncV0ResourceWithStreamingResponse
|
|
445
445
|
|
|
446
|
-
return
|
|
446
|
+
return AsyncV0ResourceWithStreamingResponse(self._client.v0)
|
|
447
447
|
|
|
448
448
|
|
|
449
449
|
Client = EverMemOS
|
evermemos/_compat.py
CHANGED
|
@@ -139,6 +139,7 @@ def model_dump(
|
|
|
139
139
|
exclude_defaults: bool = False,
|
|
140
140
|
warnings: bool = True,
|
|
141
141
|
mode: Literal["json", "python"] = "python",
|
|
142
|
+
by_alias: bool | None = None,
|
|
142
143
|
) -> dict[str, Any]:
|
|
143
144
|
if (not PYDANTIC_V1) or hasattr(model, "model_dump"):
|
|
144
145
|
return model.model_dump(
|
|
@@ -148,13 +149,12 @@ def model_dump(
|
|
|
148
149
|
exclude_defaults=exclude_defaults,
|
|
149
150
|
# warnings are not supported in Pydantic v1
|
|
150
151
|
warnings=True if PYDANTIC_V1 else warnings,
|
|
152
|
+
by_alias=by_alias,
|
|
151
153
|
)
|
|
152
154
|
return cast(
|
|
153
155
|
"dict[str, Any]",
|
|
154
156
|
model.dict( # pyright: ignore[reportDeprecated, reportUnnecessaryCast]
|
|
155
|
-
exclude=exclude,
|
|
156
|
-
exclude_unset=exclude_unset,
|
|
157
|
-
exclude_defaults=exclude_defaults,
|
|
157
|
+
exclude=exclude, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, by_alias=bool(by_alias)
|
|
158
158
|
),
|
|
159
159
|
)
|
|
160
160
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import json
|
|
2
|
+
from typing import Any
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from typing_extensions import override
|
|
5
|
+
|
|
6
|
+
import pydantic
|
|
7
|
+
|
|
8
|
+
from .._compat import model_dump
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def openapi_dumps(obj: Any) -> bytes:
|
|
12
|
+
"""
|
|
13
|
+
Serialize an object to UTF-8 encoded JSON bytes.
|
|
14
|
+
|
|
15
|
+
Extends the standard json.dumps with support for additional types
|
|
16
|
+
commonly used in the SDK, such as `datetime`, `pydantic.BaseModel`, etc.
|
|
17
|
+
"""
|
|
18
|
+
return json.dumps(
|
|
19
|
+
obj,
|
|
20
|
+
cls=_CustomEncoder,
|
|
21
|
+
# Uses the same defaults as httpx's JSON serialization
|
|
22
|
+
ensure_ascii=False,
|
|
23
|
+
separators=(",", ":"),
|
|
24
|
+
allow_nan=False,
|
|
25
|
+
).encode()
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class _CustomEncoder(json.JSONEncoder):
|
|
29
|
+
@override
|
|
30
|
+
def default(self, o: Any) -> Any:
|
|
31
|
+
if isinstance(o, datetime):
|
|
32
|
+
return o.isoformat()
|
|
33
|
+
if isinstance(o, pydantic.BaseModel):
|
|
34
|
+
return model_dump(o, exclude_unset=True, mode="json", by_alias=True)
|
|
35
|
+
return super().default(o)
|
evermemos/_version.py
CHANGED
evermemos/resources/__init__.py
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
from .
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
from .v0 import (
|
|
4
|
+
V0Resource,
|
|
5
|
+
AsyncV0Resource,
|
|
6
|
+
V0ResourceWithRawResponse,
|
|
7
|
+
AsyncV0ResourceWithRawResponse,
|
|
8
|
+
V0ResourceWithStreamingResponse,
|
|
9
|
+
AsyncV0ResourceWithStreamingResponse,
|
|
10
10
|
)
|
|
11
11
|
|
|
12
12
|
__all__ = [
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
13
|
+
"V0Resource",
|
|
14
|
+
"AsyncV0Resource",
|
|
15
|
+
"V0ResourceWithRawResponse",
|
|
16
|
+
"AsyncV0ResourceWithRawResponse",
|
|
17
|
+
"V0ResourceWithStreamingResponse",
|
|
18
|
+
"AsyncV0ResourceWithStreamingResponse",
|
|
19
19
|
]
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .v0 import (
|
|
4
|
+
V0Resource,
|
|
5
|
+
AsyncV0Resource,
|
|
6
|
+
V0ResourceWithRawResponse,
|
|
7
|
+
AsyncV0ResourceWithRawResponse,
|
|
8
|
+
V0ResourceWithStreamingResponse,
|
|
9
|
+
AsyncV0ResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
11
|
+
from .status import (
|
|
12
|
+
StatusResource,
|
|
13
|
+
AsyncStatusResource,
|
|
14
|
+
StatusResourceWithRawResponse,
|
|
15
|
+
AsyncStatusResourceWithRawResponse,
|
|
16
|
+
StatusResourceWithStreamingResponse,
|
|
17
|
+
AsyncStatusResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
from .memories import (
|
|
20
|
+
MemoriesResource,
|
|
21
|
+
AsyncMemoriesResource,
|
|
22
|
+
MemoriesResourceWithRawResponse,
|
|
23
|
+
AsyncMemoriesResourceWithRawResponse,
|
|
24
|
+
MemoriesResourceWithStreamingResponse,
|
|
25
|
+
AsyncMemoriesResourceWithStreamingResponse,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
__all__ = [
|
|
29
|
+
"MemoriesResource",
|
|
30
|
+
"AsyncMemoriesResource",
|
|
31
|
+
"MemoriesResourceWithRawResponse",
|
|
32
|
+
"AsyncMemoriesResourceWithRawResponse",
|
|
33
|
+
"MemoriesResourceWithStreamingResponse",
|
|
34
|
+
"AsyncMemoriesResourceWithStreamingResponse",
|
|
35
|
+
"StatusResource",
|
|
36
|
+
"AsyncStatusResource",
|
|
37
|
+
"StatusResourceWithRawResponse",
|
|
38
|
+
"AsyncStatusResourceWithRawResponse",
|
|
39
|
+
"StatusResourceWithStreamingResponse",
|
|
40
|
+
"AsyncStatusResourceWithStreamingResponse",
|
|
41
|
+
"V0Resource",
|
|
42
|
+
"AsyncV0Resource",
|
|
43
|
+
"V0ResourceWithRawResponse",
|
|
44
|
+
"AsyncV0ResourceWithRawResponse",
|
|
45
|
+
"V0ResourceWithStreamingResponse",
|
|
46
|
+
"AsyncV0ResourceWithStreamingResponse",
|
|
47
|
+
]
|
|
@@ -17,10 +17,10 @@ from ...._response import (
|
|
|
17
17
|
async_to_streamed_response_wrapper,
|
|
18
18
|
)
|
|
19
19
|
from ...._base_client import make_request_options
|
|
20
|
-
from ....types.
|
|
21
|
-
from ....types.
|
|
22
|
-
from ....types.
|
|
23
|
-
from ....types.
|
|
20
|
+
from ....types.v0.memories import conversation_meta_create_params, conversation_meta_update_params
|
|
21
|
+
from ....types.v0.memories.conversation_meta_get_response import ConversationMetaGetResponse
|
|
22
|
+
from ....types.v0.memories.conversation_meta_create_response import ConversationMetaCreateResponse
|
|
23
|
+
from ....types.v0.memories.conversation_meta_update_response import ConversationMetaUpdateResponse
|
|
24
24
|
|
|
25
25
|
__all__ = ["ConversationMetaResource", "AsyncConversationMetaResource"]
|
|
26
26
|
|
|
@@ -49,11 +49,13 @@ class ConversationMetaResource(SyncAPIResource):
|
|
|
49
49
|
self,
|
|
50
50
|
*,
|
|
51
51
|
created_at: str,
|
|
52
|
-
name: str,
|
|
53
|
-
scene: str,
|
|
54
|
-
scene_desc: Dict[str, object],
|
|
55
52
|
default_timezone: Optional[str] | Omit = omit,
|
|
53
|
+
description: Optional[str] | Omit = omit,
|
|
56
54
|
group_id: Optional[str] | Omit = omit,
|
|
55
|
+
llm_custom_setting: Optional[conversation_meta_create_params.LlmCustomSetting] | Omit = omit,
|
|
56
|
+
name: Optional[str] | Omit = omit,
|
|
57
|
+
scene: Optional[str] | Omit = omit,
|
|
58
|
+
scene_desc: Optional[Dict[str, object]] | Omit = omit,
|
|
57
59
|
tags: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
58
60
|
user_details: Optional[Dict[str, conversation_meta_create_params.UserDetails]] | Omit = omit,
|
|
59
61
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -68,6 +70,43 @@ class ConversationMetaResource(SyncAPIResource):
|
|
|
68
70
|
etc.
|
|
69
71
|
|
|
70
72
|
Args:
|
|
73
|
+
created_at: Conversation creation time (ISO 8601 format with Timezone is required)
|
|
74
|
+
|
|
75
|
+
default_timezone: Default timezone
|
|
76
|
+
|
|
77
|
+
description: Conversation description
|
|
78
|
+
|
|
79
|
+
group_id: Group unique identifier. When null/not provided, represents default settings for
|
|
80
|
+
this scene.
|
|
81
|
+
|
|
82
|
+
llm_custom_setting: LLM custom settings for algorithm control. **Only for global config
|
|
83
|
+
(group_id=null), not allowed for group config (group_id provided).**
|
|
84
|
+
|
|
85
|
+
Allows configuring different LLM providers/models for different tasks like
|
|
86
|
+
boundary detection and memory extraction.
|
|
87
|
+
|
|
88
|
+
name: Group/conversation name. **Required for group config (group_id provided), not
|
|
89
|
+
allowed for global config (group_id=null).**
|
|
90
|
+
|
|
91
|
+
scene: Scene identifier. **Required for global config (group_id=null), not allowed for
|
|
92
|
+
group config (group_id provided).**
|
|
93
|
+
|
|
94
|
+
Enum values from ScenarioType:
|
|
95
|
+
|
|
96
|
+
- group_chat: work/group chat scenario, suitable for group conversations such as
|
|
97
|
+
multi-person collaboration and project discussions
|
|
98
|
+
- assistant: assistant scenario, suitable for one-on-one AI assistant
|
|
99
|
+
conversations
|
|
100
|
+
|
|
101
|
+
scene_desc: Scene description object. **Required for global config (group_id=null), not
|
|
102
|
+
allowed for group config (group_id provided).**
|
|
103
|
+
|
|
104
|
+
Can include fields like description, type, etc.
|
|
105
|
+
|
|
106
|
+
tags: Tag list
|
|
107
|
+
|
|
108
|
+
user_details: Participant details, key is user ID, value is user detail object
|
|
109
|
+
|
|
71
110
|
extra_headers: Send extra headers
|
|
72
111
|
|
|
73
112
|
extra_query: Add additional query parameters to the request
|
|
@@ -77,15 +116,17 @@ class ConversationMetaResource(SyncAPIResource):
|
|
|
77
116
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
78
117
|
"""
|
|
79
118
|
return self._post(
|
|
80
|
-
"/api/
|
|
119
|
+
"/api/v0/memories/conversation-meta",
|
|
81
120
|
body=maybe_transform(
|
|
82
121
|
{
|
|
83
122
|
"created_at": created_at,
|
|
123
|
+
"default_timezone": default_timezone,
|
|
124
|
+
"description": description,
|
|
125
|
+
"group_id": group_id,
|
|
126
|
+
"llm_custom_setting": llm_custom_setting,
|
|
84
127
|
"name": name,
|
|
85
128
|
"scene": scene,
|
|
86
129
|
"scene_desc": scene_desc,
|
|
87
|
-
"default_timezone": default_timezone,
|
|
88
|
-
"group_id": group_id,
|
|
89
130
|
"tags": tags,
|
|
90
131
|
"user_details": user_details,
|
|
91
132
|
},
|
|
@@ -101,7 +142,9 @@ class ConversationMetaResource(SyncAPIResource):
|
|
|
101
142
|
self,
|
|
102
143
|
*,
|
|
103
144
|
default_timezone: Optional[str] | Omit = omit,
|
|
145
|
+
description: Optional[str] | Omit = omit,
|
|
104
146
|
group_id: Optional[str] | Omit = omit,
|
|
147
|
+
llm_custom_setting: Optional[conversation_meta_update_params.LlmCustomSetting] | Omit = omit,
|
|
105
148
|
name: Optional[str] | Omit = omit,
|
|
106
149
|
scene_desc: Optional[Dict[str, object]] | Omit = omit,
|
|
107
150
|
tags: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
@@ -117,6 +160,25 @@ class ConversationMetaResource(SyncAPIResource):
|
|
|
117
160
|
Partially update conversation metadata, only updating provided fields
|
|
118
161
|
|
|
119
162
|
Args:
|
|
163
|
+
default_timezone: New default timezone
|
|
164
|
+
|
|
165
|
+
description: New description
|
|
166
|
+
|
|
167
|
+
group_id: Group ID to update. When null, updates the global (default) config.
|
|
168
|
+
|
|
169
|
+
llm_custom_setting: New LLM custom settings. **Only allowed for global config (group_id=null). Not
|
|
170
|
+
allowed for group config (inherited from global config).**
|
|
171
|
+
|
|
172
|
+
name: New group/conversation name. **Only allowed for group config (group_id
|
|
173
|
+
provided). Not allowed for global config.**
|
|
174
|
+
|
|
175
|
+
scene_desc: New scene description. **Only allowed for global config (group_id=null). Not
|
|
176
|
+
allowed for group config (inherited from global config).**
|
|
177
|
+
|
|
178
|
+
tags: New tag list
|
|
179
|
+
|
|
180
|
+
user_details: New user details (will completely replace existing user_details)
|
|
181
|
+
|
|
120
182
|
extra_headers: Send extra headers
|
|
121
183
|
|
|
122
184
|
extra_query: Add additional query parameters to the request
|
|
@@ -126,11 +188,13 @@ class ConversationMetaResource(SyncAPIResource):
|
|
|
126
188
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
127
189
|
"""
|
|
128
190
|
return self._patch(
|
|
129
|
-
"/api/
|
|
191
|
+
"/api/v0/memories/conversation-meta",
|
|
130
192
|
body=maybe_transform(
|
|
131
193
|
{
|
|
132
194
|
"default_timezone": default_timezone,
|
|
195
|
+
"description": description,
|
|
133
196
|
"group_id": group_id,
|
|
197
|
+
"llm_custom_setting": llm_custom_setting,
|
|
134
198
|
"name": name,
|
|
135
199
|
"scene_desc": scene_desc,
|
|
136
200
|
"tags": tags,
|
|
@@ -156,7 +220,7 @@ class ConversationMetaResource(SyncAPIResource):
|
|
|
156
220
|
) -> ConversationMetaGetResponse:
|
|
157
221
|
"""Retrieve conversation metadata by group_id with fallback to default config"""
|
|
158
222
|
return self._get(
|
|
159
|
-
"/api/
|
|
223
|
+
"/api/v0/memories/conversation-meta",
|
|
160
224
|
options=make_request_options(
|
|
161
225
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
162
226
|
),
|
|
@@ -188,11 +252,13 @@ class AsyncConversationMetaResource(AsyncAPIResource):
|
|
|
188
252
|
self,
|
|
189
253
|
*,
|
|
190
254
|
created_at: str,
|
|
191
|
-
name: str,
|
|
192
|
-
scene: str,
|
|
193
|
-
scene_desc: Dict[str, object],
|
|
194
255
|
default_timezone: Optional[str] | Omit = omit,
|
|
256
|
+
description: Optional[str] | Omit = omit,
|
|
195
257
|
group_id: Optional[str] | Omit = omit,
|
|
258
|
+
llm_custom_setting: Optional[conversation_meta_create_params.LlmCustomSetting] | Omit = omit,
|
|
259
|
+
name: Optional[str] | Omit = omit,
|
|
260
|
+
scene: Optional[str] | Omit = omit,
|
|
261
|
+
scene_desc: Optional[Dict[str, object]] | Omit = omit,
|
|
196
262
|
tags: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
197
263
|
user_details: Optional[Dict[str, conversation_meta_create_params.UserDetails]] | Omit = omit,
|
|
198
264
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -207,6 +273,43 @@ class AsyncConversationMetaResource(AsyncAPIResource):
|
|
|
207
273
|
etc.
|
|
208
274
|
|
|
209
275
|
Args:
|
|
276
|
+
created_at: Conversation creation time (ISO 8601 format with Timezone is required)
|
|
277
|
+
|
|
278
|
+
default_timezone: Default timezone
|
|
279
|
+
|
|
280
|
+
description: Conversation description
|
|
281
|
+
|
|
282
|
+
group_id: Group unique identifier. When null/not provided, represents default settings for
|
|
283
|
+
this scene.
|
|
284
|
+
|
|
285
|
+
llm_custom_setting: LLM custom settings for algorithm control. **Only for global config
|
|
286
|
+
(group_id=null), not allowed for group config (group_id provided).**
|
|
287
|
+
|
|
288
|
+
Allows configuring different LLM providers/models for different tasks like
|
|
289
|
+
boundary detection and memory extraction.
|
|
290
|
+
|
|
291
|
+
name: Group/conversation name. **Required for group config (group_id provided), not
|
|
292
|
+
allowed for global config (group_id=null).**
|
|
293
|
+
|
|
294
|
+
scene: Scene identifier. **Required for global config (group_id=null), not allowed for
|
|
295
|
+
group config (group_id provided).**
|
|
296
|
+
|
|
297
|
+
Enum values from ScenarioType:
|
|
298
|
+
|
|
299
|
+
- group_chat: work/group chat scenario, suitable for group conversations such as
|
|
300
|
+
multi-person collaboration and project discussions
|
|
301
|
+
- assistant: assistant scenario, suitable for one-on-one AI assistant
|
|
302
|
+
conversations
|
|
303
|
+
|
|
304
|
+
scene_desc: Scene description object. **Required for global config (group_id=null), not
|
|
305
|
+
allowed for group config (group_id provided).**
|
|
306
|
+
|
|
307
|
+
Can include fields like description, type, etc.
|
|
308
|
+
|
|
309
|
+
tags: Tag list
|
|
310
|
+
|
|
311
|
+
user_details: Participant details, key is user ID, value is user detail object
|
|
312
|
+
|
|
210
313
|
extra_headers: Send extra headers
|
|
211
314
|
|
|
212
315
|
extra_query: Add additional query parameters to the request
|
|
@@ -216,15 +319,17 @@ class AsyncConversationMetaResource(AsyncAPIResource):
|
|
|
216
319
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
217
320
|
"""
|
|
218
321
|
return await self._post(
|
|
219
|
-
"/api/
|
|
322
|
+
"/api/v0/memories/conversation-meta",
|
|
220
323
|
body=await async_maybe_transform(
|
|
221
324
|
{
|
|
222
325
|
"created_at": created_at,
|
|
326
|
+
"default_timezone": default_timezone,
|
|
327
|
+
"description": description,
|
|
328
|
+
"group_id": group_id,
|
|
329
|
+
"llm_custom_setting": llm_custom_setting,
|
|
223
330
|
"name": name,
|
|
224
331
|
"scene": scene,
|
|
225
332
|
"scene_desc": scene_desc,
|
|
226
|
-
"default_timezone": default_timezone,
|
|
227
|
-
"group_id": group_id,
|
|
228
333
|
"tags": tags,
|
|
229
334
|
"user_details": user_details,
|
|
230
335
|
},
|
|
@@ -240,7 +345,9 @@ class AsyncConversationMetaResource(AsyncAPIResource):
|
|
|
240
345
|
self,
|
|
241
346
|
*,
|
|
242
347
|
default_timezone: Optional[str] | Omit = omit,
|
|
348
|
+
description: Optional[str] | Omit = omit,
|
|
243
349
|
group_id: Optional[str] | Omit = omit,
|
|
350
|
+
llm_custom_setting: Optional[conversation_meta_update_params.LlmCustomSetting] | Omit = omit,
|
|
244
351
|
name: Optional[str] | Omit = omit,
|
|
245
352
|
scene_desc: Optional[Dict[str, object]] | Omit = omit,
|
|
246
353
|
tags: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
@@ -256,6 +363,25 @@ class AsyncConversationMetaResource(AsyncAPIResource):
|
|
|
256
363
|
Partially update conversation metadata, only updating provided fields
|
|
257
364
|
|
|
258
365
|
Args:
|
|
366
|
+
default_timezone: New default timezone
|
|
367
|
+
|
|
368
|
+
description: New description
|
|
369
|
+
|
|
370
|
+
group_id: Group ID to update. When null, updates the global (default) config.
|
|
371
|
+
|
|
372
|
+
llm_custom_setting: New LLM custom settings. **Only allowed for global config (group_id=null). Not
|
|
373
|
+
allowed for group config (inherited from global config).**
|
|
374
|
+
|
|
375
|
+
name: New group/conversation name. **Only allowed for group config (group_id
|
|
376
|
+
provided). Not allowed for global config.**
|
|
377
|
+
|
|
378
|
+
scene_desc: New scene description. **Only allowed for global config (group_id=null). Not
|
|
379
|
+
allowed for group config (inherited from global config).**
|
|
380
|
+
|
|
381
|
+
tags: New tag list
|
|
382
|
+
|
|
383
|
+
user_details: New user details (will completely replace existing user_details)
|
|
384
|
+
|
|
259
385
|
extra_headers: Send extra headers
|
|
260
386
|
|
|
261
387
|
extra_query: Add additional query parameters to the request
|
|
@@ -265,11 +391,13 @@ class AsyncConversationMetaResource(AsyncAPIResource):
|
|
|
265
391
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
266
392
|
"""
|
|
267
393
|
return await self._patch(
|
|
268
|
-
"/api/
|
|
394
|
+
"/api/v0/memories/conversation-meta",
|
|
269
395
|
body=await async_maybe_transform(
|
|
270
396
|
{
|
|
271
397
|
"default_timezone": default_timezone,
|
|
398
|
+
"description": description,
|
|
272
399
|
"group_id": group_id,
|
|
400
|
+
"llm_custom_setting": llm_custom_setting,
|
|
273
401
|
"name": name,
|
|
274
402
|
"scene_desc": scene_desc,
|
|
275
403
|
"tags": tags,
|
|
@@ -295,7 +423,7 @@ class AsyncConversationMetaResource(AsyncAPIResource):
|
|
|
295
423
|
) -> ConversationMetaGetResponse:
|
|
296
424
|
"""Retrieve conversation metadata by group_id with fallback to default config"""
|
|
297
425
|
return await self._get(
|
|
298
|
-
"/api/
|
|
426
|
+
"/api/v0/memories/conversation-meta",
|
|
299
427
|
options=make_request_options(
|
|
300
428
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
301
429
|
),
|