evermemos 0.3.6__py3-none-any.whl → 0.3.8__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.
@@ -0,0 +1,83 @@
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, Union, Iterable, Optional
6
+ from typing_extensions import Required, TypedDict
7
+
8
+ from ..._types import SequenceNotStr
9
+
10
+ __all__ = ["MemoryLoadParams", "ConversationMeta", "ConversationList"]
11
+
12
+
13
+ class MemoryLoadParams(TypedDict, total=False):
14
+ conversation_meta: Required[ConversationMeta]
15
+ """Conversation metadata for batch import."""
16
+
17
+ conversation_list: Optional[Iterable[ConversationList]]
18
+ """Message list."""
19
+
20
+ version: Optional[str]
21
+ """Format version."""
22
+
23
+
24
+ class ConversationMeta(TypedDict, total=False):
25
+ """Conversation metadata for batch import."""
26
+
27
+ group_id: Required[str]
28
+ """Conversation group ID (unique)."""
29
+
30
+ created_at: Optional[str]
31
+ """Conversation creation time (ISO 8601)."""
32
+
33
+ default_timezone: Optional[str]
34
+ """Default timezone."""
35
+
36
+ description: Optional[str]
37
+ """Conversation description."""
38
+
39
+ name: Optional[str]
40
+ """Conversation name."""
41
+
42
+ scene: Optional[str]
43
+ """Scene type (e.g., assistant, group_chat)."""
44
+
45
+ scene_desc: Optional[Dict[str, object]]
46
+ """Scene description object."""
47
+
48
+ tags: Optional[SequenceNotStr[str]]
49
+ """Tags for the conversation."""
50
+
51
+ user_details: Optional[Dict[str, object]]
52
+ """User details map keyed by user ID."""
53
+
54
+
55
+ class ConversationList(TypedDict, total=False):
56
+ """Message item for batch import."""
57
+
58
+ content: Optional[str]
59
+ """Message content."""
60
+
61
+ create_time: Union[str, int, None]
62
+ """Creation time (ISO 8601 or timestamp)."""
63
+
64
+ extra: Optional[Dict[str, object]]
65
+ """Additional data."""
66
+
67
+ message_id: Optional[str]
68
+ """Message ID."""
69
+
70
+ refer_list: Optional[Iterable[Dict[str, object]]]
71
+ """Referenced messages."""
72
+
73
+ role: Optional[str]
74
+ """Role (e.g., user, assistant)."""
75
+
76
+ sender: Optional[str]
77
+ """Sender ID."""
78
+
79
+ sender_name: Optional[str]
80
+ """Sender name."""
81
+
82
+ type: Optional[str]
83
+ """Message type (e.g., text, image)."""
@@ -0,0 +1,26 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["MemoryLoadResponse"]
8
+
9
+
10
+ class MemoryLoadResponse(BaseModel):
11
+ """Batch import response."""
12
+
13
+ imported_meta: Optional[bool] = None
14
+ """Whether conversation metadata was imported."""
15
+
16
+ message: Optional[str] = None
17
+ """Status message."""
18
+
19
+ request_id: Optional[str] = None
20
+ """Request ID of the last imported message."""
21
+
22
+ status: Optional[str] = None
23
+ """Queue status."""
24
+
25
+ total_count: Optional[int] = None
26
+ """Total number of messages."""
@@ -0,0 +1,6 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from .request_get_params import RequestGetParams as RequestGetParams
6
+ from .request_get_response import RequestGetResponse as RequestGetResponse
@@ -0,0 +1,13 @@
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 Optional
6
+ from typing_extensions import Required, TypedDict
7
+
8
+ __all__ = ["RequestGetParams"]
9
+
10
+
11
+ class RequestGetParams(TypedDict, total=False):
12
+ request_id: Required[Optional[str]]
13
+ """this id is returned by add_memories api"""
@@ -0,0 +1,26 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Dict, Optional
4
+
5
+ from ...._models import BaseModel
6
+
7
+ __all__ = ["RequestGetResponse"]
8
+
9
+
10
+ class RequestGetResponse(BaseModel):
11
+ """Request status response
12
+
13
+ Contains detailed status information of the request.
14
+ """
15
+
16
+ success: bool
17
+ """Whether the query was successful"""
18
+
19
+ data: Optional[Dict[str, object]] = None
20
+ """Request status data"""
21
+
22
+ found: Optional[bool] = None
23
+ """Whether the request status was found"""
24
+
25
+ message: Optional[str] = None
26
+ """Message"""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: evermemos
3
- Version: 0.3.6
3
+ Version: 0.3.8
4
4
  Summary: The official Python library for the EverMemOS API
5
5
  Project-URL: Homepage, https://github.com/evermemos/evermemos-python
6
6
  Project-URL: Repository, https://github.com/evermemos/evermemos-python
@@ -68,12 +68,12 @@ client = EverMemOS(
68
68
  )
69
69
 
70
70
  memory = client.v1.memories.create(
71
- content="I prefer morning meetings, usually around 9am works best for me.",
71
+ content="Let's discuss the technical solution for the new feature today",
72
72
  create_time="2025-01-15T10:00:00+00:00",
73
73
  message_id="msg_001",
74
- sender="user_alice",
74
+ sender="user_001",
75
75
  )
76
- print(memory.message)
76
+ print(memory.request_id)
77
77
  ```
78
78
 
79
79
  While you can provide an `api_key` keyword argument,
@@ -97,12 +97,12 @@ client = AsyncEverMemOS(
97
97
 
98
98
  async def main() -> None:
99
99
  memory = await client.v1.memories.create(
100
- content="I prefer morning meetings, usually around 9am works best for me.",
100
+ content="Let's discuss the technical solution for the new feature today",
101
101
  create_time="2025-01-15T10:00:00+00:00",
102
102
  message_id="msg_001",
103
- sender="user_alice",
103
+ sender="user_001",
104
104
  )
105
- print(memory.message)
105
+ print(memory.request_id)
106
106
 
107
107
 
108
108
  asyncio.run(main())
@@ -136,12 +136,12 @@ async def main() -> None:
136
136
  http_client=DefaultAioHttpClient(),
137
137
  ) as client:
138
138
  memory = await client.v1.memories.create(
139
- content="I prefer morning meetings, usually around 9am works best for me.",
139
+ content="Let's discuss the technical solution for the new feature today",
140
140
  create_time="2025-01-15T10:00:00+00:00",
141
141
  message_id="msg_001",
142
- sender="user_alice",
142
+ sender="user_001",
143
143
  )
144
- print(memory.message)
144
+ print(memory.request_id)
145
145
 
146
146
 
147
147
  asyncio.run(main())
@@ -156,6 +156,34 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ
156
156
 
157
157
  Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
158
158
 
159
+ ## Nested params
160
+
161
+ Nested parameters are dictionaries, typed using `TypedDict`, for example:
162
+
163
+ ```python
164
+ from evermemos import EverMemOS
165
+
166
+ client = EverMemOS()
167
+
168
+ response = client.v1.memories.load(
169
+ conversation_meta={
170
+ "group_id": "chat_user_001_assistant",
171
+ "created_at": "2025-06-26T00:00:00Z",
172
+ "default_timezone": "UTC",
173
+ "description": "Conversation between user and assistant",
174
+ "name": "User Support Chat",
175
+ "scene": "assistant",
176
+ "scene_desc": {"description": "bar"},
177
+ "tags": ["support"],
178
+ "user_details": {
179
+ "user_001": "bar",
180
+ "robot_001": "bar",
181
+ },
182
+ },
183
+ )
184
+ print(response.conversation_meta)
185
+ ```
186
+
159
187
  ## Handling errors
160
188
 
161
189
  When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `evermemos.APIConnectionError` is raised.
@@ -173,10 +201,10 @@ client = EverMemOS()
173
201
 
174
202
  try:
175
203
  client.v1.memories.create(
176
- content="I prefer morning meetings, usually around 9am works best for me.",
204
+ content="Let's discuss the technical solution for the new feature today",
177
205
  create_time="2025-01-15T10:00:00+00:00",
178
206
  message_id="msg_001",
179
- sender="user_alice",
207
+ sender="user_001",
180
208
  )
181
209
  except evermemos.APIConnectionError as e:
182
210
  print("The server could not be reached")
@@ -221,10 +249,10 @@ client = EverMemOS(
221
249
 
222
250
  # Or, configure per-request:
223
251
  client.with_options(max_retries=5).v1.memories.create(
224
- content="I prefer morning meetings, usually around 9am works best for me.",
252
+ content="Let's discuss the technical solution for the new feature today",
225
253
  create_time="2025-01-15T10:00:00+00:00",
226
254
  message_id="msg_001",
227
- sender="user_alice",
255
+ sender="user_001",
228
256
  )
229
257
  ```
230
258
 
@@ -249,10 +277,10 @@ client = EverMemOS(
249
277
 
250
278
  # Override per-request:
251
279
  client.with_options(timeout=5.0).v1.memories.create(
252
- content="I prefer morning meetings, usually around 9am works best for me.",
280
+ content="Let's discuss the technical solution for the new feature today",
253
281
  create_time="2025-01-15T10:00:00+00:00",
254
282
  message_id="msg_001",
255
- sender="user_alice",
283
+ sender="user_001",
256
284
  )
257
285
  ```
258
286
 
@@ -295,15 +323,15 @@ from evermemos import EverMemOS
295
323
 
296
324
  client = EverMemOS()
297
325
  response = client.v1.memories.with_raw_response.create(
298
- content="I prefer morning meetings, usually around 9am works best for me.",
326
+ content="Let's discuss the technical solution for the new feature today",
299
327
  create_time="2025-01-15T10:00:00+00:00",
300
328
  message_id="msg_001",
301
- sender="user_alice",
329
+ sender="user_001",
302
330
  )
303
331
  print(response.headers.get('X-My-Header'))
304
332
 
305
333
  memory = response.parse() # get the object that `v1.memories.create()` would have returned
306
- print(memory.message)
334
+ print(memory.request_id)
307
335
  ```
308
336
 
309
337
  These methods return an [`APIResponse`](https://github.com/evermemos/evermemos-python/tree/main/src/evermemos/_response.py) object.
@@ -318,10 +346,10 @@ To stream the response body, use `.with_streaming_response` instead, which requi
318
346
 
319
347
  ```python
320
348
  with client.v1.memories.with_streaming_response.create(
321
- content="I prefer morning meetings, usually around 9am works best for me.",
349
+ content="Let's discuss the technical solution for the new feature today",
322
350
  create_time="2025-01-15T10:00:00+00:00",
323
351
  message_id="msg_001",
324
- sender="user_alice",
352
+ sender="user_001",
325
353
  ) as response:
326
354
  print(response.headers.get("X-My-Header"))
327
355
 
@@ -11,7 +11,7 @@ evermemos/_resource.py,sha256=4q9tJ95WlH41fbOaDBFQk9arvUwP1aLFqGk4SAujrR8,1118
11
11
  evermemos/_response.py,sha256=MLm_f8qKFHHe8UR0gdvp_alnLS61OqNrt3McWdBJIJA,28806
12
12
  evermemos/_streaming.py,sha256=guEiLN0kAodVFFETj4gPE8fgof4fYFoIZRxzYDL-81Y,10233
13
13
  evermemos/_types.py,sha256=Ue_eCWn1Lxlih_CAV4Mkx_pUiD3j29VPhHPF39l43Sg,7597
14
- evermemos/_version.py,sha256=kc-pZGKj9OMQXtUnTR2U9wZtjKViZPKgpat2e66-3h8,161
14
+ evermemos/_version.py,sha256=VJFPsgXUTmIVmzyWvIUCAYQL6bPyVgYiz3IbAk_Dleo,161
15
15
  evermemos/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  evermemos/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
17
17
  evermemos/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
@@ -27,28 +27,37 @@ evermemos/_utils/_typing.py,sha256=N_5PPuFNsaygbtA_npZd98SVN1LQQvFTKL6bkWPBZGU,4
27
27
  evermemos/_utils/_utils.py,sha256=ugfUaneOK7I8h9b3656flwf5u_kthY0gvNuqvgOLoSU,12252
28
28
  evermemos/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
29
29
  evermemos/resources/__init__.py,sha256=TSJ6b8GNHShyK5w7efHV93u1bY2jYVySQRa2zKc1dKM,500
30
- evermemos/resources/v1/__init__.py,sha256=TMRIwZzEA-em5nj5iap-EbkwRoulo1LlWMBEfWFwvfk,976
31
- evermemos/resources/v1/v1.py,sha256=zFsnmqJ2nAjPi86H24vlo1quBNgCV-FaCMMsZpd3kdg,3530
30
+ evermemos/resources/v1/__init__.py,sha256=jLjptffGJh-4ED6_Njl0K5TV9sVw6BR6A_sqZ9m5_VM,1413
31
+ evermemos/resources/v1/v1.py,sha256=2QYjwNjpINJQmVk5lR6m4h-f5L3B-IxoPlqdk4MqBzI,4560
32
32
  evermemos/resources/v1/memories/__init__.py,sha256=8oz2uuhvRKyX7LSyLyfjrvBCjuP3LrVmKmfn_U_WdqM,1159
33
- evermemos/resources/v1/memories/conversation_meta.py,sha256=BRIRNXO8L_CPSHjY3bAGShFBsPupNtJwdbdtOS-R0wY,21360
34
- evermemos/resources/v1/memories/memories.py,sha256=zKPvM3KK9v4QGExmcT5efsD2Frrkm94reNEzLlUVuow,20476
33
+ evermemos/resources/v1/memories/conversation_meta.py,sha256=zBCdcetkS6lYqPPLiUxykW-jzMzhSTzsUnZx1yrgDJA,17930
34
+ evermemos/resources/v1/memories/memories.py,sha256=X1pXiKrNqxBhI-kiyRy9fiE3WuzTBx--gKz6QE7Zqe0,23731
35
+ evermemos/resources/v1/stats/__init__.py,sha256=f7q_Y1qF5OsCrrOqPm2f-im0bY7H_TgOwIhsYGN344U,1002
36
+ evermemos/resources/v1/stats/request.py,sha256=aOclnKpTCrJpP1zO8oFUfu_JMAe-18rFokmrr6e69Ao,6261
37
+ evermemos/resources/v1/stats/stats.py,sha256=HFKLE3PiPTCxafHwjsIWLi8lU1-lw87VJhsg40iMMLU,3602
35
38
  evermemos/types/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
36
- evermemos/types/v1/__init__.py,sha256=kmUXtUzHf5R5352MM_6BJvIvn9JL91sVANnHZ1BxFCE,684
37
- evermemos/types/v1/memory_create_params.py,sha256=GZklteoms9UCMPam6x4ayrhH1ZSPse8iBEC9c4PmwxQ,1086
38
- evermemos/types/v1/memory_create_response.py,sha256=Eyt2x9aEFApPYuQHEezjTnrexhmZUuN1a43e8k-2EaA,918
39
- evermemos/types/v1/memory_delete_params.py,sha256=yHdUtxuHMnly0__K5Gq6YfmNmoFuAzIfYnLpv9rpy6U,482
39
+ evermemos/types/v1/__init__.py,sha256=DGZd1R0ToVFVuIHcDBvw91cDsgaZgg7zgD-UUFDo4hk,825
40
+ evermemos/types/v1/memory_create_params.py,sha256=h3xQEqp1LjHt3s81qYHowOJMInLFg0BVdcPW3QDbjAE,1536
41
+ evermemos/types/v1/memory_create_response.py,sha256=ISNGdbDcc9gyyRHGUSTm8Xc-m-lLDSKR-6ArioRNe1E,252
42
+ evermemos/types/v1/memory_delete_params.py,sha256=lFcScEuPCenJLnWnoO0WXhLuf0PBfLwLvSATuxAoLmY,477
40
43
  evermemos/types/v1/memory_delete_response.py,sha256=bgYSTaziftqYbHxr8U9BnRdMjeoNd2scfrUWDZ20lY0,735
41
- evermemos/types/v1/memory_list_response.py,sha256=vBxDdJZGZa2TuN1VdVMVETvymtKvfeJ2TH_omraM0_I,3705
44
+ evermemos/types/v1/memory_get_response.py,sha256=wB2xoOUogneDNNquyWkP3o9byEuCZcIqOAtw6qUvUxE,5504
45
+ evermemos/types/v1/memory_load_params.py,sha256=PiBeFtBGUZ8LVuFm_rSE4VSX30xzw4OUKN4fivkVmEM,2068
46
+ evermemos/types/v1/memory_load_response.py,sha256=-H3TTXxB9eZ2568qwuRHn_dR8zphdY28bkmm6XWaA8I,634
42
47
  evermemos/types/v1/memory_search_response.py,sha256=88K6Ft2ohFuHf0M5UQ6T-k1l3g0-Bat-mRLc6T5mXMw,2651
43
48
  evermemos/types/v1/memory_type.py,sha256=J6Ojgl45dHWxTyR668QyAt6somaquvbjjl7ooqlK0Fw,251
44
49
  evermemos/types/v1/metadata.py,sha256=Hu-gdrsH5EZ0mfNKaJjum7xZK0tMtosgXO3X98EdRTo,430
50
+ evermemos/types/v1/global_user_profile/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
45
51
  evermemos/types/v1/memories/__init__.py,sha256=WAXGVPS8gSSay4bXYizkjs14kDnDNKxD-ShtVdqnEFA,662
46
- evermemos/types/v1/memories/conversation_meta_create_params.py,sha256=OLAo4L7OoC-xBMSItJX_FhtzTDVmJuRfpOUUS_lh2uc,2051
47
- evermemos/types/v1/memories/conversation_meta_create_response.py,sha256=gDWr8A2RTFpKEAzGvO_I-wavPB_3U-CUq-aPRscZDIU,1541
48
- evermemos/types/v1/memories/conversation_meta_get_response.py,sha256=yxMvh4C_vDQZ-inLS-exFlgyg4k-d0C0UK1k5JPOxUg,1521
52
+ evermemos/types/v1/memories/conversation_meta_create_params.py,sha256=CoMv542jpA4CfUacswj0VSfhp-jWlyhsMDnD0wQ93Ho,1989
53
+ evermemos/types/v1/memories/conversation_meta_create_response.py,sha256=hefvN92wHDoTcReMTsnGIenZxQ-H1IRuNWys6sPxDIQ,1496
54
+ evermemos/types/v1/memories/conversation_meta_get_response.py,sha256=_4Nd7eiS-QZOqHdq1tvNChsd1b8DQecFQ7on3AH1Ic8,1476
49
55
  evermemos/types/v1/memories/conversation_meta_update_params.py,sha256=VNKMVsooBN8NHbBo9DoSRJJL4g6fSdtEnIvKpjrZnX4,1498
50
56
  evermemos/types/v1/memories/conversation_meta_update_response.py,sha256=xLWnaeGCU35ts8ZswYbbvqjODNnPcbXhp9TXZ18Ogvo,1032
51
- evermemos-0.3.6.dist-info/METADATA,sha256=_H_do1malHT-aG5RfnZInrKa562UXvVlWlTLuko-bhQ,15036
52
- evermemos-0.3.6.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
53
- evermemos-0.3.6.dist-info/licenses/LICENSE,sha256=lTNFvvgo69z4I15AG8OiYYFHk0_wF3bMvN8eH3o7lh4,11339
54
- evermemos-0.3.6.dist-info/RECORD,,
57
+ evermemos/types/v1/stats/__init__.py,sha256=qLacNLO9z56iP5d5zh32BOG1ot-9ebbny5jNBBrblhc,267
58
+ evermemos/types/v1/stats/request_get_params.py,sha256=kZpEke7tQW2RSc3iyQhR3qQKSH5Gm0VNeGYbdQdpItw,373
59
+ evermemos/types/v1/stats/request_get_response.py,sha256=jUBHpcM3hIO_5iiWwtHGF1Wibr9DMjRrHZ3jGrbaaeo,598
60
+ evermemos-0.3.8.dist-info/METADATA,sha256=Nd9Wmbn8msdNfEL0QYiDdCg9JGsq6ggiDT8AppGiaOk,15718
61
+ evermemos-0.3.8.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
62
+ evermemos-0.3.8.dist-info/licenses/LICENSE,sha256=lTNFvvgo69z4I15AG8OiYYFHk0_wF3bMvN8eH3o7lh4,11339
63
+ evermemos-0.3.8.dist-info/RECORD,,